Repository navigation
feat(threads): separate tool activity and thoughts from agent text - #473
Merged
Merged
Conversation
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
…#482) Cleanup previews could reuse Git output cached for one second by the process governor, showing a dirty checkout immediately after external changes were removed, or a clean checkout immediately after files were added. `ScanWorktrees` now uses the existing `freshGit` boundary while preserving process admission, background priority and removal safety checks. The automation test warms the scan, changes files outside Canopy, and asserts immediate dirty → clean → dirty → clean results before cleanup. The worktree documentation describes this freshness guarantee. The worktree fixture also waited only for `thread.status === idle`. `threadReady` can set that before the automation turn or its command has settled. It now waits for the worktree's actual busy state before deleting or archiving; preview assertions immediately after delete/settings changes remain direct assertions, without retries. A controlled delayed-ack run reproduced the original refusal with clean Git state, a cancelled turn and a pending `startTurn`. The original CI log reports only `wouldRemove`, so it cannot distinguish that refusal from stale scan state. The desktop/phone CI failure in run 42786085102, attempt 1, rejected a valid transient `syncing` update after both clients' items and turns already matched. The test now waits for completion of the specific reply turn and convergence after recovery, with 100 ms revision probes exercising resubscriptions. Local baseline runs exposed another fixture race: after the parent interruption, its queued question turn could start while `holdTurns` was still enabled and block the final reply forever. Releasing the hold before ending the parent, then observing the question turn complete, removes that race. A controlled run reproduced the stuck interaction turn and queued final message. No production subscription behavior changes. Validation: | Separate sequential file runs | Before | After | | --- | --- | --- | | `worktree-automation.test.ts` | 28 passed / 2 failed | 30 passed / 0 failed | | `thread-multiclient.test.ts` | 29 passed / 1 failed | 30 passed / 0 failed | Each file ran 30 times before and after, one file at a time. All 30 final phone runs exercised revision resubscription. The local baseline phone failure was the held-question timeout, distinct from CI's invalid no-syncing assertion. An intermediate readiness-only revision failed 8/8 worktree runs and exposed the cached Git result; those failures are excluded from the final counts. `bun install`, `bun run typecheck`, `bun run lint`, `bun run format:check`, and `git diff --check` passed. Verification was scoped to the requested integration files and static checks under the supplied execution limits; the full suite, generation check and web build were not run. Scratch logs and fault-injection diagnostics remain outside the repository and are not committed. No schema, proto, UI copy or UI test changes; copy audit is not applicable. Fixes: #124 Related: #473, #478
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
Expanded tool details previously appeared as disconnected boxes below their tinted trigger. Put the rail and neutral surface around the trigger and body, with a consistent inner inset. Tool groups continue that surface across independently virtualized rows; their children use indentation rather than additional activity boxes. Thoughts use a quieter attached surface, and failed activity keeps its neutral background. Individual web disclosures animate a grid track from `0fr` to `1fr` using the existing motion tokens, with matching corner transitions and immediate reduced-motion behavior. Group row entrances retain their final measured heights to preserve virtual-feed anchoring. Closed details still unmount; existing keys, remembered expansion and row memoization are preserved. Expanded commands expose the full command, including long single-line commands, in a contained scroll area. Mobile mirrors the structure using JavaScript-only changes and retains its anchored toggles. Fixes: #473 Validation: - `bun install --frozen-lockfile`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, and the web build. - Existing pure domain unit tests: `bun test apps/web/test/work-fold-state.test.ts`. No UI tests added or run; the full integration/temp-cleanup suite remains a CI gate. - Real browser, isolated fixture server: light/dark; desktop (1280 px), narrow (768 px), phone (390 px), and 320 px. Covered long commands/output, a five-command group plus an edit with nested expansion, failure, thoughts, and streaming output. Header/body seams measured 0 px, horizontal overflow remained inside code blocks, and the streaming header moved 0 px while unaffected row elements stayed mounted. Before/after screenshots saved outside the repository; temporary fixture and shell changes removed. - Production fingerprints generated before/after with `[email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive`: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`, both unchanged. Native device visuals were not checked. Copy audit: no copy changes.
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 28, 2026
The native thread timeline placed tool group labels slightly above the center of their card. The group header now centers its label, chevron, tool icon and status together. It uses the secondary work text size of 13 dp and a 40 dp visible row inside a 44 dp touch target. ## Verification - Compared the previous and updated components on an Android emulator. Checked light and dark themes, a running group with a hint and count, and a long mixed group with a failure count. - Expanded the group by tapping just outside its visible background. Collapsing it hid the child rows again. - Mobile TypeScript and lint on the edited files passed locally. Repository-wide checks run in CI. Fixes: #473
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.
Agent commentary, tool summaries and thoughts currently blend into one column. This change gives web/desktop and mobile the same hierarchy: ordinary message typography for agent prose, quiet neutral activity rows with kind icons, and bulb-marked thoughts with italic one-line previews. Final answers retain their separate slot below the work fold.
Design rationale
Group label, icon, priority status and its exact item count share one traversal. The badge counts only items with the highest-priority status (failed, declined, interrupted, running); other statuses remain visible in the expanded rows. Web uses
1 failedon desktop and icon + count on phones. Native mobile uses icon + count with an explicit full accessibility label. The phone slot is 40px instead of 96px on web / 104px on native, leaving more room for summaries. The desktop badge now shares the summary's line box.Row keys, shallow row reuse, fold state, anchoring and motion tokens are preserved. No new delta subscription or fold-wide rendering path is introduced. Header insets and group status slots remain stable as work completes.
Validation
bun run gen:check,bun run typecheck,bun run lint,bun run format:check, web production build andgit diff --check.6ddec9ef559ee0095ac33e94ff9418a942053b17; Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9. Mobile changes are JS/TS only. Native simulator visual verification was not performed; phone browser screenshots cover the web layout.check:tmpis left to CI as requested. Browser checks use synthetic data with the real timeline components and state-update path, without a live gateway. The build reports the existing large-chunk advisory.Review follow-up: checked the revised rows in light/dark at 1280px, 390px and 320px. At desktop, summary and badge centres both measure 416px (20px line boxes). At 320px they also share a centre; summaries truncate cleanly. The timeline rows do not overflow; the synthetic dev toolbar's benchmark controls extend 12px beyond the 320px document, outside the timeline. Repeated open/close checks on desktop and phone settled at exactly 90°/0°, with zero remaining chevron animations. A stuck intermediate rotation was not reproduced; replacement captures use the settled state. Manually checked shared summary data for one/two failures, five interruptions and all-completed groups. Native simulator verification remains unperformed.
Copy audit — docs/copy.md §8
Before → after: group-wide
Failed/Declined/Interrupted→ exact count such as1 failed,1 declined,1 interrupted. These lower-case count phrases use existing glossary terms and describe only the affected items. On phones the word is visually hidden, retained for screen readers and in the full status tooltip; native group accessibility labels include the count and state explicitly.Thinking/Thought, activity summaries and individual-item labels are unchanged. No new actions, error instructions, empty states or decorative copy. Short, typical and long previews/summaries were checked at desktop, 390px and 320px; long previews truncate.Local review artifacts (not committed)
All files are in
/var/tmp/canopy-timeline-contrast/on the implementation machine:/var/tmp/canopy-timeline-contrast/review.html.before-desktop-light.png,before-desktop-dark.png,before-phone-light.png,before-phone-dark.png.after-desktop-light.png,after-desktop-dark.png,after-phone-light.png,after-phone-dark.png,after-phone-320-light.png,after-phone-320-dark.png. Expanded-detail images from the initial implementation are retained asafter-expanded-desktop-light.png,after-expanded-phone-light.png,after-expanded-phone-dark.png.variant-a-icons-light.png,variant-a-icons-dark.png,variant-b-pills-light.png,variant-b-pills-dark.png,variant-c-rail-light.png,variant-c-rail-dark.png.streaming-desktop-dark.png,streaming-completed-desktop-dark.png,subagent-bus-background-light.png,subagent-bus-background-dark.png,quotes-desktop-dark.png. Fingerprint JSON and check logs are alongside the images.