fix(tui): hint mention depth cap on misses#2530
Draft
cyq1017 wants to merge 2 commits into
Draft
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Owner
|
Harvested into #2504 for the v0.8.50 release slice. What landed:
Local verification on the harvest branch:
Live #2504 CI is green across Ubuntu, macOS, Windows, lint, version drift, CodeQL, mobile smoke, npm smoke, and GitGuardian. Thanks @cyq1017; I kept your authorship on the harvested commits. |
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.
Summary
Refs #2488
Verification
Greptile Summary
This PR refines the
@-mention autocomplete miss experience by showing a contextual depth-limit hint only when the typed path is plausibly too deep for the currentmention_walk_depthsetting.no_file_mention_matches_statusandpath_partial_reaches_walk_depthhelpers tofile_mention.rs; the hint fires only when the component count of the partial is at or abovewalk_depth, and is suppressed entirely whenwalk_depth == 0(unlimited).Confidence Score: 5/5
The change is narrowly scoped to status-message text generation and has no effect on autocomplete logic, file I/O, or app state beyond status_message.
Both helpers are pure functions with no side effects. The guard for walk_depth == 0 and the component-count comparison are straightforward. Previous review feedback (depth-component counting and the missing unlimited-depth negative test) has been fully addressed. The three new tests cover all meaningful branches.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[try_autocomplete_file_mention] --> B{candidates empty?} B -- Yes --> C[no_file_mention_matches_status\npartial, walk_depth] C --> D{path_partial_reaches_walk_depth?} D -- walk_depth == 0 --> E["No files match @{partial}"] D -- component_count < walk_depth --> E D -- component_count >= walk_depth --> F["No files match @{partial}\n(mention_walk_depth=N; use /config set\nmention_walk_depth 0 to search deeper)"] B -- No, single match --> G[replace + attach] B -- No, multiple --> H{shared prefix longer?} H -- Yes --> I[extend partial] H -- No --> J[show top 5 candidates]Reviews (2): Last reviewed commit: "fix(tui): narrow mention depth hint" | Re-trigger Greptile