Skip to content

[ryoku] Hub search: keyboard navigation and Ctrl+F focus - #674

Merged
neur0map merged 1 commit into
Ryoku-dev:unstable-devfrom
Satirito:search-keyboard-nav
Oct 31, 2026
Merged

neur0map merged 1 commit into
Ryoku-dev:unstable-devfrom
Satirito:search-keyboard-nav

Conversation

@Satirito

@Satirito Satirito commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The rail search had no keyboard navigation over its results and answered only
to Ctrl+K. Up/Down now walk the hits with wrap-around, Enter opens the
selected one instead of always the top hit, the header shows N / TOTAL, and
Ctrl+F is accepted alongside Ctrl+K as the focus shortcut.

Area

ryoku

How it was tested

  • Read the existing handler at Hub.ml 1079-1084 and the overlay at
    1752-1802 before editing; confirmed Ctrl+F was absent and that
    onAccepted hardcoded index 0.
  • Verified every edit against the file after writing: the cursor property,
    the field handlers, the renamed searchList id, the delegate highlight,
    the onEntered sync, the header counter, the Ctrl+F key test, and the
    two reset sites all land where intended.
  • grep confirms no em-dash in the three changed files.
  • .githooks/pre-commit passes (rc=0). qmllint is not installed in this
    environment, so the QML was validated by inspection instead; run
    qmllint ryoku/hub/quickshell/Hub.ml on a dev box before merging.

Checklist

  • One logical change, with a clear [area] scope: summary commit subject.
  • Matching CHANGELOG.md updated in the area I touched.
  • The git hooks pass locally; I did not use --no-verify.
  • QML parses where applicable. (qmllint is not installed here; verified
    by inspection and the pre-commit hook.)
  • No duplicated config, no dead code, no commented-out code, no em-dash.
  • Docs updated: ryoku/hub/README.md mentions Ctrl+F alongside
    Ctrl+K.

Note: New: Up/Down navigate the settings search results, Enter opens the
selected hit, and Ctrl+F focuses the search bar.

@Satirito
Satirito force-pushed the search-keyboard-nav branch 2 times, most recently from 0307f97 to 9da34b7 Compare October 30, 2026 18:15
The rail search had no keyboard navigation over its results and answered only
to Ctrl+K. Up/Down now walk the hits with wrap-around, Enter opens the
selected one instead of always the top hit, the header shows N / TOTAL, and
Ctrl+F is accepted alongside Ctrl+K as the focus shortcut.

The settings search answered only to Ctrl+K and had no way to move between
results by keyboard: Enter always opened the top hit, and only the pointer
could select a row.

- A `searchCursor` property now tracks which result is active under the
  keyboard. It resets to 0 on every edit and on dismissal, so refining a
  query or reopening the field never leaves a stale row selected.
- `Keys.onUpPressed` / `Keys.onDownPressed` on the search field walk the
  hits with wrap-around and scroll the list so the active row stays in view
  (`searchList.positionViewAtIndex(hub.searchCursor, ListView.Contain)`).
- `onAccepted` opens `hub.searchCursor` instead of always index 0.
- The delegate highlights `rr.index === hub.searchCursor`, and
  `MouseArea.onEntered` keeps the pointer and the keyboard cursor on the
  same row, so a click after a key press looks like a continuation rather
  than a jump.
- The header now shows `(cursor + 1) / TOTAL` next to the hit count.
- `Keys.onPressed` accepts `Ctrl+F` as well as `Ctrl+K`, the shortcut a
  user instinctively reaches for in a settings app.

ryoku

- Read the existing handler at `Hub.ml` 1079-1084 and the overlay at
  1752-1802 before editing; confirmed `Ctrl+F` was absent and that
  `onAccepted` hardcoded index 0.
- Verified every edit against the file after writing: the cursor property,
  the field handlers, the renamed `searchList` id, the delegate highlight,
  the `onEntered` sync, the header counter, the `Ctrl+F` key test, and the
  two reset sites all land where intended.
- `grep` confirms no em-dash in the three changed files.
- `.githooks/pre-commit` passes (rc=0). `qmllint` is not installed in this
  environment, so the QML was validated by inspection instead; run
  `qmllint ryoku/hub/quickshell/Hub.ml` on a dev box before merging.

- [x] One logical change, with a clear `[area] scope: summary` commit subject.
- [x] Matching `CHANGELOG.md` updated in the area I touched.
- [x] The git hooks pass locally; I did not use `--no-verify`.
- [x] QML parses where applicable. (`qmllint` is not installed here; verified
      by inspection and the pre-commit hook.)
- [x] No duplicated config, no dead code, no commented-out code, no em-dash.
- [x] Docs updated: `ryoku/hub/README.md` mentions `Ctrl+F` alongside
      `Ctrl+K`.

Note: New: Up/Down navigate the settings search results, Enter opens the
selected hit, and Ctrl+F focuses the search bar.
@Satirito
Satirito force-pushed the search-keyboard-nav branch from 9da34b7 to 2459c66 Compare October 30, 2026 18:34
@Satirito
Satirito changed the base branch from main to unstable-dev October 30, 2026 18:34
@neur0map
neur0map merged commit 38d0972 into Ryoku-dev:unstable-dev Oct 31, 2026
14 checks passed
@neur0map

Copy link
Copy Markdown
Member

Thanks for the work here, this ships in the next v1 release.

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