Repository navigation
fix(portal): recover stalled source-excerpt clipboard attempts - #7869
Merged
Lightheartdevs merged 1 commit intoOct 23, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release a stalled verified-source excerpt clipboard attempt after five seconds, preserving the selected text and showing the existing manual-copy instruction. Clear each deadline after success, rejection, range change or unmount, and retain generation ownership so late completion cannot confirm a newer selection.
Fixes #7868
Current-main successor to retired-beta #5495. Reproduced independently on main 5c8aeaf; no historical test results are reused.
AI Assistance
tang-vu provided project direction, scope decisions and environment setup. Codex assisted current-main analysis, implementation, regression tests and validation commands. Listed commands were agent-executed; no independent human release verification is claimed.
Release Lane
Changed Surface
Risk And Validation
Medium: one source-review clipboard flow. No API, installation or persisted-state change.
Red: npm.cmd test -- --maxWorkers=2 src/components/PixelSourceExcerpt.deadline.test.jsx failed on untouched main because Copy remained disabled after five seconds.
Green: full Dashboard tests, lint and production build recorded in excerpt-receipt.json (249 files / 2,618 tests passed; lint 0 errors / 891 warnings; build passed).
New tests run through .github/workflows/dashboard.yml's existing npm run test step on Linux, Windows and macOS.
Commit identity gate and git diff --check pass.
Operational Change Check
Notes For Reviewers
The clipboard API cannot cancel a submitted OS write. This bounds UI waiting and feedback ownership; a late original write may still reach the clipboard. Manual text remains selectable throughout. Tests simulate a pending browser API promise, not a live OS clipboard permission dialog; no fresh install, model/harness or fleet claim is made for this UI-only fix. Revert restores the previous indefinite wait. No open overlapping excerpt fix found; #4458 introduced the flow, #5366 fixes remounting on file changes, #5495 was the retired-beta attempt.
Why this matters
A browser clipboard promise may remain pending. The verified-source excerpt control then remains disabled as Copying, preventing retry or manual recovery. Apply the same bounded interaction contract used by the other source/message copy controls, preserving range ownership when the user changes the excerpt.
Overlap check
All-state excerpt/clipboard searches and the full current open-PR changed-file inventory found no active equivalent. Closed #5495 targeted retired public-beta. Current main was independently reproduced and the new tests run in the existing frontend workflow.
Independent review
A separate API-focused agent reviewed timer cleanup, Promise.race settlement, range fencing and unmount behavior. Root confirmed the production diff is unchanged from that reviewed version; the final follow-up fixes only test timer accounting. No blocking finding. Browser clipboard operations themselves cannot be cancelled, so late completion is fenced from UI state.
Combined batch validation (2026-10-21)
Exact PR head:
55561ee532dbc1a512eb8a3448769721f6ed077d. All ten independent scopes were combined on main5c8aeaf10in the published QA source. Only additive CI manifest/Windows-test-step conflicts needed resolution; all entries/steps were retained.Agent-executed combined checks: 2,625 frontend tests (251 files), lint (zero errors) and build; 185 API/build-context tests; CLI HTTP and real-process lifecycle suites; native Windows voice/report/chat scenarios; shell/Python lint, CI inventory, platform smoke and installer simulation passed. All ten commit ranges passed Gitleaks 8.30.1.
Broader local runs are explicitly not all green: unmodified main's
make gatehas four CLI diagnostic-fixture failures in this isolated container. Combined Bats has two failures, both reproduced on exact main with the repo-pinned Bats helpers (WSL-kernel dispatch expectation and Docker fixture's missing helpers). These were not changed to fill this scope. Hosted CI is tracked on each exact head; installed/fleet and independent human release review remain separate from these source-QA results.