githubnext/chopinPublic

Let's compose rich plans together

Show an @ mention picker in the Chat composer

Typing @ at a word boundary opens a compact list anchored above the
composer: the Planner first, then people present in the document, then
people who have posted in this Chat, deduplicated case-insensitively and
without the current user. Each row is a 20px avatar (the Planner mark for
chopin) and the login. Arrow keys move, Enter or Tab select, Escape
dismisses and keeps the typed text, and IME composition never selects.

The trigger follows the word-boundary rule of addressed(), so a@b.com never
opens the list, and a query with no match closes it. Routing is unchanged:
only @chopin starts a Planner turn; mentioning a person is text only. The #
reference picker keeps its behavior and only one picker is open at a time.

The composer is now always a combobox, since the @ list needs no server
support; the existing capability-fallback test is updated to match.

Closes #239

Assistant-workflow: inline
Assistant-model: Claude Sonnet 5.5
Assistant-verification: bun test: 1817 pass, 0 fail (2 skip)
Assistant-verification: bun run types: all 9 checks exit 0
Assistant-verification: bun run ci: pass (dprint, oxlint, tokens, design contract)
Assistant-verification: bun run e2e (full suite): 291 passed, 4 failed; the 3 attributable to this change were fixed and re-run green (chat-mentions, chat-references, smoke), sidecar.e2e.ts:551 also fails on origin/main without this change
Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
ALALAlex Lavaee and Alex Lavaee authored committed by Maggie Appleton
3e57e40Patch
Parent5ac2f30
7 files changed+774-9
StackedSplit
apps/web/src/chat/chat.tsx+111 −6
apps/web/src/chat/mention-picker.tsx+93 −0
apps/web/src/chat/mentions.test.ts+263 −0
apps/web/src/chat/mentions.ts+148 −0
apps/web/src/room-workspace.tsx+1 −0
e2e/chat-mentions.e2e.ts+155 −0
e2e/chat-references.e2e.ts+3 −3