Skip to content

ui: pick @ mentions in a drawer on phones - #49

Draft
allozaur wants to merge 2 commits into
masterfrom
allozaur/feat/chat-form-mention-drawer-mobile
Draft

allozaur wants to merge 2 commits into
masterfrom
allozaur/feat/chat-form-mention-drawer-mobile

Conversation

@allozaur

@allozaur allozaur commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Overview

On a phone, typing @ in the chat form opens a drawer with its own search field to pick a file or folder to mention, in the small form and in the expanded sheet.

Additional information

Based on master, which has the move to ui/ since ggml-org#32032 was merged. The expanded chat form it built on has merged as ggml-org#31973. Its diff is only this layer.

Not yet tried with a real phone keyboard. / commands stay off on phones, which leaves /prompt (MCP prompts) without a route there for now.

Behaviour
  • The drawer opens on the bare @ and takes the focus, so the query is typed in its search field and not in the message. Text that already follows the @ only seeds the search.
  • Picking a result, by tap or Enter, puts the mention where the @ was and returns to the message, as the list by the form does on a desktop.
  • Closing the drawer without picking leaves the message and the caret as they were. That @ then stays plain text until it is deleted, where a desktop reopens its list as the query changes: a drawer that came back on every character would get in the way.
  • With no file search to offer (a server started without --tools, or the tool turned off) the drawer stays shut. A desktop's list says why by the form; a drawer would cover the message to say it.
  • / opens nothing on a phone, as before: a drawer on the first / would cover the message, and /cwd, /model and /compact have other routes there. A message that starts with / is plain text on a phone, so an @ in it opens the drawer.
  • Desktop is unchanged: the list floats by the form once a character follows the @, with the chat input as its search field.
What changed
  • ChatFormPickerMention renders one shared snippet in a Drawer on a phone and in the Popover elsewhere, as ChatFormCurrentWorkingDirectory does. The drawer turns on ChatFormPickerList's own search field, bound to query, which is now bindable up to the pickers hook.
  • The drawer sets vaul's autoFocus: by default vaul leaves the focus where it was, which kept it, and a phone's keyboard, in the message.
  • useChatFormPickers takes opensCommandsOnInput, opensMentionsOnInput and mentionHasOwnSearch in place of the blanket opensOnInput. With its own search field the mention picker opens on a bare @, and a dismissed @ stays literal while it is still there.
  • conversationsStore.preferences.isFileSearchEnabled() replaces the same check written out in the mention picker and in the working directory picker.
Testing
  • npm run check, npm run lint, and the unit and client suites pass on this branch. The Storybook and e2e suites were not run locally.
  • chat-form-pickers-phone.svelte.test.ts covers, at phone size: the drawer and its focused search field on @, picking a result, dismissing with the message and caret untouched, the expanded sheet, no drawer without file search, and nothing on /. At desktop size it covers the list by the form. The hook's phone routing has its own cases.
  • Checked in a browser at 375x812 against a server with tools: the drawer opens on @, a tap and Enter both insert the mention, a tap outside and Escape both dismiss it, and it works over the expanded sheet. At 1280x800 the desktop list is as before.
  • Not checked on a phone: whether the keyboard stays up as the focus moves into the drawer, whether the drawer and its list stay clear of the keyboard, and whether the keyboard returns to the message afterwards.

Requirements

@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 1a383e3 to 264c97f Compare November 10, 2026 11:57
@allozaur
allozaur changed the base branch from allozaur/feat/chat-form-expand to allozaur/refactor/ui-folders November 12, 2026 01:27
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch from 872113e to ab4178a Compare November 12, 2026 01:29
allozaur added a commit that referenced this pull request Nov 12, 2026
Replayed onto the ui/ layout; only its last commit is new, the expanding
chat form before it is upstream as ggml-org#31973.
allozaur added a commit that referenced this pull request Nov 12, 2026
…into develop

Keeps develop's resolution: the drawer and the typed-picker gates follow a
touch pointer, as upstream's pickers do, so the phone-width test file and a
duplicated expansion test from the restack are left out.
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch from ab4178a to 323b97f Compare November 16, 2026 07:05
@allozaur
allozaur force-pushed the allozaur/refactor/ui-folders branch from 3226e0f to 0b599ae Compare November 16, 2026 07:05
allozaur added a commit that referenced this pull request Nov 16, 2026
- the voice transcript store and search_chats read messages through the
  storage backend: IndexedDB keeps its indexed reads, another backend
  reads every conversation
- a fork keeps the tool policy of its source chat, as on master
- the Models page view mode and the voice hint are stored through
  PreferencesService, like the other UI state
- the import dialogs and the notebook use @ggml/llama-ui
- the mention picker drops the MCP resources of #19, which moved to the
  MCP extension, and keeps the drawer of #49 on touch screens
- the sidebar tests count the actions shown by default, as the notebook
  is opt-in; the touch picker test replaces the phone one
- sort attributes and keys, as lint asks

Assisted-by: Claude (Opus 5.5 Medium)
allozaur added a commit that referenced this pull request Nov 16, 2026
develop now carries the current tips of fork stack 62 (ui-folders,
glass-surfaces, llama-harness-package, mcp-extension, projects, servers,
prompt-library, voice-mode) and its side branches (model-configuration,
models-manager-redesign, ui-server-storage, mcp-oauth-login), the
server fix for ASR transcript markup, and the develop-only PRs #49, #56
and #57 ported onto them, on the same master base as before.

#19 (MCP resources in the mention picker) is left out: MCP moved to an
extension and it needs a port onto the extension API.

Assisted-by: Claude (Opus 5.5 Medium)
@allozaur
allozaur force-pushed the allozaur/refactor/ui-folders branch 3 times, most recently from 4904de8 to 83c3757 Compare November 16, 2026 10:42
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch 2 times, most recently from 39b8c36 to 3084d20 Compare November 16, 2026 11:28
@allozaur
allozaur force-pushed the allozaur/refactor/ui-folders branch 2 times, most recently from 27f7029 to ebe986f Compare November 16, 2026 11:43
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch 2 times, most recently from 5bccd3d to f4bb900 Compare November 16, 2026 11:52
@allozaur
allozaur force-pushed the allozaur/refactor/ui-folders branch from ebe986f to 5cd509d Compare November 16, 2026 11:52
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch from f4bb900 to a13b23e Compare November 16, 2026 13:44
@allozaur
allozaur force-pushed the allozaur/refactor/ui-folders branch from 1af9309 to 8285159 Compare November 16, 2026 13:52
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch from a13b23e to 06cc705 Compare November 16, 2026 13:52
- On a phone, typing `/` or `@` opens no picker for now: each mobile
  browser moves the page its own way as the keyboard opens, so a list by
  the form can not stay clear of the text being written. A note marks it
  for later.
- The editor scrolls inside the form again: MarkdownEditor's own box sat
  between the input and the editor without taking its height, so a message
  longer than the form ran under the actions instead of scrolling.

Assisted-by: Claude (Fable 5.2)
- On a phone, typing `@` in the chat form opens a bottom drawer with a
  search field of its own and the mention results, in the small form and
  in the expanded sheet. Picking a result puts the mention where the `@`
  was, as the list by the form does on a desktop.
- The drawer opens on the bare `@` and takes the focus: the query is typed
  there, and what already follows the `@` only seeds it. Closing it leaves
  the message and the caret as they were, and that `@` stays plain text
  until it is deleted.
- With no file search to offer (a server without --tools, or the tool
  turned off) the drawer stays shut, where a desktop's list says why.
- `/` still opens nothing on a phone, and a message that starts with one is
  plain text there, so an `@` in it works.
- The mention picker and the working directory picker ask the preferences
  store whether file search is on, instead of each working it out.

Assisted-by: Claude (Fable 5.2)
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-mention-drawer-mobile branch from 06cc705 to 72ae017 Compare November 16, 2026 16:50
@allozaur
allozaur changed the base branch from allozaur/refactor/ui-folders to master November 16, 2026 16:50
allozaur added a commit that referenced this pull request Nov 17, 2026
develop now holds the fork's stack as it is after the SvelteKit 3 upgrade:
the top of stack ggml-org#72 (#73, typed routes, on master with the move merged),
with the side branches merged in: MCP OAuth (#63), the models manager
(#38) and UI server storage (#39).

The merge takes the stack's files throughout. What develop carried beyond
the stack is left out for now: the mention drawer on phones (#49), the
Notebook page (#57), drag-and-drop import (#56), MCP resources in the @
picker (#19), the server's ASR transcription fixes and the reasoning level
shown as a word on the model selector. They were built on the stack before
SvelteKit 3 and stay in their own PRs and in develop's history.

Assisted-by: Claude (Opus 5.5 Medium)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant