Skip to content

fix(preview): release stalled excerpt clipboard attempts - #5495

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-source-excerpt-copy-deadline-20260916
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-source-excerpt-copy-deadline-20260916

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

Published-source line excerpts disable Copy while waiting for the browser clipboard promise. If that promise remains pending (for example, an unresolved clipboard permission interaction), the control stays on Copying excerpt... indefinitely and never exposes its manual-copy receipt.

Bound each clipboard attempt to five seconds, release the button on timeout, preserve the exact selected text and show the existing manual-copy instruction. Retain generation ownership so a late clipboard result cannot label a newer range as copied. Clear the deadline after success or failure.

Overlap check

Searched open and closed upstream PRs for excerpt clipboard and inspected the complete public-beta changed-file index for PixelSourceExcerpt.jsx and its parent PixelPreviewSource.jsx. #4458 introduced excerpts, #5366 remounts stale source controls, and #4223/#4107 bind whole-source clipboard feedback to the current copy. None limits a pending excerpt write or releases its disabled button. This scope keeps the existing verified-source and range lifecycle contracts.

Regression coverage and validation

  • Before the fix, a pending clipboard operation still disabled the rendered Copy control after five seconds and no manual-copy receipt appeared.
  • The regression renders the real excerpt UI, holds a clipboard write pending, advances its deadline, changes the line range, settles the old write and completes a fresh copy. It verifies unchanged source text, no stale Copied receipt, exact new clipboard bytes and timer cleanup.
  • npm test -- --maxWorkers=2 src/components/PixelSourceExcerpt.deadline.test.jsx src/components/PixelPreviewSource.excerpt.test.jsx src/components/PixelSourceControls.lifecycle.test.jsx: 8 passed.
  • Focused ESLint and git diff --check: passed.
  • Shared public-beta baseline: dashboard 1,232 tests passed, lint/build passed. Full repository baseline failures are unrelated no-sudo Docker fixture behavior and all-files private-key fixture/missing Windows awk checks; no checks were disabled.

Limits and rollback

The browser clipboard API cannot cancel an already submitted write. The timeout bounds UI waiting and receipt ownership; it does not promise that the OS will never complete the old clipboard write. Manual selection remains possible. Tests exercise the browser API boundary, not a live OS permission dialog. No persistence or backend changes; reverting restores the indefinite disabled state. Ready for review.

Final beta-batch receipt — 2026-09-16

Candidate: f5becb78f20cc1fde62525f12b28fa10052d7677. GitHub check audit at 11:07:47 UTC: 37 successful, 4 skipped, 0 failed, 0 pending, matching this exact head; OPEN, public-beta base, Ready (not Draft). Skipped checks are not counted as passed tests.

The combined integration head, 5b9877184ceab0751c6c9fe3564c73303e78f0a3, contains all 30 exact candidate heads on public-beta 3c186f3f12ba21dad7b7266ec5449393529abb00. At this exact final SHA: full dashboard 171 files / 1,274 tests passed; full dashboard API 3,124 passed, 2 skipped; advice boundary suite 23 passed; Bark request/legacy-empty cases 9 passed; changed-file secret/key/size hooks and diff check passed. Shell-only hooks had no matching changed files.

Additional combined checks ran at predecessor 28adf1aa5c0710d3c0de13df7870629e24977fec: Token Spy 130 passed, 1 skipped; CLI contracts 16 passed; real backup/restore round trip passed; Open Interpreter HTTP/runner cases 4 passed; make lint smoke simulate, frontend lint (zero errors, 624 warnings) and production build passed. The only final-head differences are two test files (advice dialog fixtures and Bark's empty-text expectation); production files are identical. These results are not live GPU/model or service rollout qualification.

Qualified merge order: #5490 → #5494 → #5495 → #3848 → #3846 → #3845 → #3844 → #3843 → #3841 → #3838 → #3837 → #3836 → #3835 → #3834 → #3809 → #3808 → #3807 → #3806 → #3804 → #3803 → #3802 → #3801 → #3800 → #3712 → #3711 → #3710 → #3709 → #3708 → #3852 → #3849. Branches are independently useful. Shared-file merging required only preserving the union of four adjacent Makefile registrations: provider-probe redirects, healthcheck error-body, Milvus persistence and healthcheck latency. Production code in these 30 merged without manual conflict resolution. External advice/Bark overlaps have separate pairwise receipts in #5494/#3808. Recheck the combined tree if other shared-file PRs land first; do not drop test registrations.

Full release qualification remains not green: baseline make gate fails a no-sudo Docker fallback fixture; 5 of 428 BATS cases fail in this environment; all-files private-key scanning flags two pre-existing dummy-key fixtures. No checks were disabled. CI success and Ready status do not replace independent human review, especially for auth backups and Milvus data migration. No upstream merge or deployment was performed.

This was referenced Sep 16, 2026
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.

1 participant