Skip to content

feat(zeph-tui): replace modal @ file picker with inline mention popup - #6659

Merged
bug-ops merged 1 commit into
mainfrom
feat/issue-6647/inline-at-mention-picker
Jul 27, 2026
Merged

feat(zeph-tui): replace modal @ file picker with inline mention popup#6659
bug-ops merged 1 commit into
mainfrom
feat/issue-6647/inline-at-mention-picker

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the modal @ file picker with a non-modal inline popup: typing @ at word-start inserts the character into the input buffer and opens a suggestion popup that reflects the buffer, instead of capturing every subsequent keystroke into a separate filter field (fixes the input-loss race and the inability to type a literal @).
  • Adds category tabs to the popup: All | Files | Skills | Agents. Files reuses the existing background-built file index; Skills are delivered via a new Channel::send_skill_catalog event (emitted at agent startup and on skill hot-reload); Agents read directly from existing runtime metrics (MetricsSnapshot::agent_definitions), requiring no new plumbing.
  • Accepting a selection is token-bounded: it replaces the whole @query word rather than just the text up to the cursor, so accepting with the cursor positioned inside an existing mention can no longer corrupt the buffer.
  • reduce is now a thin wrapper around reduce_inner plus a fail-closed resync step that closes or refilters an open picker after any action that could plausibly touch the input buffer or session state — including paste and session switching, neither of which the old modal design could observe.
  • specs/084-tui-mention-picker/spec.md amended in several passes to match the shipped design (this went through three review rounds specifically to close remaining spec/code drift).

Closes #6647
Closes #6648

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins (15088 passed, 0 failed)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"
  • gitleaks protect --staged --no-banner --redact
  • New regression tests cover the paste-buffer-mutation and session-switch cases that motivated the fail-closed resync design, and a dedicated AppChannel::Tui forwarding test for the new skill-catalog event (verified by revert-and-rerun to actually fail without the fix)
  • Live-TUI verification (Skills tab populated from a real agent session, popup anchoring/highlighting in both themes) — see .local/testing/playbooks/tui-mention-picker.md Scenario F, not yet run

@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation channels zeph-channels crate (Telegram) rust Rust code changes core zeph-core crate labels Jul 27, 2026
Typing @ at word-start now inserts the character into the input buffer
like any other key and opens a non-modal popup that merely reflects the
buffer, instead of the old modal picker that captured every keystroke
and swallowed literal @ characters. The popup gains category tabs (All,
Files, Skills, Agents): Files reuses the existing background file
index, Skills are delivered via a new Channel::send_skill_catalog event
(startup + hot-reload), and Agents read from existing runtime metrics.
Accepting a selection replaces the whole @query token (not just up to
the cursor), so a mid-token accept can no longer corrupt the buffer.

The reduce/reduce_inner split adds a fail-closed resync predicate that
closes or refilters the picker after any action that could touch the
input buffer or session state, including paste and session switching,
which the previous modal design could not observe.

Closes #6647
Closes #6648
@bug-ops
bug-ops force-pushed the feat/issue-6647/inline-at-mention-picker branch from f8a82a3 to 116afa5 Compare July 27, 2026 20:19
@bug-ops
bug-ops enabled auto-merge (squash) July 27, 2026 20:19
@bug-ops
bug-ops merged commit 29f84ad into main Jul 27, 2026
43 checks passed
@bug-ops
bug-ops deleted the feat/issue-6647/inline-at-mention-picker branch July 27, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels zeph-channels crate (Telegram) core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant