Keyboard: app zoom, music track nav, sidebar nav #41

Merged
parkerhdavis merged 2 commits from keyboard-zoom-track-nav into main 2026-06-01 14:14:31 -06:00
parkerhdavis commented 2026-06-01 14:14:25 -06:00 (Migrated from github.com)

What

Three keyboard shortcuts, all surfaced in the Keybinds reference.

  • Application zoom — Ctrl/Cmd + / - / 0 zooms the whole webview in/out and resets to 100%.
  • Music track nav — Ctrl/Cmd + ←/→ steps the playing queue (prev/next), app-wide whenever something is playing.
  • Sidebar nav — Alt + ↑/↓ steps the active selection through the sidebar's nav items.

How

  • Zoom uses the webview's native zoom via getCurrentWebview().setZoom. The factor lives in prefsStore (localStorage), clamped to [0.5, 3] in 0.1 steps, and is re-applied on launch since webview zoom doesn't persist. Adds the core:webview:allow-set-webview-zoom capability.
  • Track nav lives in the music plugin's globally-mounted MusicGlobalPlayer rather than core App.tsx, to keep the plugin boundary clean. Guards against firing in text fields; accepts Cmd on macOS (where Ctrl+←/→ is a system shortcut).
  • Sidebar nav reads the rendered sidebar links from the DOM in visual order (so dynamic workspaces/pinned sources are covered without duplicating the structure), finds the active one via NavLink's aria-current, and routes to the prev/next. Clamps at the ends.

Testing

tsc, Biome, full-repo lint, and cargo check (validates the new capability) all pass. Verified via make dev: zoom works and survives a restart, track-skip works app-wide while playing and not while typing, and Alt+↑/↓ walks the sidebar selection.

## What Three keyboard shortcuts, all surfaced in the Keybinds reference. - **Application zoom** — `Ctrl/Cmd +` / `-` / `0` zooms the whole webview in/out and resets to 100%. - **Music track nav** — `Ctrl/Cmd + ←/→` steps the playing queue (prev/next), app-wide whenever something is playing. - **Sidebar nav** — `Alt + ↑/↓` steps the active selection through the sidebar's nav items. ## How - **Zoom** uses the webview's native zoom via `getCurrentWebview().setZoom`. The factor lives in `prefsStore` (localStorage), clamped to [0.5, 3] in 0.1 steps, and is re-applied on launch since webview zoom doesn't persist. Adds the `core:webview:allow-set-webview-zoom` capability. - **Track nav** lives in the music plugin's globally-mounted `MusicGlobalPlayer` rather than core `App.tsx`, to keep the plugin boundary clean. Guards against firing in text fields; accepts `Cmd` on macOS (where `Ctrl+←/→` is a system shortcut). - **Sidebar nav** reads the rendered sidebar links from the DOM in visual order (so dynamic workspaces/pinned sources are covered without duplicating the structure), finds the active one via NavLink's `aria-current`, and routes to the prev/next. Clamps at the ends. ## Testing `tsc`, Biome, full-repo lint, and `cargo check` (validates the new capability) all pass. Verified via `make dev`: zoom works and survives a restart, track-skip works app-wide while playing and not while typing, and Alt+↑/↓ walks the sidebar selection.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/garnet!41
No description provided.