Keep asynchronous clipboard files with their original composer

This commit is contained in:
2026-11-08 00:10:34 +00:00
parent d9a99457cf
commit b08d458c4b
3 changed files with 60 additions and 6 deletions
+6
View File
@@ -11,3 +11,9 @@ Verification:
- Full app browser fixture evidence: `/tmp/review/unfocused-paste-final/` and `/tmp/unfocused-paste-capture.json`. Uses in-process fixtures, synthetic events and private Chrome only. Synthetic paste validates routing/default-prevention; it does not claim trusted OS clipboard integration or native-device verification.
Harness limitation: importing full app widget dependencies into Flutter's Chrome test runner collides with SDK `host.dart.js` naming and hangs at loading. That attempt was interrupted and is not counted as passing. Browser bridge tests and a release-mode full app fixture avoid that test-server issue. No real chats or device clipboard were used. Work preserved for pipeline continuation; no commit, deployment or shared-service restart performed here.
Manager review: an accepted asynchronous file paste belongs to the original chat,
including when quick-switch makes it inactive while bytes decode. Listener
callbacks capture composer identity so decoded files/errors cannot attach to a
replacement composer that reuses the State; changing composer rebinds the listener.
Regressions cover both retained inactive ownership and stale-completion rejection.