Repository navigation
feat(site/src): fold each finished turn into one Working block - #31025
ibetitsmike wants to merge 24 commits into
Conversation
|
@codex review
|
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db47d239fc
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93bd464db9
ℹ️ 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".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Hooray! 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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b925402f29
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b925402f29
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45a33b14cc
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd392f47ba
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 431cec5789
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fbb2555d3
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 064ef2228a
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f064bb621
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11685fa85e
ℹ️ 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".
…ve block that starts after text mounted across paging When an older page, a live-only block's persisted step, and the cleared stream arrive in one render, the block keeps its scroller item key only if its persisted start matches the start recorded while it was live. That check used the start of the whole stream, but since text closes a block, a block that starts after text in the same stream starts at its own tool call. The block remounted, collapsed, and lost focus. The live block identity now records the block's own start.
…s attached files While a turn is anchored, expanding its last block in view lets the anchor hold hand off to following once the reply fills the view. That applied only when the block was the scroller's last item, but attached files now render below the block, so in a turn that attached files the view never handed off and the answer streamed below the fold. The check now applies to any row that expands in view inside the anchored turn.
…ched files into their working block On main, #30788 keeps a step's attached files inside its Working block and lists the files of rows outside every block under Attachments in the Summary panel. This branch rendered them below the block, so the rebase onto main adopts main's model: - Files are work pieces, so they fold into the block of the step that attached them, and only text closes a block. - A slice outside every block hides its files, and an agent row of only files outside a block renders nothing. - getSliceContent moves beside splitRowPieces in the grouping module and takes main's hideAttachments option. - Partial blocks render in place again: files at the top of a page now open the block instead of preceding it. Main's attachment tests run on the slice layout, the files-below-block test and story are gone, and the paginated story's block now includes the attach step's result time.
691fa84 to
bd3cb21
Compare
da079c0 to
5cb3cb5
Compare
…ly the constraint in a story comment The story's name already says its page starts at an attached file.
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcbd479065
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f69dca0a56
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa6a33988e
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef2120e626
ℹ️ 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".
|
@codex review
|
|
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". |
…educed motion on reveal Expanding a Working block taller than the view aligned its end with the bottom of the view, which pushed the focused header button above the top. The next Tab moved focus to the first step, the browser scrolled it back into view, and that scroll up ended the reveal. A block that does not fit in the view with its margins now aligns its start instead, and the reveal never scrolls up, so the header and the next Tab stop stay in view. A smooth scroll from script also bypasses the reduced-motion rule in index.css, and the growth chase repeats it without a gesture. The reveal and the chase now jump instead of gliding when the reader prefers reduced motion.
…asoning-only Working block the reader focused or toggled Text closes the open Working block, and a closed block with no steps is dropped, so reasoning that streams between two texts showed a live Working button that unmounted when the next text arrived. A reader who had focused or expanded it lost focus to the body, and the content they opened collapsed into an inline reasoning row. The timeline now records the blocks the reader focused or toggled, and grouping keeps them even without steps.
…h finished turn into one Working block A running or parked turn keeps the split view from #30656, where text between steps closes the open block. Once the turn ends (any turn before the latest user prompt, or the latest turn when the chat is no longer running, interrupting, or requires_action), its text between steps, the text before its first step, and its labeled narration fold into one block per run of rows between rows that never fold, leaving only the final message visible. The fold starts collapsed. An ended turn's block records its expansion under a turn key taken from its last work piece, so what the reader expanded while the turn ran does not carry over, and what they expand afterwards survives paging. The fold takes over the scroller item of the turn's last block, so its summary keeps focus, and an output run is keyed by the count of output pieces before it in its row, so the answer below the fold does not remount when the text before it folds.
be5f927 to
a7cb248
Compare
|
Check: a finished turn whose last step is text followed by Shape from a real chat (Claude):
The model then ended the turn without another step. At Could an ended turn's trailing work that only attaches files leave the last text as the answer, with the
|
52530bb to
a2d857a
Compare
|
Folded into #30656: its single commit, rebased onto
|
Stacked on #30656, which splits Working blocks at assistant text. That helps while a turn runs, but finished turns kept the split, so they read as a row of one-step blocks with narration between them.
Finished turns now fold back into one Working block, as on
main: the steps, the files the agent attached, the text between steps, the text before the first step, and labeled narration go into the block, and only the final message stays below it. A turn is finished once a later prompt exists or the chat status leavesrunning,interrupting, andrequires_action. The running or parked turn keeps the split view, so nothing folds and unfolds while the agent works. Rows that never fold (questions, plans, hook notices, cleared or summarized context) still split a finished turn.The fold always starts collapsed. Its expansion is recorded under a key taken from the turn's last work piece, so what the reader expanded while the turn ran does not carry over, and what they expand afterwards survives paging and later turns. The fold takes over the scroller item of the turn's last block, so a focused summary keeps focus.
Finished turn on #30656:
With this PR:
Review notes
ChatMessagehas no turn ID (chatd's turn ID is per prompt, for hooks, and is not stored), so the turn key isworking:turn:plus the slice key of the turn's last work piece. A turn's newest work always loads first, so older pages do not change it.main, a finished turn that ends in text and then narration, with no later work, folds both.LabeledNarrationStaysVisibleandLeadInBeforeSearchStaysVisiblebecomeLabeledNarrationFoldsandLeadInBeforeSearchFolds,TextBetweenStepsSplitsBlocksbecomesTextBetweenStepsFolds, andRequiresActionKeepsTextBetweenStepsis new.a7cb2484a34:frontend-deep-review(this repository's copy ofcoder-frontend-review) passes all eight roles after three rounds, with one finding declined (RO6, splitting the PR, since the change is one behavior), andfrontend-reviewFE1 to FE10 pass. The pre-commit hook (make pre-commit, which runs biome, oxlint, tsc, dpdm, the React Compiler check, and knip for the site), the design-system oxlint config, the unit tests insrc/pages/AgentsPage,src/vendor, andsrc/testHelpers(2224 passed, 2 skipped; the 5 failures are all inProjectChatsList.test.tsx, which fails the same way without this PR), and the ChatConversation story tests (122) pass.