Skip to content

feat(app): list files first in the V2 composer @ mention menu - #289

Merged
quickbeard merged 2 commits into
mainfrom
feat/desktop-mention-order
Aug 22, 2026
Merged

quickbeard merged 2 commits into
mainfrom
feat/desktop-mention-order

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

What

PR #56 reordered the @ mention autocomplete so file/directory results come first — in the TUI, the legacy web prompt input, and the codev run footer. It missed the V2 composer (packages/session-ui/src/v2/components/prompt-input/), which is the prompt the desktop app (and the web app, now that the legacy layout is retired) actually renders — so those surfaces still listed references, agents, and MCP resources ahead of files.

This applies the same ordering there: the contextList grouping in interaction.ts now delegates to a fork-only at-options.ts module ranking recent → file → reference → agent → resource (previously reference → agent → resource → recent → file).

Mirrors PR #56's approach in packages/app (fork-only prompt-input/at-options.ts): a minimal two-line edit to the upstream file, with the ranking and its unit test in fork-only files. The grouped menu scrolls, so no row-reserve logic is needed (unlike the TUI/run-footer variants), and default selection stays index 0 — Enter now accepts the top file match.

DIVERGENCES.md row added for the interaction.ts edit.

Verification

  • bun typecheck clean in packages/session-ui and packages/app.
  • bun test src in packages/session-ui: 77 pass (includes the new at-options.test.ts).

🤖 Generated with Claude Code

quickbeard and others added 2 commits August 22, 2026 11:05
The desktop/web V2 prompt input kept upstream's reference → agent →
resource → recent → file group order after #56 reordered the TUI, the
legacy web prompt, and the codev run footer. Delegate the contextList
grouping to a fork-only at-options module ranking recent → file →
reference → agent → resource.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit b77e8b7 into main Aug 22, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the feat/desktop-mention-order branch August 22, 2026 04:29
quickbeard added a commit that referenced this pull request Aug 22, 2026
* fix(app): search for files on a bare @ in the composer menu

#289 reordered the @ menu's groups so files lead, but the resolver
short-circuited an empty query to the fixed entries plus open tabs and
never searched — so with no tabs open the menu held no files to order,
which is what users saw. Search on every query.

Also drop fff's worktree-root entry, which an empty query now surfaces
as a leading bare '/' that names no file; the ripgrep fallback never
emitted it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: correct the PR link for the @ menu fix

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant