Repository navigation
feat(mobile): list trigger characters in the empty composer - #242
Merged
Merged
Conversation
Thread and new-thread composers show a second placeholder line with what each trigger character does, as on the web: / commands, $ skills, @ files, # threads and ! shell. No-break spaces keep each item on one line when it wraps. Bot chats and compact composers keep one line.
nixuuu
added a commit
that referenced
this pull request
Nov 7, 2026
## Change Keep the mobile thread composer's trigger hint on one line in both compact and expanded states. Previously, expansion replaced `Ask anything…` with a two-line placeholder after the animation, causing a second layout change. The hint now renders outside the native multiline input's content measurement and truncates with a tail ellipsis. Composers without triggers retain their existing placeholder; web copy is unchanged. Route every mobile editable field through a shared `ui/TextInput`. On iOS it clears inherited `lineHeight`, letting UIKit use the font's native metrics for placeholders and typed text. Android receives the original styles. This covers sidebar thread search, project picker search, settings search, kit fields, project settings, queued-message editing and the composer. The pinned React Native iOS implementation applies explicit line heights as paragraph attributes. Ordinary attributed text receives `RCTApplyBaselineOffset`, while TextInput's default typing/placeholder attributes come directly from `RCTNSTextAttributesFromTextAttributes`. The shared 16/24 typography therefore pushed input glyphs down. This predates the recent composer animation changes. Related: #242, #308 ## Verification - GitHub CI at handoff: all nine checks passed, including all four test shards, static checks, typecheck and builds. - Passed: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, web production build, mobile typecheck, `bunx expo lint`, Expo Doctor (20/20), Android native debug build, and iOS/Android production JS exports. - Full `bun run check:tmp --timeout 30000`: **not green** — 1,712 passed, 161 skipped, one setup-hook timeout in `worker-host.test.ts` and one associated HTTP/2 GOAWAY error (1,874 tests / 309 files). The temp-directory gate reported nothing left. The isolated `check:tmp tests/integration/worker-host.test.ts --timeout 30000` rerun passed all 15 tests and temp cleanup. An earlier run encountered six cascading config-sync recovery failures and exited 143 before completion; the isolated recovery file then passed all six tests. No gateway/worker code was changed. - Android: built locally with a private SDK/Gradle and installed on a temporary phone emulator and the existing Fold (private package on Fold, preserving its installed app). A temporary inspection route mounted the real composer, fold/scroll hooks and input components. Checked light/dark, phone/Fold, 280 dp truncation, compact/expanded transitions, focused writing mode with controls hidden, single/multiline drafts and the bot placeholder. Recording frames confirm one hint line throughout expansion with no delayed height jump. Checked bare thread search, settings search, project picker search, single/multiline kit fields and settings inputs with short, typical and long text. This verifies components in an offline inspection screen, not paired gateway navigation. - iOS: an iPhone simulator probe mounted the actual shared wrapper beside native inputs using the same Inter font and 16/24 typography. Checked light/dark, empty placeholders, typed single-line text and three-line drafts. The shared style moved glyphs up about 5–6 pt relative to their field borders, with no clipping. **Full iOS composer transitions and the actual sidebar/project/settings screen contexts remain unverified.** The existing dev client lacks `CanopyPinnedFetch`; private native preparation brought available disk below the required 12 GiB, so no Xcode build was started. The probe avoided transport imports. Source inspection supports the shared fix, but does not replace full iOS app verification. - No permanent UI tests or inspection routes were added. Temporary apps/AVD, native build output, private toolchains, Metro and forwarding processes were cleaned up. Inline self-review covered input/ref forwarding, all native input import sites, Android style preservation, accessibility, truncation and composer sizing. ## Copy audit (§8) - Before → after: mobile `Ask anything…` plus a second trigger line → only `/ commands · $ skills · @ files · # threads · ! shell`, identical in compact/expanded states. Removes redundant prompt copy and the late line-count change; documented in §4.9. No-trigger and web placeholders keep their existing wording. - §8.1–2: existing short trigger labels, punctuation, glossary and NBSP item grouping retained; no new terms. - §8.3–5,7–8: no changed actions, confirmations, errors, empty-state messages, dependency messages or humour. - §8.6,10: no duplicate visible prompt; the field keeps its accessible label and exposes the full hint as an accessibility hint. Meaning does not depend on colour, icon shape or position. - §8.9: Android phone, 280 dp and Fold width checked with short, typical and long text; desktop/web unchanged. iOS scope and remaining visual gaps are stated above.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mobile thread and new-thread composers now show the same trigger hint as the web (#235): a second placeholder line
/ commands · $ skills · @ files · # threads · ! shell. Mobile has had mentions since #239.Change (
apps/mobile/src/features/threads/ComposerBox.tsx)triggersprop. With it, and when not compact, the placeholder gets the hint as a second line.#fromthreads.MessageComposerandNewThreadScreenpasstriggers. Bot chats and compact composers keep one line.Checked:
typecheck,lint,format:check,expo lint. The device check is on a preview APK on a Galaxy Z Fold, folded and unfolded.Copy audit (§8): same text as the web hint (#235), with the same glossary words as the mention popup and no instruction verbs.