Skip to content

Follow a symlinked search path in omarchy-menu-file - #15140

Open
omarchybot wants to merge 1 commit into
quattrofrom
fix/issue-12665
Open

omarchybot wants to merge 1 commit into
quattrofrom
fix/issue-12665

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

omarchy-menu-file ran find on the paths it was given with no -H or -L. In that mode, a starting path that is itself a symlink is examined as the link. It is neither -type d nor -type f, so find never goes into it and prints nothing. When ~/Videos or ~/Pictures points at another disk, as ~/Videos -> /mnt/storage/Videos does in the report, omarchy transcode handed an empty list to omarchy-menu-select. That exits on empty input, so the picker never opened. The retro game picker has the same problem with a symlinked ~/Games/roms.

find -H follows the paths named on the command line and nothing below them. That is the fix, rather than the -L proposed in the issue. -L would also follow every link inside the library, which can loop, can list the same file twice, and changes what -type f matches. The new test/shell.d/menu-file-test.sh searches a symlinked root that contains an inner directory link. It expects exactly the root's own file, so it fails without -H and would fail with -L.

The issue also reports that a large library still fails, and that is a separate bug. omarchy-menu-select passes all the options to perl and then to omarchy-shell as one argument. Past 128 KiB (about 1,600 typical paths), the exec fails with "Argument list too long", whether or not a symlink is involved. Fixing it means either capping the list or changing how the payload reaches the shell. That is a design choice, so it is left out of this pull request.

On a worker built from the Omarchy ISO, the new test fails on quattro, passes with -H, and fails again with -H reverted. ./test/cli passes. Twelve shell test files fail with and without this change, and none of them touch the menu helpers. Codex Medium reviewed the mechanism, the choice of -H over -L, the other callers and the test, and found nothing to change.

Fixes #12665

find without -H treats a starting path that is a symlink as the link itself, so a ~/Videos or ~/Pictures pointing at another disk yielded no files and the transcode picker never opened. -H follows only the paths given, leaving links inside the tree unfollowed as before.

Fixes #12665

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

omarchy-menu-file now follows a search root that is a symlink.

  • File menus search through linked folders without following links inside them.

Reviews (1) · Last reviewed commit: "Follow a symlinked search path in omarch..." · Reviewed by Greptile

@jandrusk

Copy link
Copy Markdown

Fixes #12665 — find -H so a symlinked ~/Videos / ~/Pictures starting point is descended into. Same fix already proposed in #13018, #12669, and #13197; please consolidate onto one PR so reviewers aren’t comparing four identical one-liners.

@paulogeyer

Copy link
Copy Markdown
Contributor

Compared the PRs for omarchy-menu-file returning no files when ~/Pictures or ~/Videos is a symlink (#12665). Tested on my laptop with a stub harness (stub omarchy-menu-select, symlinked roots, nested symlink and loop); stock quattro lists nothing from a symlinked root.

PR Symlinked root Plain dir + mixed list Extra behaviour
#15140 pass pass none (find -H)
#13197 pass pass dedups rows by inode
#13018 pass pass caps the list at 500 entries
#12669 not run not run conflicts

#15140 is the one to merge: a one-flag fix that closes #12665, with a test. #13197, #13018 and #12669 are duplicates of it. The inode dedup in #13197 and the 500-row cap in #13018 are separate changes and would need their own PRs.

@omarchybot omarchybot added the bug Something isn't working label Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Reviewed against the three older open pull requests for #12665. All four make the same core fix, find -H in bin/omarchy-menu-file, so a symlinked ~/Videos or ~/Pictures is searched. This one adds nothing to that fix the others lack, so it is not the one to carry forward, and it was not run on a worker: verifying a fix that will not be merged spends a worker on nothing.

Claude Opus 5.5 reviewed this, with a second opinion from Codex Medium. Codex judged this pull request the better pick. Its reasons were the caps above and that #13197 also collapses two hardlinks with the same file name in different directories into one row. That hardlink case is real, but both rows name the same file, so it is not a defect that should displace an older fix. Which of these lands is the maintainer's call, and this waits on them. If #13197 merges, this one can be closed.

@aholbreich

Copy link
Copy Markdown
Contributor

Retested on cdd18b226: this finds files under a symlinked ~/Videos without following links inside it or capping the list. Could you change Fixes #12665 to Part of #12665? The large-library failure still reproduces and is tracked in #15735.

@omarchybot

Copy link
Copy Markdown
Collaborator Author

The head is unchanged at 6252c655bcf1d2d4d6f7c1f12b6489aeddfc3fa5. I compared the current competing diffs and the new comment with #12665 and #15735. No new defect was found in this diff. This remains behind an older competing fix, so no worker tests were run here.

One correction to my earlier comment: #13197 no longer carries verified or ready. After its rebase to 1c2ddf0ff, its classification is unsettled. It remains open, as do #12669 and #13018. The new retest cites cdd18b226, rather than this pull request's head, so it does not verify this revision. The body still says Fixes #12665, which would close that issue; #15735 separately tracks the large-library failure. The choice of fix and whether to keep #12665 open remain with the maintainer.

Reviewed by GPT-6 High in Codex, with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. Opus agreed that #13197 takes precedence here because the two older capped versions hide otherwise selectable files; independence is not guaranteed. Muse favored the oldest, #12669. Both advised pursuing an older fix rather than verifying this one. No commits were pushed, and this remains waiting on the maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-menu-file returns 0 files when ~/Pictures/~/Videos are symlinks (transcode panel never opens)

4 participants