Skip to content

cmux NEXT: render sent attachments in draft order - #24724

Closed
teamleaderleo wants to merge 10 commits into
feat-cmux-nextfrom
codex/inline-transcript-pr
Closed

teamleaderleo wants to merge 10 commits into
feat-cmux-nextfrom
codex/inline-transcript-pr

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Render sent attachment blocks in the same order as the composer and keep that order through delayed echoes, queued edits, durable reloads, and failed image persistence. Text files and large pastes keep chip identity instead of becoming fenced prose; durable images reconcile by stable identity.

Leo: "you can maybe have the option to look at it a different way, but, you know, that's all just rendering detail."

Changelog

  • Preserve ordered ACP content through optimistic, delayed, queued and durable transcript rows.
  • Carry bounded file/paste descriptors and audio names through normalization.
  • Reconcile image IDs by stable durable hash; retain a failed middle-image slot without shifting later thumbnails.
  • Use fresh queue_updated metadata instead of stale queued entry metadata.

Base 0bf767563cae3a50cbca19ab477f0a39c87ee675; head c5853390b40fae1bb896ecb5f9d8039b0174c2d2.

Validation

Static prepush scanners, web formatting/lint/type checks and diff checks pass. Focused tests cover ordered prompt delivery, text-file/paste normalization, queue updates, failed-middle image identity and thumbnail geometry. Browser/native suites remain for PR CI/fleet. This frontend consumes the daemon descriptor contract from #24739; send-by-reference compatibility with #23047 remains covered by the existing resource-link path and is reviewed before merge.

pr-overlap found #24715, #24335, #24259 and #24218 on shared transcript files; this PR is the ordered attachment cause and retains the existing legacy fallback. No Chief files were changed.

No private screenshots are included; synthetic gallery media and a paste-image-then-type recording will be attached before ready.

Agent session: (link removed: it named a fleet host)

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9d60d1e: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr24724 -f ref=codex/inline-transcript-pr -f platform=macos -f backend_mode=local

Gallery before/after for 9d60d1e: 16 states rendered, 2 images differ, 1827 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 40238949899 -R manaflow-ai/cmux -n gallery-advisory-24724-9d60d1ef89efde64a5d3a9dcf2982d4eec604f97 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-find-bar/empty Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/empty Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors changed 23.4% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors changed 23.4% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.coderouter-offer/claude-key Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/claude-key Apple System Colors unchanged 0% own conversation.css
agent-pane.coderouter-offer/deepseek-key Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/deepseek-key Apple System Colors unchanged 0% own conversation.css
agent-pane.coderouter-offer/sign-in Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/sign-in Apple System Colors unchanged 0% own conversation.css
agent-pane.coderouter-offer/rate-limited Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/rate-limited Apple System Colors unchanged 0% own conversation.css
agent-pane.coderouter-offer/on-coderouter Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/on-coderouter Apple System Colors unchanged 0% own conversation.css
agent-pane.coderouter-offer/moving Apple System Colors Light unchanged 0% own conversation.css
agent-pane.coderouter-offer/moving Apple System Colors unchanged 0% own conversation.css
agent-pane.composer/new-chat Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/side-session Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/side-session Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors unchanged 0% own PendingSteer.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Probably yours: accent-glass-invariants.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): categories.test.ts, serverCard.test.tsx, serverCard.test.tsx and 28 more.

CI failed on 83594a138e (run 40148943806 attempt 1): 4 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (2) code a web test failed
web / react-apps-base-check (1) code a web test failed
web / react-apps-base-check (4) code a web test failed
web / react-apps-base-check (3) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs categories.test.ts the categories are the approved ones, in order: failed (job)
  • seen on other PRs serverCard.test.tsx the card shows status, version line, socket and tailnet address: failed (job)
  • seen on other PRs serverCard.test.tsx Restart Recommended shows only when the host offers a restart, and its button asks the host to confi...: failed (job)
  • seen on other PRs serverCard.test.tsx Pair asks the host and Copy writes the address to the pasteboard: failed (job)
  • seen on other PRs serverCard.test.tsx a server without a socket or address shows neither row, and no server shows the empty line: failed (job)
  • seen on other PRs agent-pane-step-rows.test.ts every step is one 26px row on one rhythm, across transcript rows: failed (job)
  • seen on other PRs composer-bottom-space.test.ts chromium: New Tab stage with the template dots: the quiet row stays clear of the dots: failed (job)
  • seen on other PRs composer-bottom-space.test.ts webkit: New Tab stage with the template dots: the quiet row stays clear of the dots: failed (job)
  • seen on other PRs claimPaint.test.tsx a pooled Settings page claimed by the host reports its paint once its first screen is in: failed (job)
  • seen on other PRs claimPaint.test.tsx a Settings page loaded fresh reports its first paint once its first screen is in: failed (job)
  • ... 22 more in the job logs
Matched log lines
web / react-apps-base-check (2): (fail) the categories are the approved ones, in order [0.14ms]
web / react-apps-base-check (1): (fail) a pooled Settings page claimed by the host reports its paint once its first screen is in [182.35ms]
web / react-apps-base-check (4): (fail) composer at 1x: focus is the resting hairline a step brighter, no ring [67.61ms]
web / react-apps-base-check (3): (fail) chromium > a prompt the fold hides, run elsewhere, leaves no room as the stack shrinks, opens and closes [5196.88ms]

Not re-run automatically: web / react-apps-base-check (2), web / react-apps-base-check (1), web / react-apps-base-check (4), web / react-apps-base-check (3), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: bash scripts/cmux-next/tests/release-compile-derived-data.test.sh is not red on the base bb4f55a; do not merge until green; see lane-rules

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 24, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Found 56 test failures on Blacksmith runners:

Failures

Test View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs

...and 46 more test failures. View all on Blacksmith: run 40238950060, run 40238949953, run 40238950021

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-xl7k3 created for this PR by the cmux coordinator.

@cursor

cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

teamleaderleo commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

composer-opus claimed this PR (pr-owner claim --force). The owner session is on big-red, which is unreachable from huge-blue and cosmic-gray. The PR has been idle since 2026-10-24 05:00 UTC, and the 23:30 UTC notice on #24723 went unanswered. Plan: rebase onto current feat-cmux-next, fix what blocks, and land it as part of Leo's inline-attachment ask.

Agent session: huge-blue

@teamleaderleo
teamleaderleo force-pushed the codex/inline-transcript-pr branch from c585339 to bea3e9c Compare October 25, 2026 00:11
teamleaderleo and others added 4 commits October 25, 2026 00:24
…mpts stay plain

Review (Codex): a U+FFFC the person typed was deleted or took an
attachment's place; and the daemon's ordered parts for a prompt of text alone
moved it onto the inline renderer (no collapse, a far taller estimate).

An attachment the composer places carries inline: true, and the draft's marks
count only when they are one per inline attachment; otherwise every U+FFFC is
the person's text. Strip attachments go after the text. A prompt whose ordered
parts are text alone keeps the plain bubble and its estimate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f92-8e97-7612-a175-ee20c92ddc36&host=huge-blue
…ordered metadata without marks

Re-review (Codex): every attachment prompt sent ordered metadata the host's
allowlist does not take yet (#24722) and switched to the inline bubble; and a
text-only queue update kept the parts it replaced.

Optimistic parts and the inlineParts metadata go only with the composer's
marks. A recorded prompt renders ordered only when text follows an attachment;
text alone, or text then its attachments (every strip prompt), keeps the plain
bubble and its images. A record that is not interleaved is an empty list, so it
replaces the parts a queued prompt had.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f92-8e97-7612-a175-ee20c92ddc36&host=huge-blue
Re-review (Codex): the queue_updated reducer kept the row's old images when
the record omitted them, which an edit that took the last image out does. Back
to base: the record names every image the prompt keeps. The queued-images test
gains a text-only edit (a guard: its queue listing already clears the images).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f92-8e97-7612-a175-ee20c92ddc36&host=huge-blue
teamleaderleo added a commit that referenced this pull request Oct 27, 2026
…25717)

* test(next): cover ordered inline send retention

The direct-client test passes wire order on base but fails because optimistic rows lose ordered parts before a delayed echo. Run: bun test src/agent-session/acpmux/inlinePrompt.test.ts (0 pass, 1 expected fail). Adapted the fake socket pattern from #24724.

Co-authored-by: Leo Li <cheerleaderleo@outlook.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1

* feat(next): model ordered prompt content and replay

Adapt #24724 ordered prompt metadata to ID-bound attachment tokens. Keep each image occurrence distinct, retain video previews by file URI, and model validated companion block relations without hiding wire attachments.

Co-authored-by: Leo Li <cheerleaderleo@outlook.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1

* test(acpmux): cover durable image companion identity

cargo test -p acpmux --lib inline_parts_validate_companion_relation --locked -j 4 selects one test and fails on missing blockIndex. Repeated identical image bytes must retain separate companion block identities; invalid cross-kind and out-of-bounds relations must not persist.

Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1

* fix(next): retain ordered prompt attachments through retry and echo

Carry ordered metadata through optimistic rows, acceptance before reply, durable echo, queue edits, Retry and take-back. Keep every repeated image occurrence, original local bytes and video previews for refused-send recovery. Authoritative queue edits cannot resurrect the original draft.

Validate an image original-file companion only when its resource link immediately follows that prompt image, then persist its block identity without removing the harness file block. All authoritative inlineParts surface to the view setting; strip sends keep their wire formatting.

Verification: bun run check:fix; 45 focused web tests and 147 assertions pass. cargo test -p acpmux --lib hub::prompt_images::tests --locked -j 4 passes 8 tests. Red behavioral tests were committed before the transport and daemon fixes.

Co-authored-by: Leo Li <cheerleaderleo@outlook.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1

* test: cover strip echo attachment recovery

Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1

* fix: prefer retained strip attachments after echo

Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing as superseded. #25717 (merged 2026-10-27) already carried this PR's ordered prompt-content model into base, and merging base into this branch now gives 45 conflict blocks across 8 files, so finishing it would mean rewriting it. The remaining piece, drawing text, images and file chips in sent order, is open as #26547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant