Skip to content

fix(next): retain ordered prompt attachments through send and retry - #25717

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/nx-inline-send
Oct 27, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/nx-inline-send

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-26: “Attachments sitting inline in the composer text where you dropped them, instead of as a row of chips. — this one, like the imessage mac app. we're already doing the claude/codex ways rn”

Retain the original input, attachment IDs, local bytes, image originalPath companions and video metadata through optimistic send, echo, queue, Retry, Edit and take-back. Failed Retry/Edit keeps every one of eight screenshots and its preview source. After a strip-mode send echoes, Retry/Edit now prefers the page's retained attachments instead of rebuilding incomplete attachments from display metadata. Strip remains the default with its existing wire format.

Ordered metadata keeps repeated identical attachments distinct. The daemon validates a narrow companion relation against the adjacent image block and copies that relation into durable inline parts; the original file block still goes to the harness. This PR does not add upload-reference transport or change slow-ACK policy. Durable queue-edit display metadata and visible-bubble rendering are separate follow-ups.

Validation at 0bad66de1392434b40c66d0567c876981d0b76cf (796 changed lines):

  • Red-first wire/optimistic regression: bb600d699cd7; durable companion regression: 90f6ecfb1bca; new strip-echo retention regression: de3b90427c3e failed before the repair.
  • 43 focused web tests / 147 assertions pass, including the eight-image explicit daemon-refusal Retry/Edit test and strip-echo unchanged/edited recovery.
  • bun run check:fix: no formatting, lint or type errors across 2,802 files. Broader scripts/web-lint.sh reports only the inherited keybindings/styles.css layer violation; that file is unchanged against base 4e28d9cf44d9ec587ad96d223ced6e5bc2c7f5b0.
  • Exact-head prepush gate passes with no new violations. Earlier focused daemon prompt_images tests: 8 pass.
  • Fresh independent Astra xhigh full-diff re-review: SHIP at this exact head. Runtime native upload and final bubble rendering are not claimed by these receipts.

Agent session: gcp-agent-lane-1

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
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
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
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
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 23854aa: 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=pr25717 -f ref=lane/nx-inline-send -f platform=macos -f backend_mode=local

Probably yours: composer-bottom-space.test.ts, composer-bottom-space.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): agent-pane-background-tasks.test.ts, agent-pane-hairline-focus.test.ts, agent-pane-hairline-focus.test.ts and 27 more. This PR merged before its CI finished: fix forward on main.

CI failed on 0bad66de13 (run 40424638356 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 (4) code a web test failed
web / react-apps-base-check (3) code a web test failed
web / react-apps-base-check (1) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs agent-pane-background-tasks.test.ts the summary card lists the chat's background tasks: running ones first, the finished folded: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts composer at 1x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts newtab at 1x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts composer at 2x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts newtab at 2x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts under Increase Contrast a focused edge keeps the resting edge, never a dimmer one: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts keyboard focus changes what a solid Send, Stop, the prompt editor's Send and a plain button paint; s...: failed (job)
  • seen on other PRs agent-pane-jump-latest-motion.test.ts chromium: a reply streaming in during Jump to latest's glide is followed to its latest row: failed (job)
  • seen on other PRs accent-glass-invariants.test.ts no orange or system accent and no opaque glass on 2215 gallery stages: failed (job)
  • seen on other PRs agent-pane-agents-pill.test.ts by default the running agents sit in the tray above the composer, not in the transcript: failed (job)
  • ... 22 more in the job logs
Matched log lines
web / react-apps-base-check (2): (fail) the summary card lists the chat's background tasks: running ones first, the finished folded [1096.69ms]
web / react-apps-base-check (4): (fail) no orange or system accent and no opaque glass on 2215 gallery stages [552155.11ms]
web / react-apps-base-check (3): (fail) a chat on an SSH machine > counts its running turn from the prompt and offers no machine switch mid-chat [30907.09ms]
web / react-apps-base-check (1): (fail) 0 .mov 300 MB drop local [3119.97ms]

Not re-run automatically: web / react-apps-base-check (2), web / react-apps-base-check (4), web / react-apps-base-check (3), web / react-apps-base-check (1), 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.

web and size checks: green

Gallery before/after for 0bad66d: 16 states rendered, 3 images differ, 1979 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 40424638316 -R manaflow-ai/cmux -n gallery-advisory-25717-0bad66de1392434b40c66d0567c876981d0b76cf (then read gallery-review.json)

States
State Theme Status Diff Picked by
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.5% 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.5% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light changed 1.53% own App.tsx
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
agent-pane.composer/new-chat-suggest-failing Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/agent-home Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/agent-home Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer/agent-home-path Apple System Colors Light unchanged 0% own PendingSteer.tsx
agent-pane.composer/agent-home-path Apple System Colors unchanged 0% own PendingSteer.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors unchanged 0% own App.tsx

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

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

blacksmith-sh Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Found 124 test failures on Blacksmith runners:

Failures

Test View Logs
test/agent-pane-attach-huge-files.test.ts/agent-pane-attach-huge-files.test View Logs
test/agent-pane-attach-huge-files.test.ts/agent-pane-attach-huge-files.test View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-dock-gutters.test.ts/agent-pane-dock-gutters.test View Logs
test/agent-pane-dock-gutters.test.ts/agent-pane-dock-gutters.test View Logs
test/agent-pane-hairline-focus.test.ts/agent-pane-hairline-focus.test View Logs
test/agent-pane-hairline-focus.test.ts/agent-pane-hairline-focus.test View Logs

...and 114 more test failures. View all on Blacksmith

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

@teamleaderleo
teamleaderleo merged commit e228dbf into feat-cmux-next Oct 27, 2026
129 of 141 checks passed
@teamleaderleo
teamleaderleo deleted the lane/nx-inline-send branch October 27, 2026 00:13
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

high-signal review link / link is red on 14 of 16 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

2 inactive deployments
artifacts — 0bad66de Deployed Oct 27, 2026 by teamleaderleo via add the Windows daemon to the tree #60952
sentry-dsyms — 0bad66de Deployed Oct 27, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #60952
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