Skip to content

fix(frontend): coalesce fragmented agent updates - #198

Merged
wmeddie merged 13 commits into
agent/task-file-split-editorfrom
agent/coalesce-fragmented-agent-updates
Aug 30, 2026
Merged

wmeddie merged 13 commits into
agent/task-file-split-editorfrom
agent/coalesce-fragmented-agent-updates

Conversation

@wmeddie

@wmeddie wmeddie commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Stack

This PR is part of a single-release stack:

  1. #173 targets main — merge last
  2. #196 targets feat(frontend): add native extension and MCP discovery (ADR-043) #173 — merge second
  3. #198 targets feat(frontend): open task files in split editor (ADR-044) #196 — merge first

Merge top-down: #198 → #196 → #173. Only #173 lands on main, so the stack produces one main-branch release.

Summary

  • coalesce only clearly continuous, adjacent Agent update fragments at render time
  • preserve the durable ACP message boundaries and ordinary completed status updates
  • repair already-persisted split updates without changing task/message ingestion
  • cover the reported six-fragment sentence plus tool, attempt, time, and completed-sentence boundaries

Root cause

ACP treats a changed messageId as a new message. The pinned Codex ACP adapter maps each Codex app-server itemId directly to that field (v1.1.7 source). Very rarely, Codex emits several agent-message items in the middle of one grammatical sentence. XpressClaw correctly persisted those distinct protocol items, but the task UI rendered every one as a separate bubble.

This is not XpressClaw context-window truncation. The adapter handles context compaction as an explicit marker, while the reproduced task was only at 46.9% context usage.

The presentation repair is intentionally conservative: fragments must be adjacent, belong to the same attempt/session/source, carry distinct message IDs, arrive within two seconds, and have clear continuation syntax. Tool activity, attempt changes, time gaps, and complete status sentences remain hard boundaries.

Verification

  • npm run check
  • npm run build
  • env -u CI npx playwright test e2e/workspace.spec.ts --workers=4 — 79 passed
  • focused coalescing/boundary cases repeated 10 times each in parallel — 20 passed
  • visual QA of the exact reported fragment sequence
  • git diff --check

@wmeddie

wmeddie commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@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: d53a49610f

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

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-08-30T08:05:44.366268Z b220be5 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.

@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: 16aa8a1d82

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

@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: d8ed535747

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

@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: f10dde02e3

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Addressed the latest fragment-spacing findings in 1cb92a3 and added focused browser coverage for signed values, double-dash options, and no-space trailing delimiters. npm run check and both focused coalescing tests pass.

@codex review

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Also merged the current main into the branch at 28979e1 so the final validation runs on the actual merge base. The focused coalescing tests and npm run check remain green after the merge.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 28979e108e

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

…to HEAD

# Conflicts:
#	frontend/src/routes/tasks/[id]/TaskView.svelte
@wmeddie
wmeddie changed the base branch from main to agent/task-file-split-editor August 30, 2026 07:32
@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

This PR is now stacked on #196 and therefore contains the full three-PR chain. The full stack passed frontend type checking, a production build, and the focused cross-feature browser coverage.

@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: 1dc86120a8

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Addressed the standalone-delimiter spacing finding in e1365e2 and added exact browser regressions for spaced hyphen and slash boundaries. npm run check and both focused coalescing tests pass.

@codex review

@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: e1365e2cef

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Merged #196's keyboard source-pane fix into the top of the stack at c7982c2. The aggregate head passes npm run check plus all eight focused coalescing and split/editor regressions.

@codex review

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Addressed the runner-scope finding in 3ec2e2e. Fragment repair now applies only to persisted Codex ACP events, with an OpenCode non-coalescing regression. npm run check and both focused coalescing tests pass.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: c7982c2ffd

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Merged #196's pending-route fix into the top of the stack at 833e82e. The aggregate head passes npm run check plus all eight focused coalescing and split/editor regressions.

@codex review

@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: 833e82e86b

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Addressed mirrored-constituent deduplication in 8261c92 by filtering durable-reply mirrors before coalescing, with an exact regression. npm run check and all three focused coalescing/deduplication tests pass.

@codex review

@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: 8261c926f1

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

@wmeddie

wmeddie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Addressed mirrored reply boundaries in b220be5: mirrors remain hard coalescing boundaries and are hidden only at render filtering. The exact middle-boundary regression is included. npm run check and all four focused coalescing/deduplication tests pass.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: b220be5093

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

@wmeddie
wmeddie merged commit 821cb00 into agent/task-file-split-editor Aug 30, 2026
@wmeddie
wmeddie deleted the agent/coalesce-fragmented-agent-updates branch August 30, 2026 10:24
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