Repository navigation
cmux NEXT: render sent attachments in draft order - #24724
teamleaderleo wants to merge 10 commits into
Conversation
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: |
|
Found 56 test failures on Blacksmith runners: Failures
...and 46 more test failures. View all on Blacksmith: run 40238950060, run 40238949953, run 40238950021
|
|
Bead |
Bugbot needs on-demand usage enabledBugbot 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. |
|
Owned by an agent session · session |
|
composer-opus claimed this PR ( Agent session: huge-blue |
Agent-Session: unknown
c585339 to
bea3e9c
Compare
…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
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a16c64-423a-7bf3-9ce3-e6c13b1732ad&host=big-red
…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
|
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. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
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
queue_updatedmetadata instead of stale queued entry metadata.Base
0bf767563cae3a50cbca19ab477f0a39c87ee675; headc5853390b40fae1bb896ecb5f9d8039b0174c2d2.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-overlapfound #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)