Skip to content

feat(gui): Sort by relevance checkbox (--rank)#13

Merged
exbuf merged 1 commit into
mainfrom
feat/gui-ranking
Jul 21, 2026
Merged

feat(gui): Sort by relevance checkbox (--rank)#13
exbuf merged 1 commit into
mainfrom
feat/gui-ranking

Conversation

@exbuf

@exbuf exbuf commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What

Slice 3 (final) of relevance ranking — a "Sort by relevance" checkbox in the GUI's Advanced Search Options, the desktop equivalent of --rank. Ranking is now on all four surfaces: CLI, Python API, MCP, and GUI.

Wiring (end to end)

  • Widget (_mixin_build): rank_var + checkbox, tooltip notes it needs the index (Use Index).
  • Command (_cli_runner._build_command_from_values): rank param → appends --rank. This is the shared builder used by both GUI dispatch paths — subprocess (pipx) and in-process (frozen) — so both get it (per the two-path-dispatch caution).
  • Callers (_mixin_search): both Standard Search call sites pass rank from the checkbox.
  • Persistence (_mixin_data): saved in settings + saved-search params (save/load/restore).
  • Suites (_mixin_suites): a saved search's rank is honored when run in a suite.

Verified

  • 789 passed / 8 skipped; new test_build_command_rank (flag emitted when on, absent when off); all GUI modules import.
  • mypy clean (14 files); doc-links clean; no version bump.

Live GUI note: the automated tests cover the command builder and imports; the on-screen checkbox render/click is a manual check (customtkinter needs a display). Layout was placed on its own grid row under Whole Word.

Docs

CHANGELOG (Unreleased) + USER_GUIDE Advanced Options list.

🤖 Generated with Claude Code

…ptions

Slice 3 (final surface) of ranking — the desktop equivalent of --rank.

- _mixin_build: new rank_var + "Sort by relevance" checkbox in Advanced Search
  Options, with a tooltip noting it needs the index (Use Index).
- _cli_runner._build_command_from_values: rank param → appends --rank. Both GUI
  dispatch paths (subprocess pipx + in-process frozen) use this shared builder,
  so both get it.
- _mixin_search: pass rank from the checkbox on both search call sites.
- _mixin_data: persist rank in settings + saved-search params (save/load/restore).
- _mixin_suites: honor a saved search's rank when run in a suite.
- tests: test_build_command_rank (flag emitted when on, absent when off).
- docs: CHANGELOG + USER_GUIDE Advanced Options list.

Ranking is now on all four surfaces: CLI, Python API, MCP, GUI. No version bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Robert D. Schoening <bobschoening@gmail.com>
@exbuf
exbuf marked this pull request as ready for review July 21, 2026 01:15
@exbuf
exbuf merged commit 4309760 into main Jul 21, 2026
20 checks passed
@exbuf
exbuf deleted the feat/gui-ranking branch July 21, 2026 01:15
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