Repository navigation
feat(mobile): match web styles for timeline items - #276
Merged
Merged
Conversation
Mobile threads and bot chats render every timeline item the way the web does: work rows with the shared tool registry, commands, diffs, reasoning, subagents, agent-bus calls with thread pills and cards, background tasks and notes, notices, turn origins and failures, folds with groups, and the bot chat layout with date, exchange, event and error lines. Labels, counts and layout rules move to @canopy/domain (tools, humanize, work-summary, turn-origin, status-look, format, questions, failure-presentation, first-line, bot-chat) and the web uses them from there. Toggling a fold, group or item by hand keeps its header in place on mobile (inverted list offset correction) and on the web (VirtualFeed.keep for readers following the end); a reader at the end stays there only for the last fold.
nixuuu
added a commit
that referenced
this pull request
Nov 7, 2026
Mobile live status labels faded as a whole, so "Working for …" pulsed instead of showing the web's moving highlight. A shared `LiveText` now sweeps a soft band from left to right for work headers, tool groups, thinking labels and bot status rows. The component uses clipped native text copies and Reanimated transforms on the UI thread. It matches the web's theme colours, 40/50/60% gradient stops on a 200% background, and linear 2-second cycle including the off-text pause. Shared motion tokens describe the sweep; web reads its unchanged duration through a named CSS token. Only the base text participates in layout and accessibility. Long labels retain one-line ellipsis. Reduced motion removes the highlight and cancels the loop, including live changes to the system setting. No native dependency or rebuild is required. Fixes: #276 Verification: - `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, mobile typecheck and `bunx expo lint`. - `bun run check:tmp`: 1751 passed, 161 skipped, 0 failed; no temp leftovers. - Web production build; Expo Doctor (20/20), clean CNG prebuild and Android/iOS JS exports. - Android Medium Phone and Fold: isolated PostgreSQL + gateway + scripted worker with a running turn; recorded light/dark sweeps and static reduced-motion text. Also checked short, typical and truncated long labels, tool groups and thinking labels on a temporary manual screen, then removed that screen. Verified motion resumes after re-enabling animations, including after launching with reduced motion enabled. - Web browser comparison at desktop and phone widths in both themes: computed 2s/linear timing, 200% background and matching theme gradient stops. No automated UI tests added. iOS limitation: the installed simulator app has a bundled JS build and did not load the current development bundle; native iOS rendering remains unverified. No Mac or store build was made. Cleanup: stopped the isolated stack, web server, Metro and reverse tunnel; removed device forwards, pairing credentials and generated native output; closed device/browser sessions while preserving the existing AVDs. Copy audit: no UI text changed.
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 19, 2026
## Changes Mobile threads show send progress in the existing send button. The work header carries the turn from “Starting” to “Working” in place. A slow confirmation shows a message above the composer without resizing the conversation. Web and desktop keep the send button width stable while its icon changes. Pending bot messages stay dimmed until confirmation on all clients. Delivery failures retain their visible “Not sent” label. Fixes: #276 ## Verification - Measured 0 px of vertical movement for the tested message and composer transitions on Android at 320 and 411 dp, in light and dark themes. - Checked the shared web and desktop components in Chromium at 390 and 1280 px in both themes. The work header, message bubbles and Steer button kept their positions across the tested transitions. - Mobile typecheck, lint on the edited mobile files, formatting and diff checks passed locally. The visual checks used locally controlled delivery states. Native iOS, a separate Electron window and a live gateway send were outside the local verification. Full repository checks run in CI. ## Copy audit Passed the §8 audit. Previously, “Starting” appeared twice and a temporary “Sending…” caption repeated the progress indicator. The work header now reports startup once. The send controls expose progress to assistive technology. Slow delivery and failure messages still explain their states. Checked short and multiline messages and the waiting notice with a long computer name.
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.
What
The mobile timeline (threads and bot chats) renders every item kind the way the web does. Shared labels and layout rules move from
apps/webinto@canopy/domain, and both clients use them. Folds, groups and items that the reader toggles by hand keep their header on screen, on mobile and on the web.packages/domain, the web now imports from here):tools: the tool registry, parsers, diff counts, agent-bus labels.work-summary: fold counts, group labels ("Read 1 file and ran 5 commands"), live hint.humanize,jsonreaders,turn-origin,status-look,format,questions,failure-presentation,first-lineandbot-chat(model,botEntries,layoutChat).src/features/timeline, replacing the oldui/timeline.tsx. It has one small view per item kind, the turn rows (start, input with its origin, steers, notices, end, footer), theWorkFold/WorkGroupheaders with the work rail, and the shared building blocks (Badge,StatusDot,Rule,Spinner,LiveText,SmallButton,ui/tone.ts). Bot chat usesChatTimeline,ChatRowsand a newChatBubble.ui/feed-anchor.tsx): the invertedFlatListgrows a row towards older content. The tapped header is measured before and after the change, and the list moves by the difference.VirtualFeed.keep(rowKey). While following the end, toggling any fold except the last one released the end and kept the header still.docs/mobile.md,docs/timeline-folding.md,docs/ui-api.md,docs/agent-bus.md.Inventory (web → mobile before this PR → now)
Notice"Sending to the current turn"StopBackgroundTask; "Open output" dialog stays web-only)Still different, and why
Verification
Web (Chromium, 412 px, light and dark): against a seeded throwaway gateway. Fold anchoring on the long history thread:
Android emulator
Medium_Phone_API_36.1: EAS development build from this branch, light and dark, every item kind, bus and background rows, bot chat. Fold anchoring in a long thread:Not checked:
Canopy_Fold(folded or unfolded): another agent's session was using it.sm:; not looked at on a wide screen.Emulator streaming caveat (also on
dev, not caused by this PR): in this setup,WatchThread/WatchOverviewthrough the Android pinned-fetch module never deliver a byte, both over the tailnet and throughadb reverse, with an older dev client and with a fresh EAS build of this branch. The server streams the snapshot within 17 ms to Node andcurl(HTTP/1.1 and HTTP/2), and the emulator's TCP connection acknowledges the bytes, so the stall is in the native or JS stream path on the device. To see the timeline, I routed the app through a local, uncommitted HTTP/1.1 shim. This needs its own look.Gates
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check,bunx expo lint,bun run check:tmp(1500 pass, 0 fail on the rebased tree), web build,expo export --platform android.Copy audit (docs/copy.md §8)
New or changed UI text is copied from the web unless noted: