fix(pick): match repo paths only at path boundaries - #6
Open
qu8n wants to merge 1 commit into
Open
Conversation
Repo paths were matched against the captured screen with a plain substring search, and the variant list holds the basename with .md cut off. So one visible research/breakout_qa_bot/README.md matched both README.md and README, pulling every same-named markdown file in the repo into the picker: 42 rows for a screen holding one path. A path character to the left now disqualifies a match. Extensionless variants need a clear right edge too, so bare README does not claim README.md, while other variants keep the loose right edge that lets src match when only src/main.py is visible.
qu8n
force-pushed
the
fix/extensionless-basename-substring
branch
from
August 25, 2026 16:08
90dffa0 to
de7d817
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the picker that returned 42 rows in my herdr pane when there was just one file path. Many of these files don't exist on my screen. Every
README.mdin the repo turned up in this picker.Repo paths are matched with
joined.find(variant), and the variants include the basename minus.md. So a line mentioningresearch/breakout_qa_bot/README.mdcontains bothREADME.mdandREADMEas substrings, and every markdown file with that basename matches. If there are 40 READMEs in the repo, all 40 rows will appear in the picker.Still a substring search, but it now asks for a path boundary. A path character on the left rules a match out, and extensionless variants need a right edge as well, so bare
READMEcannot claimREADME.md.srcstill shows up when onlysrc/main.pyis visible, andmain.py:12keeps its line number.One test added, the other 133 pass. Note that a line holding just
README.mdstill matches every namesake, through thebase_variantsblock. That needs a policy so I left it to your call.