Skip to content

Composer v2 on both phones: one line, send circle, controls in the title bar, a welcome for new threads - #49

Merged
TheAnimatrix merged 2 commits into
mainfrom
mousse/one-line-composer-v2
Dec 1, 2026
Merged

TheAnimatrix merged 2 commits into
mainfrom
mousse/one-line-composer-v2

Conversation

@TheAnimatrix

Copy link
Copy Markdown
Collaborator

The owner's feedback on the 0.1.3 composer, on both phones, built as library components on the design tokens.

What changes

  • One line. The row of chips under the field is gone (model, effort, access and /). The field grows only with what is typed, up to six lines.
  • Send circle outside the field, WhatsApp style, 48dp. It shows:
    • the send arrow (quiet when there is nothing to send);
    • the purple stop square while a turn runs and the field is empty;
    • Done while dictating.
  • The mic stays in the field, not in the circle, so you can dictate during a run and the circle never means three things.
  • Icons in the field: emoji at the start, then the text, then the paperclip and the mic.
    • Emoji and the paperclip swapped places.
    • The gap from the last icon to the circle is 2dp tighter (17dp, was 19dp).
  • Emoji and the mic step aside for text. Once the keyboard is up and the first letter is typed, they slide right and fade (180 ms, ease-out). They come back when the field is emptied. With reduced motion they change at once.
  • Thread controls move to the title bar.
    • A button with the thread's provider mark, next to Files, opens one sheet.
    • The sheet has collapsible rows for Model (search, recent, provider groups), Effort and Access. Each row shows its current value, and a pick applies at once.
    • Access has no text near the composer. Full access shows a small warning shield on the title-bar button.
    • Bot chats get no button: the bot's settings stay in its panel.
  • / and @ by typing only, with desktop's rules:
    • / at the start lists commands and skills.
    • / after a space or a line break lists skills.
    • @ after a space lists skills and files. In a bot chat it lists the owner's other bots on that computer, with their faces.
    • The lists read up to the caret on Android, and close on a space, Back or Escape.
    • A tagged bot goes out exactly as desktop sends it, [@Name](mousse://bot/<id>) in the text, and the owner's bubble shows @Name.
  • New empty thread:
    • Desktop's animated Mousse mark, drawn natively: it traces itself in, the swirl sways in desktop's 9 s loop, and liquid rises with the draft.
    • Desktop's welcome line: time of day, picked by thread id with desktop's hash. Desktop doesn't use the person's name, so neither does the phone.
    • Model, effort and access inline. They move to the title bar once the thread has messages.
  • Voice wave:
    • It takes the recognizer's real levels through a LevelMeter: 45 ms attack, 160 ms decay, 220 ms peak fade.
    • It is drawn every display frame from a frame clock. Compose never recomposes it, and SwiftUI draws it in a TimelineView with a Canvas.
  • Core: composer_text.rs has the shared rules:
    • welcome_line;
    • skill_slash_query;
    • replace_token_at_caret;
    • taggable_bots;
    • bot_tag, bot_mention, expand_bot_mentions and plain_bot_tags.
  • Tokens:
    • The composer radius goes from 18 to 24 (a pill).
    • New tokens: sendCircle 48 and composerGap 4.
    • Desktop's outline logo is in design/mousse-logo-outline.svg, generated into MousseLogo for both phones.

Android: idle, typing (emoji and mic stepped aside), emptied

Android welcome Android controls sheet, Model open iOS welcome (light)
Android welcome Controls sheet iOS welcome

Android: Stop while running, and listening with Done in the circle
Android: / at the start, / mid-message (skills), @ in a bot chat, the sent tag shown as @Plusie
iOS: idle, typing, listening, controls (Effort open), @ in a bot chat

./07-android-tuck.mp4

The wave, before and after

6 s of demo dictation with words streaming in, on the Mac's Android emulator (API 35, host GPU). dumpsys gfxinfo framestats, last 120 frames:

Frames drawn UI thread per frame (p50 / p90 / p99) Composition + animation (p50 / p99) Measure and layout (p50)
main 9.9 fps (one step per 100 ms tick) 3.3 / 11.4 / 29.5 ms 2.4 / 24.8 ms 0.08 ms
this PR 60.5 fps 1.2 / 2.5 / 5.2 ms 0.5 / 2.4 ms 0.05 ms

On the Windows emulator (software GPU, shared with other emulators) the same run drew 30 fps, limited by the GPU, with the UI thread at 2.5 ms p50. That compares with 9.8 fps on main. Real phones were not measured.

Verification

Tier 4 (core and both apps).

  • Rust:
    • cargo fmt --all -- --check
    • cargo clippy --locked --all-targets --all-features: no warnings in the new module.
    • cargo test --locked --lib composer_text: 8 passed. They check the hash against desktop's own hashSeed run in Node, the hour buckets, the mid-message /, the pick edit, bot ranking, the tag format, expanding tags and plain tags.
  • Android unit tests: scripts\android.ps1 test: 20 passed, including the new LevelMeterTest (4).
    • Must-fail control: with smoothing removed (attack 0.00001 s), aReportRisesOverAFewFramesInsteadOfJumping fails. Restored, it passes.
  • Tokens: python scripts/generate-mobile-tokens.py --check
  • Android demo walk on an emulator, dark:
    • the welcome, then the composer idle, typing (recorded), emptied, Stop and listening;
    • the controls sheet with Model and Access open, and Model open inline on the welcome;
    • / at the start, / mid-message, Back, and @ in a thread;
    • @ in a bot chat, a pick, and Send.
    • The demo's send log shows the wire form: ping [@Plusie](mousse://bot/b-plusie) about the notes.
  • iOS: MOUSSE_IOS_DEMO=1 scripts/build-ios.sh --debug-simulator on the Mac. Then scripts/ui-loop.sh ios --device <iPhone 17 Pro> walked the same screens in light and dark, plus the gallery's composer and dictation.
  • New UI-loop entries:
    • thread-empty (recorded) and welcome-model;
    • composer-idle and composer-keyboard (with the tuck recorded);
    • controls, controls-model, controls-effort and controls-access;
    • slash-skills;
    • composer-listening (with the wave recorded);
    • bot-mention.
  • Not tested:
    • real phones;
    • real speech;
    • frame times on a device;
    • TalkBack and VoiceOver;
    • large text on iOS;
    • typing in landscape again.

@: what desktop offers and the gaps

  • Threads: desktop and the phone both offer skills and files.
    • Gap: desktop sends a picked file as a reference chip, [file: name] plus a [Mousse references …] block. The phone writes @path as plain text, as before. orchestrator.send has no references field.
  • Bot chats: desktop offers the owner's other bots. The phone now does too, and sends the same tag.
    • Gap: in a local bot chat, desktop also offers bots of the owner's other computers, with node-qualified ids. The phone offers the chat's own computer's bots. The chat view carries only its bot, so the phone reads the computer's bot list once @ is typed.
    • Gap: desktop filters out offline bots. The phone's bot rows have no online flag.
  • Neither side offers threads or people under @.
  • Bot chat / commands (/clear, /status and the rest) are still desktop-only. Devices can't read that list.

Notes

  • adb's first injected letter doubles in the field on the emulator. Main does it too ("llooks good"), so this PR doesn't cause it.
  • On Android, Back first hides the keyboard (the system does that). A second Back closes an open list.
  • iOS reads / and @ at the end of the text, because SwiftUI's field doesn't give the caret.
  • Coordination: M20 (attachments, reactions, replies) puts its reply bar and picture previews in the composer's unchanged top slot. Whichever PR merges second rebases.

No issue

07-android-tuck.mp4

@TheAnimatrix
TheAnimatrix force-pushed the mousse/one-line-composer-v2 branch 2 times, most recently from 68f5990 to 194a820 Compare December 1, 2026 06:25
@TheAnimatrix
TheAnimatrix force-pushed the mousse/one-line-composer-v2 branch from 194a820 to e45a86f Compare December 1, 2026 06:42
@TheAnimatrix
TheAnimatrix merged commit 72e6567 into main Dec 1, 2026
3 checks passed
@TheAnimatrix
TheAnimatrix deleted the mousse/one-line-composer-v2 branch December 1, 2026 06:52
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