Repository navigation
Conversation
An empty list piped into omarchy-menu-select read as "no options given", so it printed its own usage string and exited 1. Picking Transcode from the menu with empty ~/Pictures and ~/Videos was a silent no-op, and from a terminal it printed an internal usage message for a command the user never typed. An empty piped list now exits 2 with no output, omarchy-menu-file reports the empty search on stderr with the same code, and the two callers exposed to it give real feedback: transcode sends a "Nothing to transcode" notification and the retro game installer mirrors its existing "No RetroArch cores found" notification.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves CLI behavior when menu inputs are empty by introducing distinct, quiet exit codes for “nothing to offer” cases and ensuring callers provide user-friendly notifications instead of leaking usage text.
Changes:
- Add
omarchy-menu-selectbehavior: empty piped option list exits2quietly (no usage output). - Update
omarchy-menu-fileto detect “no matches” early, print a targeted error, and exit2. - Adjust callers (notably
omarchy-transcodeand retro install) and extend CLI tests to validate exit codes, output, and notification behavior.
Reviewed changes
Copilot reviewed 1 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/cli | Adds regression tests for empty menu inputs, no matching files, and transcode notification behavior. |
| bin/omarchy-transcode | Handles omarchy-menu-file exit 2 by notifying “Nothing to transcode” and exiting non-zero. |
| bin/omarchy-menu-select | Exits 2 quietly when stdin is a pipe with zero options to distinguish “empty offer” from usage errors. |
| bin/omarchy-menu-file | Detects no matching files and exits 2 with a clear message instead of invoking the menu. |
| bin/omarchy-games-retro-install | Adds notification + non-zero exit when no ROMs are found. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The glyph after -g was empty, so omarchy-notification-send took "Nothing to transcode" as the glyph and showed the path list as the headline with no description. Use the menu's Transcode glyph, and have the test record each argument separately and check the whole call, so a dropped or merged argument fails it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Codex Medium <[email protected]>
|
Reviewed and tested on a disposable Omarchy worker. The fix works, and I pushed one small correction to your branch. Reproduced. On current Pushed: 330d6ef. In Tests. Second opinion. Codex Medium read the change twice. It agreed that the bug is real and the fix is the right size, and it found no caller broken by the exit 2. It suggested the tighter assertion, and it cleared the final head in a second round. Its independence from my review is not guaranteed. It also pointed out one case that predates this PR and isn't a blocker. If a searched folder holds an unreadable, non-hidden subdirectory, This is waiting on the maintainer now; nothing is needed from you. |
Quattro added alias fast-path tests at the end of test/cli where this branch added its menu-select tests; both blocks are kept, quattro's first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dable folders Quattro now has omarchy-menu-select exit 2 when the menu cannot open, and typing_setup.py reads it that way, so an empty piped list exits 3 instead. Otherwise Transcode reported "Nothing to transcode" when the shell was down, and the retro installer reported no games. omarchy-menu-file also stops aborting on find's status, which an unreadable subfolder sets, so the matches it found are still offered. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Codex Medium <[email protected]>
…root An unreadable search folder now exits 1 with "Could not search", rather than 3 with "No matching files", so Transcode and the retro installer no longer claim there is nothing there. Matches found beside an unreadable subfolder are still offered. Root reads through chmod 000, so the permission assertions run only for an ordinary user, like the existing alias test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Codex Medium <[email protected]>
[Medium impact] The PR appears safe to merge; the remaining feedback is a non-blocking request for retro-game tests. Findings
SummaryThe PR gives empty file searches clear feedback instead of printing the selector’s usage text.
The previous-review comparison was not used because the two commits have different merge bases with the supplied target commit.
|
| if (( game_status == 3 )); then | ||
| omarchy-notification-send -g "No retro games found" "$HOME/Games/roms" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
The new “No retro games found” branch has no test. The transcode test cannot catch a wrong status check or notification in omarchy-games-retro-install.
Add tests for both outcomes:
- A stubbed core choice and an empty ROM directory should send the notification and exit 1.
- A cancelled file choice should stay quiet and exit 0.
|
This stopped merging cleanly after The merge. The only conflict was at the end of What the merge broke. Since you opened this,
3fdf048 makes a search root that can't be read at all exit 1 with "Could not search …" rather than "No matching files". It also adds tests for each case, with the permission checks skipped as root. Tests. On current Review. Claude Opus 5.5 and Codex Medium both reviewed it. Codex found the exit-2 collision and the This now waits on a maintainer. |
Quattro added the timed alias-dispatch test at the end of test/cli where this branch added its menu-select tests; both blocks are kept, this branch's first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The merge. The only conflict was at the end of Tested. On current Second opinion. Codex Medium reviewed the merge and found nothing: no lost or clashing test state, nothing in This is waiting on the maintainer. |
Quattro now prints its menu prompts and notifications through omarchy-i18n, so the two empty-search notifications this pull request adds read their text from new English keys in default/i18n/en/cli.json (games.noGames, transcode.nothing, transcode.nothingBody) rather than embedding English literals, which i18n-check flags on notification lines. Translations follow through the sync workflow, as for any new key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchy-transcode now reads its notification text through omarchy-i18n, which looks the key up under $OMARCHY_PATH in the language the user picked. Left to the environment, the test resolved the keys against whatever Omarchy the machine has installed and in its language, so on an install predating these keys the notification read "transcode.nothing" and the test failed, and the negative check further down passed for the same wrong reason. Point both at the tree under test and at no language file, as test/shell.d/base-test.sh does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Quattro's move to translated strings (#15326) conflicted with this again, in
Checked on an Omarchy ISO worker at b0cfb95 against quattro 84cfb93. For an empty search, quattro still prints Codex Medium reviewed the whole diff, including the conflict resolution and the test change, and found nothing. It agreed with my own reading, but its independence isn't guaranteed. This is waiting on the maintainer. |
The list now reaches omarchy-menu-select as a here-string rather than a pipe, and nothing checked that the rows, their order, the extension filter or the returned pick survived that. Adapted from the test in omacom#14538, which fixes the same bug and was left in favour of this one. Co-Authored-By: Omarchybot <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
#14538 fixes the same bug (#7114), and this pull request is the one recommended to land. The one thing #14538 had that this one lacked was a test for the path this one rewrites: when a search does find files, the list should still reach the picker newest first, filtered by extension, and the pick should come back. I added that test here as a871710, adapted into Checked on an Omarchy ISO worker at a871710. Quattro at 51bfd1d still prints Codex Medium reviewed the new commit and the whole diff and found nothing. It agreed with my own reading, but its independence isn't guaranteed. Next step: the maintainer decides whether to merge. Nothing is waiting on the author. |
|
A correction to my last comment: CI is not green yet. The "Check translation structure" workflow ( Nothing else has changed since that comment. The head is still a871710, the reproduction and Next step: a maintainer approves the workflow run. Once it passes, this needs only the merge decision. Nothing is waiting on the author. |
With ~/Pictures and ~/Videos empty, as on a fresh install, `omarchy transcode` printed omarchy-menu-select's usage line and exited 1, and Transcode from the menu did nothing at all: omarchy-menu-file piped an empty find result into omarchy-menu-select, which read it as being called with no options. This is omacom#7320's fix: an empty piped list exits 3 quietly, omarchy-menu-file reports an empty search with 3 and a search it could not run with 1, and transcode and the retro game installer turn 3 into a notification. Three other pickers were handed empty lists the same way. `omarchy plugin remove` with every plugin gone printed gum's "no options provided" and then "cancelled"; it now says "no plugins installed", as it already does when the plugins folder is missing. The background switcher, on a theme with no backgrounds, opened an image picker that never reveals itself without an image, yet takes the keyboard until Escape; omarchy-menu-images now exits 3 when it has nothing to offer, and the switcher sends the "No background was found for theme" notification that theme set and bg next already send. The Windows VM installer offers only RAM sizes from 2G up that fit the machine, so under 2G of memory it opened an empty gum list and said the installation was cancelled; it now stops first and says so, as it does for disk space. Co-authored-by: Waleed <[email protected]> Co-authored-by: Omarchybot <[email protected]> Co-authored-by: Cursor <[email protected]>
|
The translation workflow run has now finished with a failure. GitHub created no jobs or check runs for it and has no test log, so this result does not identify a failing translation assertion. The workflow is unchanged from this branch’s merge base; the cause of the failure before any job started is still unknown. Rechecked a871710 on a disposable Omarchy worker: Codex High checked the run metadata and worker results. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the CI diagnosis and found no change to push. They agreed with that assessment; independence from my review is not guaranteed. Nothing was pushed. This waits on a maintainer to investigate the run that created no jobs and get the translation workflow running at this head. No action is identified for the author. |
Fixes #7114.
Picking Transcode from the menu with empty
~/Picturesand~/Videoswas a silent no-op, and runningomarchy transcodefrom a terminal printed an internal usage string for a command the user never typed.omarchy-menu-selectcouldn't tell an empty option list piped on stdin apart from a caller passing no options at all, so it treated both as a usage mistake.omarchy-menu-select: an empty piped list now exits 2 with no output — it's the caller's "nothing to offer", not a usage error. Argument errors keep the usage string and exit 1, and cancelling a menu still exits 1, so existing callers are unaffected. This also stops the usage leak for the other pipe-callers (omarchy-menu-plugin,omarchy-menu-timezone,omarchy-menu-keybindings).omarchy-menu-file: an emptyfindresult reportsNo matching files under <paths>on stderr and exits 2 instead of summoning the menu.omarchy-transcode: on an empty search it sends a "Nothing to transcode" notification (the menu'strigger.transcodehas no terminal, so a notification is the only feedback channel) and exits 1.omarchy-games-retro-install: an empty~/Games/romsnow mirrors the script's existing "No RetroArch cores found" notification instead of exiting silently.Regression tests in
test/clicover the quiet exit-2, the preserved usage error, the menu-file message, and an end-to-end transcode run with a stubbedomarchy-notification-send. Full./test/clipasses, and the populated-search path was verified end-to-end against a stubbedomarchy-shellsummon.