Skip to content

fix: keep preparing Home attachments across page and dock switches - #157013

Merged
steipete merged 1 commit into
mainfrom
codex/attachment-handoff618
Sep 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/attachment-handoff618

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes attachments disappearing when you leave Home for another page and open the Home dock while a selected file is still being prepared.

User Impact

Your Home draft keeps the preparing file, its progress and Remove action across page/dock switches. Send waits for preparation, and the completed attachment remains available when you return Home.

Why This Change Was Made

The draft handoff moved completed attachments but left active file reads in the old composer. Transfer the existing read lifecycle with the draft and retarget its completion callbacks and render notifications to the current composer. The old controller receives an empty lifecycle, so disposing it cannot cancel the transferred read. Existing conversation/profile ownership checks remain authoritative.

Evidence

The actual browser route selects a synthetic text file, holds its native FileReader, navigates Home → Agents → Home dock, completes the read, and returns Home. On the original code the dock has no pending tile, Send is enabled, and the returned draft has no attachment. With the repair the pending tile and Send gate survive, followed by the completed file and its Remove action. No model/provider request is involved.

  • Registered component regression failed on original production. The repaired six-file controller, handoff, recovery, attachment, paste and New Session selection passed all 90 tests in 17.06s grouped wall time. The two new repeated-transfer cases took 42ms and 7ms; they also verify progress notifications, old-controller disposal, removal, and exact completed payload custody.
  • Canonical Chromium/Vite production-bundle route: original RED, 17.01s wall; repaired GREEN, 15.51s wall, including a 9.51s UI build and 1.541s scenario. Both runs kept their source unchanged.
  • Fresh independent review found no actionable P0–P2 findings. UI production, chat-fixture and E2E-fixture type graphs passed (40.53s / 44.03s / 44.03s), as did scoped typed lint, boundary guards, format, line-growth/assertion ratchets and import-cycle checks.

The first scoped lint run caught three older browser-fixture callbacks that did not return the new native-read completion Promise. Those callers now return it to their existing await; lint passed after correction. All nine selected handoff, rewind, paste and session-switch browser cases then passed in 23.02s grouped wall time (including the canonical UI production bundle).

Before/after screenshots below show both the dock during preparation and Home after file completion. All captures use synthetic data.

Before: preparing file disappears from Home dock and Send enables

After: Home dock retains preparing file and waits before Send

Before: attachment is lost when returning Home after read completes

After: completed attachment remains with the Home draft

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 24, 2026 04:28
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Sep 24, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 12:54 AM ET / 04:54 UTC.

ClawSweeper review

What this changes

The Control UI moves an active file read with the Home draft between page and dock composers, preserving preparation status, Send gating, and the completed attachment.

Merge readiness

✅ Ready for maintainer review

Keep open for normal landing review. Current main still loses an in-progress Home attachment during page and dock handoff; the branch has focused browser proof, and I found no blocking correctness or security defect.

Priority: P2
Reviewed head: 9c390a64ff12bcc5e0697c0fd60f866161f5c27b

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Direct before/after browser evidence and a focused repair with relevant regressions provide strong confidence.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
Evidence reviewed 7 items Current-main gap: The current-main handoff moves completed attachments but clears the source draft without transferring active reads.
Introduced handoff: The pinned PR delta transfers the read lifecycle after moving the draft, and the verified test merge retains that change against its main parent.
Completion destination: Adoption retargets pending-read callbacks to the active composer; completion reads and publishes attachments through that destination before releasing the pending count.
Findings None None.
Security None None.

How this fits together

The Control UI turns a locally selected file into a chat attachment while the browser reads it. The Home page and dock hand the same draft between composers, which then controls attachment display and whether Send is available.

flowchart LR
A[Selected Home file] --> B[Browser file read]
B --> C[Composer read lifecycle]
C --> D[Scoped page or dock handoff]
D --> E[Active draft and progress]
B --> F[Completed attachment]
F --> E
E --> G[Send availability]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +58, Tests +207, Docs +2. Total +267 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 5 70 12 +58
Tests 3 219 12 +207
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 291 24 +267

Review metrics

Metric Value Why it matters
Production and test growth production +58 net lines, tests +207 net lines The production growth implements read custody in the existing composer owner; the tests cover the browser route and repeated transfers.

Technical review

Best possible solution:

Keep one scope-checked read lifecycle with the active Home composer and retain browser coverage for navigation, removal, and completion.

Do we have a high-confidence way to reproduce the issue?

Yes. The contributor captured the failing browser route on original code, and current main still has that handoff path; this read-only review did not execute it locally.

Is this the best way to solve the issue?

Yes. Moving the existing read lifecycle with the scoped composer draft repairs the owner boundary without adding another attachment store.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6a6f8a6ecec2.

Labels

Label changes:

  • add P2: A narrow but reproducible Home navigation window can lose a selected attachment before it is sent.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.

Label justifications:

  • P2: A narrow but reproducible Home navigation window can lose a selected attachment before it is sent.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed Control UI read owner was exercised through a Chromium/Vite Home file selection with a deferred native FileReader and mocked Gateway: the inspected before/after captures and reported browser run show the pending dock tile and Send gate survive, then the completed file remains on returning Home. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 933e32b into main Sep 24, 2026
166 of 169 checks passed
@steipete
steipete deleted the codex/attachment-handoff618 branch September 24, 2026 05:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant