Repository navigation
feat(mobile): show shell commands, queue states and files in threads - #231
Merged
Merged
Conversation
The timeline catches up with the web: work groups stay open while the agent works and fold after the turn, work rows use the work scale, shell turns get their card with exit status and output, and a leading ! puts the composer in shell mode. Queued turns say Starting once dispatched, a turn's files show as badges, finished subagents fold into one count, and a refused message shows the gateway's reason.
nixuuu
marked this pull request as ready for review
November 5, 2026 21:55
nixuuu
added a commit
that referenced
this pull request
Nov 7, 2026
Shell commands on mobile displayed their result card and duration but skipped the agent's reply. The shell-specific guard in `TimelineTurn` skipped the entire segment renderer, including its work header and answer. This behavior originated in #231; the shared answer/fold selection was already correct. Render shell turns through the normal segments after their input card. Completed work with no rows keeps its noninteractive “Worked for …” header, and the answer stays outside the fold. Turns with tools, live answers and interrupted/failed turns retain the existing shared fold rules; bot chats and exchanges use their separate chat layout. Remove the web shell card's “Full text the agent received” disclosure and its unused `text` prop at all three call sites. Mobile had no equivalent disclosure. “Show output” / “Hide output” and the input actually delivered to the agent are unchanged. Update the related UI/mobile documentation. ### Verification - Passed: `bun install`, `bun run gen:check`, `bun run typecheck` (including mobile), `bun run lint`, `bun run format:check`, and the web build. - Passed: mobile `bunx expo lint`, Expo Doctor (20/20), Android prebuild, and Android/iOS bundle exports. Existing work-fold tests: 8 passed, 56 assertions, covering final answers, tools, unphased streaming, manual fold state, steers and interrupted segments. No UI tests added. - Passed full test/temp-cleanup gate: `bun run check:tmp --timeout 30000` — 1727 passed, 161 skipped, 0 failed, exit 0, nothing left in the private temp directory. Used a worktree-local `TMPDIR` and `GIT_CEILING_DIRECTORIES=$PWD/.tmp` so temporary non-repositories cannot inherit the enclosing checkout's Git origin. The 30-second default accommodates local harness fixtures that can take over 5 seconds under machine load; test assertions and explicit test deadlines are unchanged. GitHub CI also passed all four test shards, static checks and builds. - Real browser against an isolated gateway, scripted worker and Postgres: light/dark at 1280×800 and 390×844; empty output, exit 128, short output and a six-line output; output expansion/collapse and visible answers; no removed disclosure or horizontal overflow. - Android verified through T3 device tools against the isolated gateway: fresh debug client built on Linux with private SDK/Gradle directories, SDK 37.0, arm64, two workers and a 2 GiB heap. Light/dark screenshots show the work header and agent reply; checked `ls` with no output, `git status` with exit 128, `echo` and six-line output expansion/collapse. Empty completed work headers are plain text, with answers visible below. The scripted agent echoes its received input, so the displayed replies are deterministic fixture text. The scratch app was uninstalled and the emulator retained; servers and generated native output were cleaned up. iOS was unavailable because another session owned it. ### Copy audit (§8) - “Full text the agent received” → removed from shell cards: eliminates the redundant raw harness-input disclosure. Existing “Show output” / “Hide output” remain verb-led, sentence-case actions. - Hidden mobile work/answer → existing “Worked for …” and agent answer: uses existing terms and adds no strings, errors, empty states, confirmations or “soul” copy. Status and exit codes remain textual cues. - Checked short, typical and long command/output text and a long thread title at desktop and phone widths in both themes. No new glossary terms or duplicated facts. Fixes: #231
nixuuu
added a commit
that referenced
this pull request
Nov 7, 2026
Replaces the overflowing mobile subagent chips with one compact summary row above the composer. Needs-input counts remain highlighted while typing. Expanding shows state, title, provider/model and the first plain-text line of the last message; finished subagents remain reachable in their disclosure group, and rows open their threads. The list uses a bounded overlay accordion (up to 240 dp, with internal scrolling) instead of a sheet. It keeps the keyboard and composer focus available and needs no additional sheet header or dismissal step. A permanent 44 dp summary slot keeps the composer measurement and feed reserve unchanged when agents start, finish or expand. Mention suggestions retain their existing overlay slot and temporarily take precedence. Expansion is collapsed by default and saved per device. Also restores start/end timestamps for provider/recovery-origin turns in the mobile snapshot reducer, including disk-cache replay. This fixes missing elapsed time in the work header; older data without timestamps says “Working” instead of “Working for” without a duration. Timers use tabular digits. Fixes: #231 Related: #332 ## Verification - Gates passed: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, web build, mobile typecheck and `bunx expo lint`. Expo Doctor: 20/20; iOS and Android bundle exports passed. Full `bun run check:tmp`: 1,755 passed, 161 skipped, 0 failed; no test temp entries left. Test temporary data stayed inside the worktree, with `GIT_CEILING_DIRECTORIES` to prevent nested test folders inheriting the checkout's Git repository. - Built an arm64 Android debug client on Linux with private SDK/Gradle, no daemon, two workers, in-process Kotlin and a 2 GiB Java heap. No EAS/store build or Mac build. - T3 manual checks on Android 16: Medium Phone and a temporary copy of the busy Canopy Fold profile; light/dark, keyboard open/closed, long titles, one/many subagents, finished disclosure, row navigation, typing mode, saved expansion after app restart, and system animations disabled. Isolated gateway, scripted worker and Postgres provided two working + one waiting + two finished subagents. A live provider-origin turn displayed its elapsed time alongside “Wait threads…”. - Dynamic 0 → 1 → finished on Fold kept the composer field at y=1697 and the feed work header at y=1236. Compared the existing web panel in T3 preview at desktop and phone widths, light/dark. No UI tests added. iOS UI remains unverified: installed clients could not load this JS (the development launcher rejected Metro through ATS); no Mac rebuild attempted. ## Componentize and motion pass Completed before commit using the `design`, `componentize` and `transitions-dev` skills. Composer and thread details share `SubagentLineage`, `SubagentLineageRow` and `SubagentGroup`; web/mobile share grouping and status presentation in `@canopy/domain/subagents`. Native components accept `style`, use existing type/color tokens, and keep spacing at the call site. Existing `pop`, `Expand` and chevron motion tokens are reused; panel/group expansion is immediate with reduced motion. ## Copy audit (§8) - Individual truncated chips → “Subagents · N running · N finished” plus “N needs/need input”: one scannable line, explicit counts and singular/plural agreement; attention has a text cue as well as color. - Sparse lineage rows → existing web labels “Working”, “Waiting for an answer”, “Completed”, “Failed”, “Interrupted”, “N finished” and “Previous subagents”, with provider/model and message context. Existing “Working on it…” / “No message yet” cover missing previews. No new glossary terms. - “Working for” with no duration → “Working” only when no timestamp exists; timed work keeps “Working for 2m 0s”. No invented elapsed time. - Checked sentence case, punctuation, concise labels, accessible disclosure state and short/long titles. Disclosure labels name their contents, consistent with web. No new error, confirmation, empty-state action, humor or repeated explanatory text.
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.
Stage 5 of 5, mobile UX: catch up with recent web features in the thread view.
Done
workscale; commands in monospace.!mode in the composer (feat(threads): add shell input to thread composers #194).Deferred
LinkedComputerSnapshotmerging).Checked on the Android emulator, light and dark.
check:tmp: 1425 passed, 0 failed.expo lintandtscare clean.Copy audit (§8):