Skip to content

🤖 fix: refine hyper density work bundling#3411

Merged
ThomasK33 merged 9 commits into
mainfrom
density-grouping-v7vb
May 29, 2026
Merged

🤖 fix: refine hyper density work bundling#3411
ThomasK33 merged 9 commits into
mainfrom
density-grouping-v7vb

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

Hyper transcript density now collapses failed, interrupted, redacted, and partial tool rows into operational bundles, anchors the outer Worked for ... bundle directly below the user message that triggered the turn, and consistently shows a work header/divider for both active and settled work. Active work now shows elapsed duration as Working for Ns.... Collapsed mode hides detailed agent-emitted work, keeps in-turn steering user messages visible below the collapsed bundle, and keeps the final assistant summary visible below the fold; expanded mode preserves chronological order without extra right indentation inside the work bundle.

Background

The previous hyper-density behavior hid successful tool noise but left failed shell commands and other non-success tool rows visible. The first revision also placed the Worked for ... fold too low in steering-message scenarios, which made the collapsed hierarchy feel disconnected from the user prompt that started the turn. Follow-up Chromatic review showed the final assistant summary should remain visible below collapsed work, and the work header should act as a consistent divider in both active and settled states.

Implementation

  • Treat all displayed tool statuses as bundleable for hyper-density projections.
  • Project work bundles from the triggering user row through the final assistant row for that turn.
  • Allow steering messages and the final assistant summary to remain visible below collapsed work bundles, while rendering the whole bundle chronologically when expanded.
  • Keep active work in an expanded Working for Ns... work bundle so the header/divider is always present while the agent is working.
  • Remove nested work-bundle indentation so assistant text, operation summaries, and final summaries align under the divider.
  • Tighten cross-user bundling so only active in-turn checkpoints can span a steering message; completed partial tools do not merge into the next prompt.
  • Keep side-question answers visible and avoid merging interrupted work into the next user turn.
  • Extend projection, component, and app-render tests for failed tools, steering messages, active work bundles, anchored work bundles, and collapsed/expanded ordering.

Validation

  • bun test src/browser/utils/messages/transcriptRenderProjection.test.ts src/browser/features/Messages/WorkBundleMessage.test.tsx
  • TEST_INTEGRATION=1 bun x jest tests/ui/chat/transcriptDensity.test.ts --runInBand --silent
  • make typecheck
  • make static-check
  • Dogfooded the Storybook hyper-density stories with screenshots/video:
    • collapsed state places Worked for ... after the triggering user message
    • collapsed state keeps the steering message and final assistant summary visible below the fold
    • expanded state renders the steering message chronologically between the two assistant work phases without extra inner indentation
    • active state shows elapsed Working for Ns... with the same divider and flat inner layout

Risks

Moderate UI regression risk, limited to hyper transcript density rendering. The main behavior change is intentional: detailed agent-emitted rows are hidden until the containing work/operation bundle is expanded, while user-authored steering messages and the final assistant summary stay visible.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $81.55

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

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

@ThomasK33 ThomasK33 force-pushed the density-grouping-v7vb branch from d8236f6 to f308716 Compare May 28, 2026 19:12
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Updated after simplify/deslop cleanup: removed the now-redundant bundleable-tool status switch and inlined the all-tool-row behavior.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

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

@ThomasK33 ThomasK33 force-pushed the density-grouping-v7vb branch from f308716 to 19b1172 Compare May 28, 2026 19:41
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Rebased onto latest origin/main and force-pushed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

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

@ThomasK33 ThomasK33 force-pushed the density-grouping-v7vb branch from 19b1172 to 4302859 Compare May 28, 2026 19:59
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Updated the hyper-density behavior so the outer Worked for ... bundle spans the agent turn timeline, while steering user messages remain visible and render in-place when expanded.

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

Copy link
Copy Markdown

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: 4302859271

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts Outdated
@ThomasK33 ThomasK33 force-pushed the density-grouping-v7vb branch from 4302859 to d970739 Compare May 28, 2026 20:05
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the side-question answer case: assistant side answers no longer start or finalize work bundles, and collapsed work bundles keep side-answer rows visible alongside steering user rows.

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

Copy link
Copy Markdown

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: d970739e0f

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts Outdated
Hyper transcript density now treats failed, interrupted, redacted, and partial tool rows as bundleable so noisy validation failures collapse under the same operational summaries. Assistant text rows continue to split operation bundles inside an expanded work bundle so narrative checkpoints remain visible.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$13.89`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=13.89 -->
@ThomasK33 ThomasK33 force-pushed the density-grouping-v7vb branch from d970739 to 343e150 Compare May 28, 2026 20:15
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the interrupted-turn boundary case: work bundles now only span steering/side conversation rows when the following agent work remains in the same assistant history, so a new user prompt after an interrupted turn starts a separate bundle.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

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

Place collapsed hyper-density work bundles immediately after the user message that triggered the turn while keeping in-turn steering messages visible below the collapsed bundle and chronological inside expanded bundles.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$43.21`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=43.21 -->
@ThomasK33 ThomasK33 changed the title 🤖 fix: include failed tools in hyper density bundles 🤖 fix: refine hyper density work bundling May 29, 2026
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Updated the hyper-density layout per Chromatic feedback: the work bundle is now anchored directly after the triggering user message, collapsed steering messages stay visible below it, and expanded state keeps chronological order.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

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

Keep the final assistant summary visible below collapsed hyper-density work bundles while preserving chronological rendering inside expanded bundles.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$61.40`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=61.40 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Follow-up after Chromatic feedback: collapsed hyper-density work bundles now keep the final assistant summary visible below Worked for ..., while expanded state remains chronological.

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

Copy link
Copy Markdown

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: c1283212b0

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts Outdated
Restrict cross-user work-bundle spanning to partial tool rows so interrupted reasoning/text-only turns cannot absorb the next prompt's work.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$61.40`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=61.40 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the interrupted partial-turn boundary feedback by only allowing cross-user work-bundle spanning after partial tool rows, and added a regression test for partial reasoning/text interruptions before a new prompt.

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

Copy link
Copy Markdown

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: 811c8e7964

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts Outdated
Reset cross-user work-bundle eligibility on every agent row so a partial tool cannot carry the steering gate through later partial assistant text into the next prompt.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$61.40`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=61.40 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the follow-up boundary case by resetting cross-user work-bundle eligibility on each agent row, so a partial tool cannot carry the steering gate through later partial assistant text into a new prompt. Added a regression test for mixed partial tool + text interruptions.

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

Copy link
Copy Markdown

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: 00de008164

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts
Only record a final assistant row after an operational row has been seen so pre-tool assistant text cannot become an empty work bundle.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$61.40`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=61.40 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the pre-operation finalization feedback by only recording a final assistant row after an operational row has been seen. Added a regression test for assistant text followed by a tool with no trailing assistant final.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

Always render the hyper-density work header for active and settled work, use a Working label for active work, and remove inner work-bundle indentation so nested content aligns with the header divider.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$74.28`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=74.28 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Follow-up layout update: hyper-density work bundles now always show the Work/Working header with divider, active work uses Working..., and expanded work-bundle contents render without the extra inner indentation.

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

Copy link
Copy Markdown

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: 5d2867906b

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts
Show elapsed duration in active hyper-density work headers and keep post-prompt work boundaries from using pre-prompt partial operations.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$81.55`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=81.55 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Follow-up: active work headers now show elapsed duration (Working for Ns...). I also addressed the post-prompt boundary feedback by resetting post-prompt operational/active state and adding a regression test for interrupted partial tools followed by a text-only next prompt.

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

Copy link
Copy Markdown

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: f12fc1af0a

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

Comment thread src/browser/utils/messages/transcriptRenderProjection.ts Outdated
Only cross user-message boundaries for active in-turn work checkpoints, keep completed partial tools from merging into the next prompt, and update density fixtures to model steering through an ask-user checkpoint.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$81.55`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=81.55 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the completed-partial-tool boundary feedback by only allowing cross-user bundling for active in-turn checkpoints. Added a regression test for completed partial tools followed by a tool-using next prompt, and updated the steering fixture to model an ask-user checkpoint.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

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

@ThomasK33 ThomasK33 added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit 5882b1d May 29, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the density-grouping-v7vb branch May 29, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant