Skip to content

Add bounded PRIMARY selection publication - #658

Merged
wieslawsoltes merged 1 commit into
mainfrom
feature/primary-selection-publish-657
Sep 19, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
feature/primary-selection-publish-657

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Problem

Browser-workbench Code OSS does not load Electron's Linux selection-clipboard contribution, so its focused text selection never updates X11 PRIMARY.

Result

  • Emits the exact one-way zero-ID CLIPBOARD_WRITE + REPLACE|PRIMARY + text/plain host request.
  • Sources only settled, focused, connected, writable, non-password input/textarea selections.
  • Caps publication at 64 KiB, rejects invalid UTF-8 and oversize values without truncation, and keeps the previous PRIMARY state on collapse or ineligible selection.
  • Coalesces rapid changes by replacing at most one queued publication while preserving completion-bearing host requests and the aggregate queue cap.
  • Suppresses input-intermediate checkpoints and flushes after settled task/microtask boundaries.
  • Retires queued top-level and nested-frame stale publications during navigation/teardown.
  • Exposes no JavaScript API or promise and logs no selected text.
  • Adds focused contracts, including 10,000 same-task updates coalescing to one publication, and updates the Code OSS API ledger.

Readonly, contenteditable, general DOM Selection, and large/multicursor editor-model selection remain separate follow-up scope.

Closes #657.

Validation

git diff --check passed. Under the agreed fast merge policy, no local builds or runtime tests were run.

@wieslawsoltes
wieslawsoltes merged commit 88797e2 into main Sep 19, 2026
2 of 7 checks passed
@wieslawsoltes
wieslawsoltes deleted the feature/primary-selection-publish-657 branch September 19, 2026 12:22
This was referenced Sep 19, 2026
This was referenced Sep 19, 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.

Publish bounded focused text selection for X11 PRIMARY

1 participant