crabidy/architecture
Test User 0d08c765a1 seek: put seek and track-skip on two keys, and make the web gauge clickable
Two physical keys now carry all four moves in both clients: `,`/`.` seek 15
seconds, and their shifted forms `<`/`>` skip a whole track. Self-teaching
(same key, shift = bigger jump), and `<`/`>` are the marks engraved on them.

The reason it is these keys and not control chords: they are plain printable
characters, so nothing a browser reserves can swallow them. Ctrl-n — the
long-standing next-track chord — cannot be claimed in a browser at all,
because Chrome and Firefox handle it as "new window" above the page where
preventDefault cannot reach (unlike Ctrl-f, Ctrl-p or Ctrl-b, which the
keydown handler does claim). So the web client had no working next-track key.
Ctrl-n/Ctrl-p stay bound as the terminal's primary chords; the web help
documents the pair that always works.

Click-to-seek on the web progress bar comes with it, and needed no new rpc:
the click maps the pointer's x within the gauge to a fraction of the duration
and sends target - position. Relative is right here even though the gesture
is absolute — the position it subtracts is the one drawn on the bar the user
just aimed at, at most one 250 ms tick old, far under one pixel of the bar.
That staleness is only fatal for a repeated key, which is why keys still send
a fixed step and let the server accumulate.

The arithmetic lives in state.rs as a pure function, so it is tested on the
native target rather than only in a browser: a click behind the playhead
seeks back, the edges are exactly the track's ends, a fraction outside [0, 1]
is clamped rather than extrapolated, and a duration of 0 (or a non-finite
fraction, meaning a zero-width element) declines instead of seeking somewhere
arbitrary. Geometry comes from current_target, since the click may land on
the fill rather than the track.

Also enables the web-sys DomRect feature, without which
Element::get_bounding_client_rect does not exist — caught only by the wasm
build, since cbd-web's `mod app` is cfg'd to wasm32 and native clippy never
sees it.

Verified: 119 cbd-tui, 24 cbd-web (3 new), workspace clippy clean under
-D warnings, fmt clean, wasm bundle and book build. Not exercised: an actual
click in a browser.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 14:29:30 +02:00
..
audiobookshelf-provider.md Architecture: audiobookshelf (`/abs`) provider design 2026-07-23 23:09:54 +02:00
bookmarks.md Design the crabidy content store; add wire + fsdy foundations 2026-07-22 10:58:11 +02:00
build-features.md build: put every provider, opus, and the spectrum behind cargo features 2026-07-25 03:15:32 +02:00
capture-deletion.md Design the crabidy content store; add wire + fsdy foundations 2026-07-22 10:58:11 +02:00
captures.md Design the crabidy content store; add wire + fsdy foundations 2026-07-22 10:58:11 +02:00
cbd-bundle.md Give cbd its own config file, separate from cbd-tui 2026-07-21 22:57:43 +02:00
cli.md Design a comprehensive clap-derive CLI (architecture/cli.md) 2026-07-22 11:45:05 +02:00
client-configs.md Give cbd its own config file, separate from cbd-tui 2026-07-21 22:57:43 +02:00
crabidy-store.md Let a same-source W re-capture replace its save in place 2026-07-22 22:35:48 +02:00
fs-provider.md Persist queues as fs-provider folders 2026-07-21 10:41:49 +02:00
fyyd-provider.md Add the fyyd podcast provider (/fyyd) 2026-07-23 17:29:13 +02:00
help-modal.md Add a help modal to cbd-tui behind a declarative binding table 2026-07-20 17:27:12 +02:00
incremental-captures.md Capture local files by copying them; add W to capture the queue 2026-07-22 01:08:29 +02:00
jamendo-provider.md jamendo: send a User-Agent (Jamendo returns empty results without one) 2026-07-24 15:54:31 +02:00
node-editing.md Add rename and delete for modifiable library nodes 2026-07-20 23:34:47 +02:00
orphans.md Add the /orphans provider: a store garbage-collection view 2026-07-22 22:47:23 +02:00
overview.md Document the as-built architecture 2026-07-20 10:34:45 +02:00
progressive-queueing.md Playback: retry the start when a skipped/short head runs the player dry 2026-07-23 19:55:18 +02:00
queue-persistence.md Capture library subtrees as bookmarks 2026-07-21 11:11:27 +02:00
queue-register.md cbd-tui: queue marks, visual mode, and a paste register 2026-07-26 10:24:51 +02:00
roles-auth.md Web client: prompt for login on visit when auth is enabled 2026-07-23 17:51:55 +02:00
rss-provider.md architecture: design the /rss subscription provider 2026-07-26 12:19:23 +02:00
search.md Add Tidal search as creatable library nodes 2026-07-20 17:58:44 +02:00
seek.md seek: put seek and track-skip on two keys, and make the web gauge clickable 2026-07-26 14:29:30 +02:00
soundcloud-provider.md soundcloud: prefer the progressive mp3 stream (HLS exchange 404s anonymously) 2026-07-24 02:47:13 +02:00
spectrum.md Add a server-streamed frequency spectrum visualizer 2026-07-21 23:14:03 +02:00
tui-search.md Add a / search filter to the TUI library and queue panes 2026-07-21 22:54:39 +02:00
visual-mode.md cbd-tui: fix visual mode stranding the turnaround row (anchor the range) 2026-07-24 16:29:26 +02:00
web-client.md Web client: prompt for login on visit when auth is enabled 2026-07-23 17:51:55 +02:00
youtube-provider.md Replace the yt-dlp subprocess with the pure-Rust rustypipe client 2026-07-21 17:12:40 +02:00
youtube-rustypipe.md Fetch streams in bounded windows and restore yt-dlp for stream URLs 2026-07-21 18:18:40 +02:00