Skip to content

fix(portal): recover stalled source-excerpt clipboard attempts - #7869

Merged
Lightheartdevs merged 1 commit into
Osmantic:mainfrom
tang-vu:fix/portal-excerpt-clipboard-deadline
Oct 23, 2026
Merged

Lightheartdevs merged 1 commit into
Osmantic:mainfrom
tang-vu:fix/portal-excerpt-clipboard-deadline

Conversation

@tang-vu

@tang-vu tang-vu commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Mainline change targeting main

Changed Surface

  • Dashboard UI

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

  • This is not an operational change.

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 main 5c8aeaf10 in 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 gate has 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.

@Lightheartdevs
Lightheartdevs merged commit 61f52a7 into Osmantic:main Oct 23, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verified-source excerpt copy remains disabled after a stalled clipboard request

2 participants