GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(site): add the collapse assistant steps chat preference by ibetitsmike · Pull Request #29115 · coder/coder

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Adds a per-user Collapse assistant steps preference (Agents > Settings, off by default) that folds each turn's consecutive tool-step rows into one disclosure: "Worked for 2m 14s (7 steps)" once the turn completes, or a ticking "Working for 12s" while it is still running.

Stack

Top of a six-PR stack, split from this PR's original single diff for review size. Each layer builds and passes CI on its own.

  1. feat: add a collapse_assistant_steps user preference #29416 feat: add a collapse_assistant_steps user preference
  2. feat(site): group assistant steps into working blocks #29417 feat(site): group assistant steps into working blocks
  3. feat(site): add the working block disclosure #29418 feat(site): add the working block disclosure
  4. feat(site): fold assistant steps in the conversation timeline #29419 feat(site): fold assistant steps in the conversation timeline
  5. fix(site): keep streaming text alive inside expanded working blocks #29420 fix(site): keep streaming text alive inside expanded working blocks
  6. feat(site): add the collapse assistant steps chat preference #29115 feat(site): add the collapse assistant steps chat preference (this PR)

This PR

Adds the Collapse assistant steps switch to Agents > Settings and makes the chat page wait for the preference in its existing loading view (the same skeleton it shows while the chat and messages load), so a saved "collapse" setting never paints rows unfolded and then folds them. If the preference request fails, the transcript renders unfolded, matching how the other display preferences on the page degrade, and the settings switch surfaces the load error.

How the feature works

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, system notices, and rows containing ask_user_question, propose_plan, or compaction markers are never folded. Failed steps fold like any other step. Durations are the wall-clock span of part timestamps from the raw messages, so hidden tool-result messages count, parallel tools are not summed, and the idle gap before the next prompt is excluded (#29417).

With the preference on, the live assistant row stays inside the fold for the whole working phase, from the first reasoning delta to the final answer, which streams outside the fold. Between persisted steps the empty live row joins the block it follows instead of rendering a separate Thinking row. The block's clock runs while the chat status is running and stops during interrupting, which still keeps running tools folded; requires_action completes the block and keeps the pending client-executed tool visible (#29419, #29420).

Each block is its own MessageScroller.Item keyed off its newest row, so prepending older pages keeps its element and expansion. While older history is still unloaded the oldest block reports lower bounds. Older rows that join an expanded block at the top scroll the viewport by their own growth so the reading position holds (#29418, #29419).

Two visible effects are accepted rather than fixed: narration that precedes a tool call is briefly visible outside the fold until its tool call streams, and the completed label can be up to about 2s shorter than the last live tick because the completed span uses persisted part timestamps while the live clock also counts the model's pre-answer latency.

Split notes

The stack was rebuilt from the previously reviewed head 7611f70 merged with main. Later review rounds (see the review record) refactored every frontend layer, so the tip no longer equals that head. Rebuilding this branch as the stack's tip required a force-push. 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) found nothing to change in this layer.

Dogfood UAT

Independent remote UAT (dogfood workspace, real Claude Haiku 4.5 via the AI Gateway, real browser input) ran in seven rounds. Round 1 (605272e) failed on the between-steps timer freeze, round 2 (63d99ee) confirmed that fix and found the in-block reading-position jump, round 3 verified c932002, round 4 (8ddc43a) verified the live-turn fold with a 100ms DOM sampler, round 5 confirmed it on the main merge c822df1, round 6 (a70cc67) found the final-page reading-position jump fixed above, and round 7 verified a83e850 (each proven by git rev-parse HEAD and /api/v2/buildinfo on the remote). The only later commit adds a story and changes no runtime code.

The failed step badge that some rounds below checked was removed afterwards (#29418); rows that mention it describe the earlier build.

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.

Review record

  • Codex on the pre-split PR: OK for reviewed commit 7611f70 (2026-09-15 20:00Z), CI 31 of 31 green on that head. Three earlier threads were resolved with evidence (fallback tool IDs and refetch-after-PUT declined as hardening outside the diff; the SQL ON CONFLICT cast claim refuted by the passing Postgres-backed toggle test).
  • Codex per PR after the split (2026-09-17): "Didn't find any major issues" on the current heads feat: add a collapse_assistant_steps user preference #29416 87292f1, feat(site): group assistant steps into working blocks #29417 97f0bf6, feat(site): add the working block disclosure #29418 5367f18, feat(site): fold assistant steps in the conversation timeline #29419 64d45a6, fix(site): keep streaming text alive inside expanded working blocks #29420 88625f5, feat(site): add the collapse assistant steps chat preference #29115 4e5332d. The FE1 threads on the timeline tests were closed by rewriting them (below); the timestamp-less live-only identity (P2, feat(site): fold assistant steps in the conversation timeline #29419) and the error-fallback mount refetch (P2, this PR) were declined with evidence in their threads and resolved.
  • Frontend self-review gate (2026-09-17): the repository 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).
  • coder-frontend-review gate (2026-09-20): the eight reviewer roles (simplicity, comments, tests and stories, React patterns, reuse, styling and accessibility, types and naming, data flow) ran over the composed 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.
  • Codex round of 2026-09-20 14:42Z on the current heads: "Didn't find any major issues" on 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. Findings on feat(site): group assistant steps into working blocks #29417 4d05139 and this PR 73d573c: two P2s, both verified against the code and left open below. No further review rounds will be requested (see the review budget note).
  • pr-review-fix pass (2026-09-20, after the 14:42Z round): every unresolved thread across the stack was triaged. Fixed with red-green tests on their owning PRs: feat(site): group assistant steps into working blocks #29417 83d0cb6 caps a block's duration span at the next user message, so a turn that follows a metadata-only prompt and opens with provider-executed parts no longer extends the previous block (Codex P2); feat(site): add the working block disclosure #29418 389d5ba replaces the ResizeObserver height cache with 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.
  • coder-frontend-review loop (2026-09-26, LOC-reduction focus): round 1 ran all eight roles over the composed diff, round 2 re-ran the six that failed, and round 3 the three that still failed; round 3 returned no findings. Fixes landed on their owning PRs (feat(site): group assistant steps into working blocks #29417 ffc8d67 and 5f523b1, feat(site): add the working block disclosure #29418 ea0bec9, feat(site): fold assistant steps in the conversation timeline #29419 6841434 and 685a716, fix(site): keep streaming text alive inside expanded working blocks #29420 054ea94, this PR 8934352) and remove about 416 added 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).
  • Owner decisions and pr-review-fix pass (2026-09-27): the clock now stops during 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.
  • Review budget (completed review passes per PR, every reviewer, history never resets, cap 6): feat: add a collapse_assistant_steps user preference #29416 3 (Codex 2, human 1); feat(site): group assistant steps into working blocks #29417 22 (Codex 5, human 1, agent role passes 16); feat(site): add the working block disclosure #29418 29 (Codex 9, human 4, agent 16); feat(site): fold assistant steps in the conversation timeline #29419 29 (Codex 13, agent 16); fix(site): keep streaming text alive inside expanded working blocks #29420 29 (Codex 13, agent 16); this PR 44 (Codex 28, agent 16). The 16 agent passes are the eight coder-frontend-review roles times two passes over the composed frontend diff on 2026-09-20; agent-side reviews from earlier sessions are not included, so the totals are lower bounds. feat(site): add the working block disclosure #29418, feat(site): fold assistant steps in the conversation timeline #29419, fix(site): keep streaming text alive inside expanded working blocks #29420 and this PR were already past the cap on Codex rounds alone before the 14:42Z request, and feat(site): group assistant steps into working blocks #29417 was past it once the agent passes are counted; the 14:42Z round is the last Codex round. The 2026-09-26 frontend loop added 17 agent passes (8, 6 and 3 roles) to every PR at Mike's explicit request. Codex verdicts for this PR and feat(site): group assistant steps into working blocks #29417 are therefore findings-open on the exact current heads, and the three OK verdicts hold only for the heads listed above. Mike lifted the cap for the 2026-09-27 pass, which added 8 agent passes to every PR and re-requested Codex on feat(site): fold assistant steps in the conversation timeline #29419 and this PR.

This PR was prepared by Xum, an AI coding agent, on behalf of @ibetitsmike.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@github-actions

github-actions Bot commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Docs preview

Check 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.

  • docs/reference/api/schemas.md
  • docs/reference/api/users.md
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned ibetitsmike Sep 9, 2026
@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T00:27:45.918765Z e238b30 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 605272e338

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/CollapseAssistantStepsSettings.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 4ae82b9c9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97fb5a26d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb6a8cce11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63d99ee926

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: ce271957e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a6988ac9d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/AgentChatPage.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: c93200249e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tracyjohnsonux tracyjohnsonux mentioned this pull request Sep 9, 2026
feat(site/src/pages/AgentsPage/components/ChatConversation): refine working block icons and indent #29140
Closed
@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Posted by Xum, an AI coding agent, on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c822df18dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@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).

Posted by Xum, an AI coding agent, on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a70cc67574

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.stories.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.test.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/CollapseAssistantStepsSettings.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@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.

Posted by Xum, an AI coding agent, on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: a83e850b05

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Head d13ebe6 only adds the CollapseAssistantStepsSaveError story on top of a83e850; no runtime code changed.

Posted by Xum, an AI coding agent, on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 9, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d13ebe6b6a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/AgentChatPage.stories.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/CollapseAssistantStepsSettings.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/WorkingBlockDisclosure.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/workingBlockGrouping.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatConversation/ConversationTimeline.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike
ibetitsmike added this pull request to stack #29373 September 15, 2026 18:54
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from d13ebe6 to 7611f70 Compare September 15, 2026 19:40
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 28, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d1d659bb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/AgentChatPage.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/CollapseAssistantStepsSettings.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum (AI coding agent) requested this review on behalf of @ibetitsmike. The previous request's summary shows Completed for 7d1d659 but no review verdict was posted.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 7d1d659bb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum (AI coding agent) requested this review on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 28, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a719755a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/AgentChatPage.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum (AI coding agent) requested this review on behalf of @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: e238b30442

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from e238b30 to a31cdd8 Compare September 29, 2026 13:03
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from a31cdd8 to b2527f0 Compare October 4, 2026 19:32
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from b2527f0 to e545581 Compare October 4, 2026 20:11
ibetitsmike added a commit that referenced this pull request Oct 7, 2026
@ibetitsmike
feat(site): group assistant steps into working blocks (#29417)
1910ae4
## 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.
ibetitsmike added a commit that referenced this pull request Oct 7, 2026
@ibetitsmike
feat(site): add the working block disclosure (#29418)
682d4fd
## 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.
ibetitsmike added a commit that referenced this pull request Oct 7, 2026
@ibetitsmike
feat(site): fold assistant steps in the conversation timeline (#29419)
045cdc9
## 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.
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from e2518cf to f7d4923 Compare October 7, 2026 13:05
Base automatically changed from mike/collapse-assistant-steps-live to main October 7, 2026 13:14
ibetitsmike added 7 commits October 7, 2026 15:14
@ibetitsmike
feat(site): add the collapse assistant steps chat preference
c70fc4e
@ibetitsmike
refactor(site): gate the chat loading view on the preference query in…
79da047
…line
@ibetitsmike
fix(site): show chat load errors without waiting on the preference
148228a
Also add a story for the enabled collapse assistant steps switch.
@ibetitsmike
chore(site): tidy the preference gate and enabled switch story
07f4c68
@ibetitsmike
refactor(site): use React namespace types in CollapseAssistantStepsSe…
298e5ef
…ttings
@ibetitsmike
style(site/src/pages/AgentsPage): add blank lines between logical blocks
33a9492
@ibetitsmike
docs(site/src/pages/AgentsPage/components): drop the failed step ment…
5cee205
…ion from the collapse setting

The working block summary no longer counts failed steps.
ibetitsmike added a commit that referenced this pull request Oct 7, 2026
@ibetitsmike
fix(site): keep streaming text alive inside expanded working blocks (#…
ec27e23
…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.
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps branch from f7d4923 to 5cee205 Compare October 7, 2026 13:14
@ibetitsmike
ibetitsmike merged commit a26d5c1 into main Oct 7, 2026
27 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike
ibetitsmike deleted the mike/collapse-assistant-steps branch October 7, 2026 13:24
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@DanielleMaywood DanielleMaywood Awaiting requested review from DanielleMaywood
@jakehwll jakehwll Awaiting requested review from jakehwll

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ibetitsmike ibetitsmike

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ibetitsmike @jakehwll
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.