Skip to content

action-layout-editor: Fix actions-tree.md (file path, uuid format, accelerator) - #3912

Merged
mtwebster merged 1 commit into
linuxmint:masterfrom
Mirilindo:docs-actions-tree
Nov 28, 2026
Merged

mtwebster merged 1 commit into
linuxmint:masterfrom
Mirilindo:docs-actions-tree

Conversation

@Mirilindo

Copy link
Copy Markdown
Contributor

Hi,

As I mentioned in #3905, action-layout-editor/actions-tree.md doesn't match the code (that page is where the @untracked form comes from), so here is the separate PR. I compared the page with the code and with the file the layout editor writes, and here is what I found:

  • Path: the page says ~/.config/nemo/actions/actions-tree.json, but Nemo and the editor both use ~/.config/nemo/actions-tree.json (LAYOUT_FILENAME in nemo-action-manager.c, JSON_FILE in the editor). A file in the actions/ folder is never read.
  • uuid: the editor writes the action file's name with its .nemo_action extension (file.name), spices-based actions included. NON_SPICE_UUID_SUFFIX = "@untracked" is defined in the editor but never used. On released versions up to 6.8.5 (I tested 6.8.4 and 6.8.5), a uuid without the extension, like the @untracked form, makes Nemo crash at startup: that is the double free fixed by nemo-ui-utilities.c: Fix double free in nemo_make_action_uuid_for_path() #3905. On master it no longer crashes, but foo@untracked is not found, so the entry is ignored.
  • accelerator: not mentioned, although the editor writes it and the C code reads it (null or "" means no shortcut). I use it myself (<Primary>Return on an action) and it works.
  • position: the page already says it is ignored, and the editor no longer writes it, so I removed it from the list and from the example.
  • children: I added that it is required. If I read the code correctly, a submenu without it logs "Layout submenu is missing mandatory 'children' field" and the whole layout falls back to the flat list.

I guess this went unnoticed because most people use the layout editor, which writes the correct format; only people writing the file by hand would follow this page. One public repo I found follows it: its installer copies the file to the path from the page, so Nemo never reads it.

The example now uses the same format as the editor. I kept the original names, just with the extension.

How I tested it

On the Nemo 6.8.5 package (CachyOS), in a separate D-Bus session with temporary XDG_CONFIG_HOME and XDG_DATA_HOME:

  • a broken layout file at the path from the page: no message (not read); at the path from the code: g_critical (read);
  • a @untracked uuid at the code path: crash (rc 134);
  • a uuid with the file name, a spices-style uuid (name@author.nemo_action) and an accelerator: no error.

I also compared with my own actions-tree.json written by the editor, and with five public files made by the editor. Packages are built without ENABLE_DEBUG, so I couldn't see in the log which actions were added; on a debug build of master I saw foo@untracked reported as a missing action. It is a small test on my own two machines, not a full review of the editor.

This only changes the doc page. If any of this is intentional (for example if @untracked is planned for later), let me know and I'll adjust it, or feel free to close this.

🤖 Generated with Claude Code

The page did not match what Nemo reads and what the layout editor
writes:

- The layout file is ~/.config/nemo/actions-tree.json, not
  ~/.config/nemo/actions/actions-tree.json.
- An action's uuid is its file name including the .nemo_action
  extension (spices-based actions too). The @UNTRACKED suffix is never
  written by the editor, and on Nemo up to 6.8.5 a uuid without the
  extension crashes Nemo at startup (fixed by linuxmint#3905).
- Document the accelerator key.
- Remove position, which the editor no longer writes and Nemo ignores.
- Say that children is required for a submenu.

The example now uses the same format as the editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mtwebster
mtwebster merged commit f722aac into linuxmint:master Nov 28, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants