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): group assistant steps into working blocks by ibetitsmike · Pull Request #29417 · coder/coder

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Sep 16, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

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. 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 (this PR)
  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

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.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-actions github-actions Bot assigned ibetitsmike Sep 16, 2026
@ibetitsmike
ibetitsmike added this pull request to stack #29421 September 16, 2026 17:10
This was referenced Sep 16, 2026
feat(site): add the collapse assistant steps chat preference #29115
Merged
feat: add a collapse_assistant_steps user preference #29416
Merged
feat(site): add the working block disclosure #29418
Merged
feat(site): fold assistant steps in the conversation timeline #29419
Merged
fix(site): keep streaming text alive inside expanded working blocks #29420
Merged
@ibetitsmike

ibetitsmike commented Sep 16, 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 16, 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-20T14:49:38.036515Z 4d05139 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 16, 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: 97f0bf6be0

ℹ️ 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.

@ibetitsmike

ibetitsmike commented Sep 16, 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 16, 2026

Copy link
Copy Markdown

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

Reviewed commit: 97f0bf6be0

ℹ️ 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 marked this pull request as ready for review September 17, 2026 09:14
@ibetitsmike
ibetitsmike requested a review from DanielleMaywood as a code owner September 17, 2026 09:14
DanielleMaywood
DanielleMaywood reviewed Sep 17, 2026
View reviewed changes
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/types.ts Resolved

Uh oh!

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

@ibetitsmike

ibetitsmike commented Sep 20, 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 20, 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: f9e0980ef7

ℹ️ 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.

@ibetitsmike

ibetitsmike commented Sep 20, 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 20, 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: 2e43056387

ℹ️ 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/workingBlockGrouping.ts 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 20, 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 20, 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: 4d05139e55

ℹ️ 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.

@ibetitsmike
ibetitsmike requested a review from a team as a code owner September 26, 2026 20:45
Base automatically changed from mike/collapse-assistant-steps-api to main September 27, 2026 20:15
ibetitsmike added a commit that referenced this pull request Sep 27, 2026
@ibetitsmike
feat: add a collapse_assistant_steps user preference (#29416)
756ffb9
## Stack context

Bottom 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 (this PR)
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
6. #29115 feat(site): add the collapse assistant steps chat preference

## Why

The chat UI reads a per-user boolean to decide whether to fold steps.
This layer stores it and exposes it through the preference settings API
and SDK.

`collapse_assistant_steps` follows the existing
`task_notification_alert_dismissed` boolean pattern: a `user_configs`
key with dbauthz wrappers, no migration. The generated API docs and
TypeScript types are regenerated, and the frontend preference mocks gain
the new required field.

> This PR was prepared by Xum, an AI coding agent, on behalf of
@ibetitsmike.
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps-grouping branch from 5f523b1 to d085d23 Compare September 27, 2026 20:15
@ibetitsmike
ibetitsmike requested a review from DanielleMaywood September 27, 2026 20:15
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps-grouping branch from 7fb9334 to 94c5a97 Compare September 29, 2026 13:03
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1114

All reactions

Sorry, something went wrong.

Uh oh!

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

@pr-queue-manager
pr-queue-manager Bot requested a review from f0ssel October 1, 2026 15:48
@ibetitsmike
feat(site): group assistant steps into working blocks
3d006e7
Adds groupWorkingBlocks, which folds a turn's consecutive tool-step rows
into WorkingBlock descriptors the timeline can render as one disclosure.
A step row is assistant output whose last visible block is a tool call or
reasoning; answers, prompts, hook notices, and rows carrying
ask_user_question, propose_plan, or compaction markers never fold.

Durations are the wall-clock span of part timestamps taken from the raw
messages, so hidden tool-result messages count and parallel tools are not
summed. The stream state now records tool part timestamps and the earliest
part time so a live block can start its clock at the first reasoning delta.
ibetitsmike added 7 commits October 4, 2026 19:25
@ibetitsmike
refactor(site): simplify working block grouping and its fixtures
d124bcf
Drop the unread createdAt fields on stream tool calls and results, the
rowKey accessor, the unreachable NaN branch in formatWorkingDuration, and
the binary search over per-turn spans. Name getStepRowContent for what it
returns. The grouping test reuses the shared fixture clock and stream
builder instead of redeclaring them; the stream start test moves next to
the code it covers.
@ibetitsmike
fix(site): end a working block at user messages hidden from the rows
e14d862
A user message made only of context files or skills has no timeline row,
so steps on either side of it folded into one block and the block before
it counted as live. Grouping now reads user boundaries from the raw
entries, anchoring the next turn's live key on the hidden message.
@ibetitsmike
fix(site): treat a hidden prompt as a turn boundary for merged reads …
ad6d1d8
…and partial blocks

A metadata-only user message now flushes the read_file merge so reads
from two turns never share a row, and a block whose loaded page starts
with such a prompt is no longer reported as partial.
@ibetitsmike
fix(site): stop a working block's span at the next prompt
eb15165
A turn that follows a metadata-only prompt can open with provider-executed
parts, which carry timestamps but render no row, so the preceding block's
duration ran into the next turn. Cap the span at the next user message.
@ibetitsmike
refactor(site): simplify working block spans and grouping tests
945618d
Collect part timestamps into one list per block instead of two running
min/max closures, trim restating docs, drop grouping tests that repeat
coverage, and leave formatWorkingDuration to the disclosure that uses it.
@ibetitsmike
refactor(site): compute the last working block member once
232512c
@ibetitsmike
chore(site): drop redundant StreamState.startedAt comment
cb17260
@ibetitsmike
ibetitsmike force-pushed the mike/collapse-assistant-steps-grouping branch from 94c5a97 to cb17260 Compare October 4, 2026 19:32
ibetitsmike added 2 commits October 4, 2026 19:56
@ibetitsmike
refactor(site/src/pages/AgentsPage/components/ChatConversation): shar…
04885b5
…e the visible row content filter

Working block grouping reuses the messageHelpers filter instead of a
drifted copy, and drops two no-op guards in its timestamp math.
@ibetitsmike
chore(site/src/pages/AgentsPage/components/ChatConversation): trim wo…
3796b77
…rking block comments
@pr-queue-manager
pr-queue-manager Bot requested review from jaaydenh and removed request for f0ssel October 4, 2026 21:34
jaaydenh
jaaydenh reviewed Oct 5, 2026
View reviewed changes

@jaaydenh jaaydenh left a comment

Copy link
Copy Markdown
Contributor

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.

Two medium findings from a review of this PR, details inline. I found no high-severity bugs; the tests, typecheck, and lint all pass locally.

Found with Xum, an AI coding agent.

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/workingBlockGrouping.ts Resolved

Uh oh!

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

DanielleMaywood
DanielleMaywood reviewed Oct 6, 2026
View reviewed changes
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/workingBlockGrouping.ts 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/streamState.ts Resolved

Uh oh!

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

ibetitsmike added 5 commits October 6, 2026 09:21
@ibetitsmike
style(site/src/pages/AgentsPage/components/ChatConversation): add bla…
e73923e
…nk lines between working block steps
@ibetitsmike
chore(site/src/pages/AgentsPage/components/ChatConversation): trim wo…
2c29802
…rking block type docs
@ibetitsmike
fix(site/src/pages/AgentsPage/components/ChatConversation): keep cont…
b869f7e
…ext-only user messages inside the turn

Users cannot send context-file or skill-only messages; the only ones in
history were inserted mid-turn after create_workspace by the removed
persistInstructionFiles. Treating them as prompts split one turn into
two working blocks, so they are invisible to grouping again.
@ibetitsmike
perf(site/src/pages/AgentsPage/components/ChatConversation): collect …
628656a
…working block timestamps in one pass

Each block filtered every loaded entry, which is O(blocks x entries).
Entries arrive sorted by message ID and block spans are disjoint and
ascending, so one forward cursor collects every span in a single walk.
@ibetitsmike
refactor(site/src/pages/AgentsPage/components/ChatConversation): simp…
f9262f1
…lify stream startedAt

chatd stamps stream parts at publish time in publish order, so the first
timestamped reasoning or tool part is the earliest. Set startedAt from it
in place instead of taking a running minimum in a wrapper.
@ibetitsmike
ibetitsmike requested review from DanielleMaywood and jaaydenh October 6, 2026 09:47
DanielleMaywood
DanielleMaywood reviewed Oct 6, 2026
View reviewed changes
Comment thread site/src/pages/AgentsPage/components/ChatConversation/messageHelpers.ts 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/workingBlockGrouping.ts Resolved

Uh oh!

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

@ibetitsmike
refactor(site/src/pages/AgentsPage/components/ChatConversation): drop…
4d13ea2
… undefined timestamps at the source

Optional part and stream timestamps are filtered where they are read, so
the parse step only sees strings. Empty live rows now share the single
empty-blocks check in getStepRowContent.
@ibetitsmike
ibetitsmike requested a review from DanielleMaywood October 6, 2026 16:13
@ibetitsmike
Merge remote-tracking branch 'origin/main' into mike/collapse-assista…
e4a3b4b
…nt-steps-grouping
DanielleMaywood
DanielleMaywood approved these changes Oct 7, 2026
View reviewed changes
@ibetitsmike
refactor(site/src/pages/AgentsPage/components/ChatConversation): stop…
94c7ae4
… counting failed steps in working blocks

The summary no longer shows a failed step badge, so blocks track only the
distinct tool IDs they hold.
@ibetitsmike
ibetitsmike merged commit 1910ae4 into main Oct 7, 2026
31 checks passed

Uh oh!

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

@ibetitsmike
ibetitsmike deleted the mike/collapse-assistant-steps-grouping branch October 7, 2026 12:28
@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 DanielleMaywood approved these changes
@jaaydenh jaaydenh Awaiting requested review from jaaydenh

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.

3 participants

@ibetitsmike @jaaydenh @DanielleMaywood
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.