Repository navigation
fix(image-paste): clear draft attachments on session start - #743
Conversation
|
@tt-a1i 请审核此 PR。当前精确提交的 GitHub CI 已全部通过,修改范围与回归测试均已在 PR 说明中列明;现仅等待维护者审核。 |
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed head: 284d48ec2b9a8b20c6e046a50d392879aa2456b1 against main a18f457687b45c877bc8a15d689a7580c4f0659a.
Standards: no confirmed code-level blocker in the scoped change.
Spec: the inspected change matches the stated behavior in this PR. #743 and #688 overlap in Session draft cleanup; retain one integrated behavior and both relevant regressions.
Validation: node --test --experimental-strip-types tests/extensions/image-paste/index.test.ts: exit=0; ℹ tests 36; ℹ pass 36; ℹ fail 0; ℹ skipped 0
The unchanged-head focused receipts are reused after a live head/main refresh; #718 uses this round's latest-head tests. This code review does not claim installed-runtime, live-provider, full merged-queue or visual acceptance. No merge is authorized by this review.
Problem
Image-paste draft placeholder mappings lived until
session_shutdown, although Pi can begin/new,/resume, and/reloadsessions throughsession_start. A new Session could expand[Image #1]to a previous Session's temporary path.Closes #742
Value
Clipboard-image draft state is now correctly scoped to one Pi Session.
Approach
session_start.Validation
node --test --experimental-strip-types tests/extensions/image-paste/index.test.ts(36 passing)bun run checkImpact
Existing submission, dequeue, and history-recall behavior stays unchanged within a Session. Only stale mappings are discarded at its boundary.