Skip to content

🔥 remove the sort toggle from the search window - #5235

Merged
guiyanakuang merged 1 commit into
mainfrom
remove-sort-toggle
Oct 20, 2026
Merged

guiyanakuang merged 1 commit into
mainfrom
remove-sort-toggle

Conversation

@guiyanakuang

Copy link
Copy Markdown
Member

Removes the newest/oldest sort toggle from the search window, together with the sort state behind it (SearchBaseParams.sort, SearchParams.sort, PasteSearchViewModel.switchSort()). Search results are always newest first.

Why:

  • The search window is keyboard driven: open it and press Enter to paste the first result, which is the latest copy. With the toggle flipped, Enter pastes the oldest record instead, and the order stays flipped for the rest of the session, so one accidental click keeps pasting the wrong item.
  • Oldest-first is rarely what clipboard history is used for; search, type and tag filters already cover finding older items.
  • The mobile apps drop the same toggle (pasteboard and keyboard), and they share this view model through the synced common code.

The DAO-level sort parameter stays: the CLI history?sort= option, MCP tools and the mobile widgets/shortcuts still use it.

Also removes the now-unused sort_newest_first / sort_oldest_first strings.

Verification: ./gradlew :app:desktopTest for PasteSearchViewModel, GeneralPasteSearchViewModel, PastePanelViewModel and the i18n consistency/copywriter tests (51 tests, all pass).

hide

@guiyanakuang
guiyanakuang merged commit e9e8521 into main Oct 20, 2026
7 checks passed
@guiyanakuang
guiyanakuang deleted the remove-sort-toggle branch October 20, 2026 05:01
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