fix(tui): hint mention depth cap on misses#2530
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
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. |
|
Thanks @cyq1017 — the mention-depth-cap hint is already present on the public v0.9.0 integration branch ( Verification recorded in the execution map: Closing this PR as already harvested/present in the integration branch. |
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