Repository navigation
fix(threads): keep finished subagents reachable - #332
Merged
Merged
Conversation
Keep completed, failed and interrupted subagents accessible from parent details and the mobile subagent sheet. Verify owner follow-ups retain the child worker and provider session. Related: #322
nixuuu
force-pushed
the
fix/finished-subagents-reachable
branch
from
November 7, 2026 10:14
4c3f185 to
241918e
Compare
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.
Finished subagents disappear from thread details when the default display setting is off. After the sidebar stopped listing subagents, this left no route to their history or composer.
Web (including desktop) and mobile now keep them under an expandable “N finished” group. It starts collapsed and remembers its state on the device. Each row opens the thread and shows its provider, title, outcome and relative activity time. The mobile composer chip opens the same list in a sheet. Keeping finished subagents in the main list remains available in Settings.
Owner follow-ups already work for completed, failed and interrupted subagents: the gateway preserves the child's worker and provider session. No gateway permission or lifecycle changes are needed. Explicitly archived threads remain readable and require Unarchive before a follow-up, preserving the existing archive behavior that stops work and schedules. The parent-origin link is unchanged.
Related: #322
Verification
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check, web build, mobile typecheck andbunx expo lint.bun run check:tmppassed before rebase (1676 pass, 161 skip, 0 fail). After rebase: 1675 pass, 161 skip, 1 timeout in the existingCODEX routine and wakeup use the harness and preserve visibilitytest (5 s limit); that entire file then passed in isolation (11/11). Focused follow-up and Full access coverage passes after rebase (7/7). Every run cleaned its test temp directory. Scratch data stays under the worktree;GIT_CEILING_DIRECTORIESprevents temporary project fixtures from inheriting the enclosing worktree's remote.Cannot find native module 'CanopyPinnedFetch'; native UI remains unverified. No native builds or temporary AVDs were created. Owned tabs, device panels, servers, tunnel and containers were cleaned up.Componentize pass
Applied
design,componentizeandtransitions-devguidance using existing kit components. Web sharesSubagentListandLineageRow; mobile sharesSubagentLineageand its row between thread details andSubagentSheet. State classification and the existing compact age formatter live in the shared domain package. Native rows usenow/5m/3h, avoiding Hermes's unsupportedIntl.RelativeTimeFormat; web keeps its existing relative-time formatter. The final pass removed repeated list markup and kept provider/navigation icons in fixed slots with truncating titles.Copy audit (§8)
Audited all ten items: concise active English and glossary terms; action labels unchanged; no new errors or empty-state copy; no duplicated explanatory facts, optional-gap messages or “soul” text; no meaning conveyed by color/icon alone. Short, typical and long titles were checked at desktop and phone widths in the browser. Native copy/layout checks share the device limitation above.