GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(site): add the collapse assistant steps chat preference by ibetitsmike · Pull Request #29115 · coder/coder Conversation
|
| Scenario | Result | Evidence |
|---|---|---|
| Live turn: no Thinking row or reasoning disclosure outside the fold from the first fold to the answer | PASS | Rounds 4 to 7: 0 escapes over 104 to 206 samples per turn; only pre-tool narration and the answer itself appeared outside |
| Live label monotonic across step persists; final "Worked for Ns (k steps)" with k = tool calls | PASS | "Working for 0s" to "18s" with no reset, then "Worked for 17s (3 steps)" (rounds 6 and 7); the completed label ends 1s to 2s below the last live tick |
| Live timer ticks between steps; completes to a fixed label; expansion kept | PASS | sleep 25: "Working for 1s to 8s", then "Worked for 25s (1 step)", DONE outside, aria-expanded retained (round 3) |
| Reload mid-tool restores elapsed time from the call part, not the reload; live state still folded after reload | PASS | Restored "Working for 13s" against 12.82s since the persisted call part (round 3); reload mid-turn kept the fold (round 4) |
| Cold load with the preference on: skeleton until the preference resolves, first frame already folded | PASS | Preference GET held 3s; skeleton in the recording, zero ungrouped tool rows across 47 frames (round 3) |
| Older pages prepended into an expanded partial fold keep the reading position, including the last page that also loads the prompt row | PASS | Round 7, wheel to the top before each page: in-block page 24 to 49 steps, anchor top 192 to 192 (0px), scrollTop 0 to 800; final page 49 to 65 steps plus the prompt row, anchor 192 to 192 (0px), scrollTop 0 to 781 (602 block growth + 171 prompt), same block element, still expanded. Round 6 measured the final page at +602px before the fix |
| Partial fold keeps its element and expansion across prepends; lower-bound labels | PASS | Same disclosure through 24, 49, 65 steps: "at least 41s (24 steps or more)" to "Worked for 2m 19s (65 steps)" with "1 failed step" (rounds 3, 6, 7) |
Command then ask_user_question in one turn |
PASS | Preceding steps read "Worked for 29s (5 steps)", question outside the fold, answered, later command folded (round 3) |
| Preference GET 500 | PASS | Red "Failed to load your collapse assistant steps preference." with the switch disabled (round 3) |
| Regressions: no-tool answers, single step, failed-step badge, keyboard Enter/Space, preference off | PASS | 63d99ee and round 3 smoke |
| Interim answer splitting a turn | NOT TESTED | The model never produced a message-ending interim answer; covered by unit tests and stories only |
| Live partial fold label ("Working for at least") | NOT TESTED live | Completed lower-bound labels verified; covered by stories and a Vitest test |
| Cross-tab preference change applied to an open chat | ACCEPTED | Requires a reload; refetchOnWindowFocus is off app-wide, same as the other display preferences |
Client-executed tool parked in requires_action |
NOT REACHABLE from the web UI | Covered by a unit test and a story |
Sanitized evidence (screenshots, recordings, sampler JSON, raw API responses, harnesses) is attached to the dogfood chat https://dogfood.cdr.dev/agents/385f856b-7742-4d75-af8c-f94e2a0df558 as r4-uat-archive.tar.gz, r3-uat-archive.tar.gz and r2-final-evidence-archive.tar.gz; rounds 5 to 7 wrote their measurements to the UAT workspace (/home/coder/uat-r5 to uat-r7) because the chat's attachment slots are exhausted.
The UAT commits above belong to the pre-split branch. Review fixes since then changed runtime code on every frontend layer (see the review record), so remote UAT has not exercised the current heads.
ON CONFLICT cast claim refuted by the passing Postgres-backed toggle test).frontend-review checklist (FE1 to FE10) and the vercel-react-best-practices rules were run over the composed site/src diff. Fixed: aria-expanded and DOM-node identity assertions in ConversationTimeline.test.tsx replaced by focus retention across the rerender, with the duplicate keyboard-toggle test and the screenshot-only default-collapsed and preference-restore tests removed (feat(site): fold assistant steps in the conversation timeline #29419, fix(site): keep streaming text alive inside expanded working blocks #29420); toBeChecked/toBeDisabled outcomes dropped from CollapseAssistantStepsSettings.test.tsx in favor of the paired stories (this PR); a three-pass map().filter().map() collapsed into one flatMap (feat(site): fold assistant steps in the conversation timeline #29419); the Paginated story now ends in the partial state it exists to capture (feat(site): fold assistant steps in the conversation timeline #29419). Judged compliant and left as is: the settings toggle uses aria-label alone like eight of its nine sibling toggles (FE6), and groupWorkingBlocks in the render body relies on the React Compiler, which this page already uses instead of manual memoization (rerender-memo).site/src diff and returned 45 findings. 38 were fixed on their owning PRs (feat(site): group assistant steps into working blocks #29417 4d05139, feat(site): add the working block disclosure #29418 b421c87, feat(site): fold assistant steps in the conversation timeline #29419 d0105de, fix(site): keep streaming text alive inside expanded working blocks #29420 f46888b, this PR 73d573c): the story-only now clock prop was removed in favour of the pinned fixture clock, the renderRow and renderLoadingView render helpers were replaced (row contents built once and placed; one loading-view props object), the live item-key reconciliation and expansion bookkeeping moved into pure helpers behind a small hook, stateful story wrappers became one-state static stories, the unread createdAt stream fields, rowKey, the binary search, and the unreachable NaN branch were deleted, isStepRow became getStepRowContent, chatStatus is required, fixtures are shared Mock* constants, comments were trimmed or corrected, and the settings switch gained aria-describedby plus copy in the setting's own vocabulary. The composed site/ diff shrank from +3250/-86 to +2889/-73. Declined with rationale: DF5 (the page-level preference gate was requested by Codex round 4 to avoid an unfolded-then-fold first paint; it lifts on error and the ColdLoadWaitsForCollapsePreference story captures it), RO1 (no existing formatter produces 12s / 2m 14s / 1h 5m, and extending the debug-panel formatter would couple unrelated features), RO3 and SA2 wrapper extraction (the two other dim sites are pre-existing ChatMessageItem markup; the block item now carries the same classes including the transition), RO3 and RO4 nits (scroller decorator shared by two story files; formatWorkingDuration stays beside the span computation it formats and its unit test). The PreferenceChanges story was dropped rather than moved to Vitest: its final frame is the expanded block already captured, and the expansion map trivially survives a preference flip. A second pass of all eight roles on the fixed diff returned PASS on every checkpoint except two comment placements (fixed: the live item-key reconciliation now owns its doc in liveBlockItemKeys.ts, the expansion recording scheme is documented on recordBlockExpansion) and two nits left as is (RP6 extract a WorkingBlockItem component from a 25-line map branch; DF5 bound the preference gate against a never-settling request, which matches how the pre-existing chat and messages gate already behaves). Codex on the first fixed heads: OK on feat(site): add the working block disclosure #29418 (d489115) and fix(site): keep streaming text alive inside expanded working blocks #29420 (9c3cddb); findings fixed on the rest: P2 hidden user-message boundaries in grouping (feat(site): group assistant steps into working blocks #29417, 2e43056, red-green tests), P1 expanded editing capture (feat(site): fold assistant steps in the conversation timeline #29419, 34a125b), P1 rendered-state waits in the settings test (this PR, 1b6348e). Open human threads answered with fix commits: failed-step badge accessible-name separator (jscottmiller, feat(site): add the working block disclosure #29418), observeContent, LiveLabelProps, stepsLabel, shared MockWorkingBlock, live clock path, memberIds producer assertions (DanielleMaywood, feat(site): add the working block disclosure #29418), and the startedAt doc (feat(site): group assistant steps into working blocks #29417); the feat: add a collapse_assistant_steps user preference #29416 SQL cast P1 was refuted with the Postgres-backed toggle test and resolved. Codex round on the second heads (12:26Z): OK on feat(site): add the working block disclosure #29418 (e1e8afe) and this PR (1b6348e); on feat(site): group assistant steps into working blocks #29417 two follow-on P2s fixed (merged read_file rows now split at a hidden prompt, and a block whose page starts with a hidden prompt is not partial, 4d05139, red-green) and one declined (span cap at raw user IDs is unreachable: hidden timestamped entries are tool results that follow their call's row); on feat(site): fold assistant steps in the conversation timeline #29419 the partial-state P2 is fixed by the same grouping change and the renderer-soft-failure badge P2 declined as designed; on fix(site): keep streaming text alive inside expanded working blocks #29420 the FE9 P1 fixed by wiring the preference query per story again (d0105de, f46888b). ci is green on every head; the separate "AI Documentation Check" fails on four PRs because its dormant doc-check workspace cannot be started by a chat (CODAGT-1025), not because of the diff. Codex re-review requested on the current heads.getSnapshotBeforeUpdate, closing the stale-height window DanielleMaywood reproduced (nested expansion and prepend committing before one observer delivery; reproduced and verified in a Chromium probe, over-adjust of exactly the expansion height before, none after), and 11073f5 adds the live-label clock test she asked for; feat(site): fold assistant steps in the conversation timeline #29419 ff84f73 stops an older page's revealed block from aliasing the live block's working:live:head:0 key (Codex P2; duplicate React keys and a remount before); this PR de46163 corrects the setting copy to "Answers and questions stay visible; failed steps are counted on the row." (Codex P2). Thirteen threads were resolved (the four fixes plus DanielleMaywood's and jscottmiller's already-addressed nits and the memberIds coverage); seven stay open, listed below. Current heads: feat(site): group assistant steps into working blocks #29417 83d0cb6, feat(site): add the working block disclosure #29418 11073f5, feat(site): fold assistant steps in the conversation timeline #29419 c8335f4, fix(site): keep streaming text alive inside expanded working blocks #29420 c95ce4e, this PR 1d601ae. No review was re-requested: the stack is past the six-pass budget below, so the earlier Codex OK verdicts do not cover these heads and human review is still required before merge.site/ lines across the stack. origin/main was merged bottom-up (feat: add a collapse_assistant_steps user preference #29416 c8ba3e9), resolving three conflicts in feat(site): fold assistant steps in the conversation timeline #29419 and moving the stories to the vendored message scroller. DanielleMaywood's getSnapshotBeforeUpdate gating and missing-story threads on feat(site): add the working block disclosure #29418 were fixed and resolved. Declined: extracting a WorkingBlockItem component (adds lines), SmoothText resume after dispose (useSyncExternalStore resubscribes on the StrictMode remount), and building row contents only for visible rows (minor).interrupting (feat(site): fold assistant steps in the conversation timeline #29419 f9b04a4); the live-only identity arm was added with a red-green test (feat(site): fold assistant steps in the conversation timeline #29419 8210761); the feat(site): add the working block disclosure #29418 scroll coverage is deferred to the feat(site): fold assistant steps in the conversation timeline #29419 Pixel story; the feat(site): group assistant steps into working blocks #29417 startedAt comment was deleted (7fb9334); jakehwll's void nit (fix(site): keep streaming text alive inside expanded working blocks #29420 de1636f) and props-bag pattern (this PR 7d1d659) were fixed. A delta coder-frontend-review (eight roles) found two comment fixes and a duplicated test fixture, all fixed. All ten open threads were replied to and resolved. Codex returned "Didn't find any major issues" on feat(site): fold assistant steps in the conversation timeline #29419 8210761. On this PR its rounds on 7d1d659 and 7a71975 left four threads, all fixed: chat load errors no longer wait on the preference (7a71975, red-green via a probe on DetailQueryErrorWhilePreferenceLoads), a CollapseAssistantStepsEnabled story, and two tidy-ups (e238b30). Codex then returned "Didn't find any major issues" on e238b30, CI is green on all five heads, and no threads are open.This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 605272e338
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 97fb5a26d5
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: bb6a8cce11
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 63d99ee926
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a6988ac9d
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: c822df18dc
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review Head a70cc67 addresses the five threads from the previous round (Vitest coverage for the preference switch, partial failed-step badge, prepend-only scroll compensation; the partial-timestamp thread is answered with evidence).
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: a70cc67574
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review Head a83e850 adds one fix on top of a70cc67: the expanded working block now applies its prepend growth to the scroller from a microtask, after MessageScroller's own re-anchor of a prepended item, so the final history page (which also prepends the prompt row) no longer jumps the reading position by the block's growth. Covered by the extended PrependIntoExpandedBlockKeepsReadingPosition story.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review Head d13ebe6 only adds the
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: d13ebe6b6a
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
d13ebe6 to
7611f70
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d1d659bb0
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a719755a6
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@codex review
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e238b30 to
a31cdd8
Compare
a31cdd8 to
b2527f0
Compare
b2527f0 to
e545581
Compare
## Stack context PR 2 of a six-PR stack that adds the **Collapse assistant steps** chat preference (Agents > Settings, off by default). With it on, each turn's consecutive tool-step rows fold into one disclosure: "Worked for 2m 14s (7 steps)" once the turn completes, or a ticking "Working for 12s" while it runs. The stack was split out of #29115 for review size; #29115 now sits at the top with the full feature description and the UAT record. 1. #29416 feat: add a collapse_assistant_steps user preference 2. #29417 feat(site): group assistant steps into working blocks (this PR) 3. #29418 feat(site): add the working block disclosure 4. #29419 feat(site): fold assistant steps in the conversation timeline 5. #29420 fix(site): keep streaming text alive inside expanded working blocks 6. #29115 feat(site): add the collapse assistant steps chat preference ## Why Pure grouping logic, no rendering. `groupWorkingBlocks` folds a turn's consecutive step rows into `WorkingBlock` descriptors that the timeline renders in #29419. A step row is assistant output whose last visible block is a tool call or reasoning; narration that precedes a tool call folds with it. Answers, user prompts, hook notices, and rows containing `ask_user_question`, `propose_plan`, or compaction markers are never folded. A completed reasoning-only row stays visible on its own rather than folding as "0 steps". Failed steps fold like any other step. A turn counts as working while the caller says it is active; a chat parked in `requires_action` keeps its pending client-executed tool visible outside the fold. Durations are the wall-clock span of part timestamps (tool calls, results, reasoning) taken from the raw messages, so hidden tool-result messages count, overlapping parallel tools are not summed, and the idle gap before the next prompt is excluded. Message `created_at` is not used because it is shared across an insert batch. Older chats can hold user messages made only of context files, inserted mid-turn; they are not prompts, so they do not end a block. Blocks are bounded by visible rows, and their timestamps are collected in one pass over the entries. The stream state now records its first reasoning or tool part time so a live block's clock starts at the first reasoning delta. A block's `key` follows its newest row, which prepending older history never changes; its `liveKey` is deterministic across the live-to-complete handoff so the timeline can carry expansion state over. Size: about 1,020 lines, 670 of them unit tests. The completed-turn and live-turn paths are interleaved in one function, so splitting further would have separated the tests from the code they cover. ## Restack After #29416 merged, this branch was restacked onto its new parent as one squashed commit per layer (content unchanged, verified by `git patch-id`), followed by the review fixes; that required a force-push. Rebased onto main on 2026-10-04 (clean). A frontend compliance pass (`frontend-review` and `coder-frontend-review`) then shared the visible row content filter with `getRenderableContentState` through `getVisibleContent` and trimmed comments. A later review round dropped undefined timestamps where they are read and left `getStepRowContent` with one empty-blocks check. > This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.
## Stack context PR 3 of a six-PR stack that adds the **Collapse assistant steps** chat preference (Agents > Settings, off by default). With it on, each turn's consecutive tool-step rows fold into one disclosure: "Worked for 2m 14s (7 steps)" once the turn completes, or a ticking "Working for 12s" while it runs. The stack was split out of #29115 for review size; #29115 now sits at the top with the full feature description and the UAT record. 1. #29416 feat: add a collapse_assistant_steps user preference 2. #29417 feat(site): group assistant steps into working blocks 3. #29418 feat(site): add the working block disclosure (this PR) 4. #29419 feat(site): fold assistant steps in the conversation timeline 5. #29420 fix(site): keep streaming text alive inside expanded working blocks 6. #29115 feat(site): add the collapse assistant steps chat preference ## Why The summary row a folded block renders as. Completed blocks show "Worked for 12s (2 steps)", live blocks tick "Working for 12s", partial blocks (older history still unloaded) report lower bounds such as "Worked for at least 8s (1 step or more)", and blocks whose parts carry no timestamps show "Completed N steps" instead of a guessed duration. Expansion is a controlled prop so the timeline can keep it stable across the live-to-complete handoff and history prepends. Older rows that join an expanded partial block land inside one scroller item, where `MessageScroller` cannot anchor them and browsers skip scroll anchoring at the top, so the disclosure scrolls the viewport by its own growth to keep the reading position. It only does so for a real prepend (the block's previous first row is still a member), not when the live row hands off to its persisted step, and it applies the growth from a microtask so the scroller's own MutationObserver re-anchor of a simultaneously prepended item does not cancel it. The height before the prepend is read by `getSnapshotBeforeUpdate` immediately before the commit mutates the DOM (the content is a small class component for that reason), so nested rows that expanded on their own state since the last render never leak into the growth. ## Restack After #29416 merged, this branch was restacked onto its new parent as one squashed commit per layer (content unchanged, verified by `git patch-id`), followed by the review fixes; that required a force-push. Browser-level coverage of the reading-position correction is deferred to the `PrependIntoExpandedBlockKeepsReadingPosition` Pixel story in #29419, since CI has no browser-mode unit project. Rebased onto main on 2026-10-04 (clean). A frontend compliance pass replaced the hand-written duration formatter with the shared `humanDurationShort`, so sub-second steps now read "1s" and whole minutes drop the zero seconds ("1m"); it also trimmed the `WorkingBlockContent` comment. Main was merged into the stack on 2026-10-06 (no force-push): `ToolCall.Root` now requires `hasContent` (#29891), so the disclosure passes it. The failed step badge was removed on 2026-10-07. It counted every tool result marked as an error, including ones the agent recovered from, so normal turns looked broken. Failed steps still show their own error state inside the block. > This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.
## Stack context PR 4 of a six-PR stack that adds the **Collapse assistant steps** chat preference (Agents > Settings, off by default). With it on, each turn's consecutive tool-step rows fold into one disclosure: "Worked for 2m 14s (7 steps)" once the turn completes, or a ticking "Working for 12s" while it runs. The stack was split out of #29115 for review size; #29115 now sits at the top with the full feature description and the UAT record. 1. #29416 feat: add a collapse_assistant_steps user preference 2. #29417 feat(site): group assistant steps into working blocks 3. #29418 feat(site): add the working block disclosure 4. #29419 feat(site): fold assistant steps in the conversation timeline (this PR) 5. #29420 fix(site): keep streaming text alive inside expanded working blocks 6. #29115 feat(site): add the collapse assistant steps chat preference ## Why Wires the grouping (#29417) and the disclosure (#29418) into `ConversationTimeline`. With the preference on, each block is its own `MessageScroller.Item`, and rows inside an expanded block render through the same `ChatMessageItem` path as before. Blocks key off their newest row, so a block that gains earlier rows keeps its element. Expansion is recorded on the block's member rows plus the deterministic live key, so a choice made mid-turn survives completion and later prepends even when the turn's prompt is on an unloaded page; the newest decision wins. The page passes `chatStatus` and `hasMoreMessages` down. The stream is cleared between persisted steps, so only the chat status says whether the agent is still working: `running` runs the block's clock, while `interrupting` stops it but keeps running tools folded as the interrupt drains. Stories that render the timeline seed the preference query because the timeline now reads it. The stories here render one state each under the pinned fixture clock: completed turns (collapsed and expanded), pagination, the reading-position hold when older pages join an expanded block (including the last page, which also prepends the prompt row as a new scroller item), questions staying outside the fold, and editing a preceding prompt. Expansion and item identity across paging and the live-to-complete handoff are covered by `ConversationTimeline.test.tsx` through focus retention. Live-turn stories follow in #29420. ## Restack After #29416 merged, this branch was restacked onto its new parent as one squashed commit per layer (content unchanged, verified by `git patch-id`), followed by the review fixes; that required a force-push. Rebased onto main on 2026-10-04: the only conflict was main's new `automationNames` props, now passed through `rowContents`. A frontend compliance pass made `hasMoreMessages` required, simplified `continuesLiveBlock`, and trimmed comments. Not done: extracting the block branch into its own component (RP6), since the parent would still own its state and it would add lines. A later review round inlined the single-use `useLiveBlockItemKeys` hook into `ConversationTimeline`; the pure `reconcileLiveBlockKeys` lives in `liveBlockItemKeys.ts`. Main was merged into the stack on 2026-10-06 (no force-push): #29891 and #29894 made the timeline's always-passed props required, so the working block wiring reads `liveStatus` directly and the timeline test and working block stories pass the required props. > This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.
e2518cf to
f7d4923
Compare
Also add a story for the enabled collapse assistant steps switch.
…ion from the collapse setting The working block summary no longer counts failed steps.
…29420) ## Stack context PR 5 of a six-PR stack that adds the **Collapse assistant steps** chat preference (Agents > Settings, off by default). With it on, each turn's consecutive tool-step rows fold into one disclosure: "Worked for 2m 14s (7 steps)" once the turn completes, or a ticking "Working for 12s" while it runs. The stack was split out of #29115 for review size; #29115 now sits at the top with the full feature description and the UAT record. 1. #29416 feat: add a collapse_assistant_steps user preference 2. #29417 feat(site): group assistant steps into working blocks 3. #29418 feat(site): add the working block disclosure 4. #29419 feat(site): fold assistant steps in the conversation timeline 5. #29420 fix(site): keep streaming text alive inside expanded working blocks (this PR) 6. #29115 feat(site): add the collapse assistant steps chat preference ## Why `useSmoothStreamingText` now resumes its reveal loop when its effect re-runs. Under StrictMode (dev and Storybook) the simulated unmount disposed the loop, so a reasoning block mounted inside a just-expanded fold stayed frozen at the bare "Thinking" title until the next delta re-rendered it. Production builds were unaffected. The live-turn stories capture the fold during a running turn from static args under the pinned fixture clock: the first tool call streaming, the turn running between persisted steps, the next step starting inside the block with no separate Thinking row, reasoning folding before the first tool call, `requires_action` completing the block while a pending question or client-executed tool stays visible outside it, and a prompt-less live block ("Working for at least 12s"). The handoffs themselves (live row to persisted step, completion, and the later prepend of the prompt) are covered by `ConversationTimeline.test.tsx`. ## Restack After #29416 merged, this branch was restacked onto its new parent as one squashed commit per layer (content unchanged, verified by `git patch-id`), followed by the review fixes; that required a force-push. Rebased onto main on 2026-10-04 (clean). A frontend compliance pass renamed two story/test fixture names. > This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.
f7d4923 to
5cee205
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.