Repository navigation
fix(platform): preserve attachments when editing chat messages - #4223
Conversation
There was a problem hiding this comment.
ACCEPT — independent source and targeted-jsdom review
Exact head: f94581c971fe721dd9ec3d53644843a741a783df, PR #4223 / TALE-191 / #3647. Reviewer: Codex #10, agent a0f9fd03-7af6-4c69-b602-755201d86f89, run 25fc0eee-284d-4f47-846e-a40e7ea76fb2 (TALE-546), distinct from author Codex #13 / agent 7155f7ae-b6f7-427b-9541-2edaf36abfdb / run 775913b2-3d4c-45d7-87d0-d105920410cf.
No actionable correctness, security or regression finding in this scope.
- The edit maps original uploaded parts to ref/name/type/size in attachment order, following the existing server regenerate projection (including its missing-size fallback). The same array feeds the send request and optimistic pending message. Normal composer sends retain their existing mapping.
- Edits neither take staged composer files nor consume video-link jobs; existing rollback guards remain composer-only. Regenerate still uses its original-prompt branch and never calls the normal send path.
- EN/DE/FR attachment docs accurately describe retention and match existing UI labels. CHAT-F8 and the automation register correctly separate component proof from persisted cards after reload; the box remains unticked.
Independent evidence at this head:
- Existing targeted jsdom tests: 127/127 passed across five files (ChatSurface 67, thread-view core 29, chat backend 17, branch actions 11, edit form 3). One worker, existing dependencies, 2 GiB Node heap, 30-second per-test ceiling; no assertion changes.
- Parent-source negative control: current regression with only ChatSurface replaced in-memory by parent
9b7463b707c5e44349f0a8c51e764a39e3e5c4fb: attached edit fails on omitted attachments, attachment-free control passes (65 unrelated cases skipped). Checkout unchanged. - Review-only strengthened probes: 2/2 pass. Additional assertions check both PDF/image parts in the actual
buildPendingUserItemoutput, all metadata/order, and zero calls to the composer'ssetAttachmentsas well asclearAttachments. Only test instrumentation changed in-memory; no product edits. Initial probe setup had a duplicate import (no tests executed); corrected harness passes, with the initial log retained. - Clean checkout and
git diff --checkpass. Disk first 223 GiB, minimum observed 215 GiB, above the 20 GiB floor.
Unrun proof / landing limits: mocked reads/writes, not real HTTP/database persistence. No real browser, reload/card/manual round, visual/layout/focus/screen-reader gate, provider, stack/container, E2E, full suite/build, local lint/format/typecheck/docs/manual/SAST gates or CI cache/artifact audit. Author-reported gates are not independently rerun or claimed here. Latest passive CI snapshot at 03:41Z: one successful check, seven queued, no terminal all-green result. No CI rerun/cancel.
This COMMENT is explicit independent acceptance of the source/component behavior, not GitHub shared-principal approval, native human-review approval, merge clearance or completion of live/manual persistence acceptance. TALE-359 retains CI and remaining acceptance/landing disposition. No commit, push, merge, card move or protected-review change.
Raw logs, parent-source control and strengthened harness are delivered on TALE-546 in /agent/output/30af1d7f-787b-4340-b942-e33043f1e542/.
What changed
Verification
red-test.log).bun run lint:manual, chat guide reference checker andgit diff --checkpassed.Closes #3647
Independent review requested through TALE-359; author does not merge or move the task.