Unify TUI completion popup styling and preserve result identity (#46694)

## Why

Narrow completion popups can hide distinguishing filenames, parent paths, or category tags. Unified mentions also need a stable result viewport across searches and filters.

## What changed

- Use shared selection styling and `›` markers across command, file, skill, and unified mention popups.
- Give unified mentions a fixed-height picker layout with a header, filter tabs, query display, scroll indicators, and keyboard hints.
- Bound mention name columns to leave room for parent paths and measure alignment in terminal cells.
- Truncate file paths while retaining filenames and recalculating visible fuzzy highlights, preserving the full path for insertion.
- Keep category tags visible when skill and app descriptions are hidden.

## Testing

Add snapshots and assertions for narrow and clipped layouts, scrolling, empty filters, full-row selection styling, Unicode column alignment, long paths, preserved file selections, and category tags.

GitOrigin-RevId: 54c34cc2472b43bac22011206efed3041eb77308
This commit is contained in:
Eric Traut
2026-09-19 19:13:46 +00:00
committed by copyberry
parent 018687bd8c
commit e28fa3e7a4
50 changed files with 1037 additions and 341 deletions
@@ -1,13 +1,13 @@
---
source: tui/src/chatwidget/tests/popups_and_settings.rs
assertion_line: 2317
expression: snapshot
---
› $
Google Drive [App] Connected files
Press enter to insert or esc to close
› Google Drive [App] Connected files
enter insert · esc close
--- plugin authentication ---
Plugins
@@ -1,8 +1,7 @@
---
source: tui/src/chatwidget/tests/slash_commands.rs
assertion_line: 3091
source: tui/src/chatwidget/tests/worktree_picker_tests.rs
expression: popup
---
› /work
/worktree start or continue a conversation in a new worktree
› /worktree start or continue a conversation in a new worktree