Skip to content

Add ordered multi-selection to clipboard history - #14760

Open
felix-antonio-sl wants to merge 1 commit into
omacom:quattrofrom
felix-antonio-sl:clipboard-multiselect
Open

felix-antonio-sl wants to merge 1 commit into
omacom:quattrofrom
felix-antonio-sl:clipboard-multiselect

Conversation

@felix-antonio-sl

Copy link
Copy Markdown

Clipboard history currently pastes one saved entry at a time. This adds Ctrl + click and Ctrl + Space to select text entries and combine them with Enter (paste) or Shift + Enter (copy only). The full texts are joined with newlines in the order they were selected.

Selected rows show their position in the group, and the preview displays the combined text. Marks survive filtering and history reordering, are pruned when entries are deleted or evicted, and reset on each opening. Images, file URI entries and Alt + Enter retain their individual actions.

The combined copy writes the complete payload to wl-copy through stdin, keeping large clips and shell syntax literal. It sends the existing Shift+Insert paste gesture only after copying succeeds; a copy failure keeps the selection available for retry. The rendered preview remains capped at 8192 characters.

Includes the clipboard selection helper, regression coverage integrated into test/shell.d/clipboard-selection-test.sh, and user-facing instructions in the manual. No new dependencies or migrations.

Validation

  • New clipboard selection suite: 36 assertions passed, including real QML handlers executed with isolated model/process fixtures, history eviction, native image/file dispatch, a 200,000-character payload and copy failure/retry behavior.
  • Existing clipboard-test.sh: 84 assertions passed after the change.
  • qml-text-format-test.sh, color-reference-test.sh, QML parsing with qmlformat, bash -n and git diff --check: passed.
  • Additional local Qt check: the production key/mouse handlers and Process/Timer blocks passed with external commands replaced by file receivers. This exercises Qt's stdin transport without sending desktop input.
  • Visual check in the running Omarchy shell with synthetic history: selection numbering, combined preview and footer fit correctly. The temporary fixture did not capture the real clipboard and was removed afterward.
  • Independent code review and a separate run of the new selection suite: passed.

I also ran ./test/all before modifying the checkout, at base 9d48fc4, with compositor-dependent checks disabled. The CLI suite passed. The shell suite ran 325 test files, with skipped checks in 27 files and these eight existing failures:

Test file Baseline failure
config-test.sh Companion omarchy-pkgs checkout unavailable
default-agent-test.sh Grok registry migration npm-tool removal assertion
elsewhen-migration-test.sh Legacy cache removal assertion
launch-browser-test.sh Installed PATH lacks the newer default-browser/handoff helpers
passwordless-grant-lifecycle-test.sh Companion omarchy-pkgs checkout unavailable
snapper-test.sh Companion omarchy-pkgs checkout unavailable
theme-intro-switch-test.sh Compositor reload during intro playback assertion
unowned-system-paths-test.sh Companion omarchy-pkgs checkout unavailable

Those areas are unchanged by this PR. The graphical VM acceptance suite and pasting into a real destination application were not run as part of this contribution check.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defect was found.

Summary

Adds ordered text selection to clipboard history.

  • Clipboard history combines text entries in the order you select them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Ctrl + click / Ctrl + Space"] --> B["Toggle text selection"]
  B --> C["Number rows and preview joined text"]
  C --> D["Enter / Shift + Enter"]
  D --> E["Write full text to wl-copy stdin"]
  E --> F{"Copy succeeds?"}
  F -->|No| G["Reopen picker and keep marks"]
  F -->|Yes| H["Clear marks"]
  H --> I{"Copy only?"}
  I -->|No| J["Wait 150 ms and send Shift+Insert"]
  I -->|Yes| K["Leave picker closed"]
Loading

Reviews (1) · Last reviewed commit: "Add ordered multi-selection to clipboard..." · Reviewed by Greptile

@jandrusk

Copy link
Copy Markdown

Ordered multi-select with newline-joined paste/copy is a nice clipboard-history upgrade, and piping the full payload to wl-copy via stdin is the right way to keep large clips literal.

Product call: is multi-select something we want stock (discoverability of Ctrl+click / Ctrl+Space), or should it stay behind a setting? From a code/test read this otherwise looks ready for review. Nearby clipboard PRs (#14919 bound/prune, #15137 text/plain) touch adjacent surfaces — worth a quick conflict check.

@felix-antonio-sl

Copy link
Copy Markdown
Author

The current proposal makes multi-select available by default, with no setting. The picker footer shows Ctrl+click / Ctrl+Space, and the manual covers selection order and copy/paste behavior.
From a static comparison, #14919 overlaps Clipboard.qml and the manual; retaining and pruning marks needs particular attention as history updates become asynchronous. #15137 changes separate files and applies the same explicit UTF-8 MIME type to single-entry copies.
This is a static comparison, not a combined integration test.

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.

2 participants