MalloryEstate Briefing
M·002Approved
← All briefings

Foundations & UI

Continue Flow & Fixes

On-device follow-up to Wave A: make loop-resume voice-first with a context chip, lift the composer clear of the soft keyboard, and always land the chat at the true bottom.

Dated 2026-06-08Programme Foundations & UI

Situation

Wave A's loop-resume seeded the text box and focused it, which opens the keyboard — the wrong default for an app built voice-first. Voice replies also sent the transcription alone, so M had no signal about which thread was being resumed.

Two more on-device papercuts rode along: the soft keyboard painted over the composer (no windowSoftInputMode set against edge-to-edge drawing), and cold loads / app-resume often didn't scroll all the way to the true bottom of the chat.

Key decisions

Continue starts listening, not typing

continueThread(t) sets pendingThread and calls toggleMic() synchronously (no await first) so mic permission inherits the tap's user-activation — no seeded text, no focus.

Context chip carries thread identity

A dismissable Continuing: <title> ✕ chip renders above the composer while pendingThread is set; on send the message is prefixed [Re: <title>] through both voice and typed paths, then cleared.

Typing stays available

Tapping the mic stops listening and reveals the text field; the chip persists so context still applies to a typed message.

IME insets via adjustResize

windowSoftInputMode="adjustResize" plus extending the existing inset listener to read ime() — WebView padding shrinks above the keyboard, --safe-bottom drops to 0 while it's open.

Instant scroll first, smooth scroll for streaming

scrollToEnd(false) runs on mount plus a requestAnimationFrame re-pin, and a visibilitychange listener re-pins on foreground resume; streaming replies keep the smooth scroll.

Risks & guardrails

User-activation for getUserMedia

Calling toggleMic() synchronously in the tap handler (no intervening await) preserves the transient activation the mic permission needs.

Cold-load layout settling

The old smooth scroll on onMount often missed the true bottom because fonts/layout were still settling; the instant scroll + rAF re-pin fixes this without waiting on layout.

Delivery

Task 1

Voice-first Continue + context chip (web).

Task 2

Lift the composer above the soft keyboard (native IME inset handling).

Task 3

Chat starts at the bottom on load & resume (web).

Final

Deploy + reinstall, then on-device verification of all three.

Out of scope

Backend per-thread turn scoping (rejected — recall already gives M thread awareness; the `[Re: <title>]` prefix suffices)
spec · docs/superpowers/specs/2026-06-08-continue-flow-and-fixes-design.md
plan · docs/superpowers/plans/2026-06-08-continue-flow-and-fixes.md
Mallory · Estate briefing