The console's bitrate row reaches 2 Gbps, steps finely at the bottom, and takes a typed rate #388

Merged
enricobuehler merged 1 commits from worktree-bitrate-picker into main 2026-08-24 09:37:39 +00:00
Owner

A user reported the Linux client would only let them select up to 80 Mbps. That ceiling is the gamepad/console shell's picker (pf-console-ui), not the GTK dialog: seven rungs — 0, 5, 10, 20, 30, 50, 80 — unchanged since the console shipped (180ac3aa, 2026-07-09). The desktop dialog beside it has always gone to 3000 Mbit/s, so the two Linux surfaces disagreed about what this machine may ask for, and the console was the smaller of the two. The host itself accepts 500 kbps – 8 Gbps.

The console row

  • The ladder is 30 rungs, 1 Mbps to 2 Gbps. Tight at the bottom (1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 25 …), where one rung decides whether a thin link is watchable, and coarse at the top (500, 750, 1G, 1.5G, 2G), where a rung is noise. Rates at or above a gigabit read as Gbps, with a decimal only where dropping it would print two rates the same way.
  • Y opens a typed rate on that row — digits, four of them, through the tray keyboard the add-host and pair screens already use (SDL text input for hardware keyboards; Steam's own keyboard on a Deck, where ours never draws). A goes on cycling the ladder everywhere, so the console's "A changes the value" grammar is untouched; the hint bar offers Y only on this row. An emptied field is an abandoned edit, not a request for Automatic.
  • A rate that is not a rung now steps to its neighbour. The generic picker snaps a value it does not recognise to its first option, which on this row is Automatic — so one nudge threw away a rate typed here or set by the desktop spinner.

The desktop dialog

The same complaint's other half: the spinner steps 1 Mbit/s instead of 5, so 3, 4 and 6 are reachable without typing. Its 3000 ceiling already covered 2 Gbps and is unchanged.

One plumbing change

Screen::edit_key now takes the Ctx, because this is the first field that commits into the settings store when it closes rather than holding text for a later action row to read. add_host and pair ignore it.

Checks

Run in the CI image (punktfunk-rust-ci, emulated amd64):

  • cargo test --release -p pf-console-ui200 passed, 0 failed, 1 ignored (the #[ignore]d screenshot dump).
  • cargo clippy --release -p pf-console-ui -p punktfunk-client-linux --all-targets -- -D warnings → clean, which is also the compile check for the GTK change (macOS cannot build that crate).
  • Also compile-checked natively against the Android target, which is the console's second host.

New tests cover the typed field (stores what was typed, clamps 9999 → 2000 Mbps, an empty field leaves the rate alone, Y inert on other rows) and the neighbour-stepping in both directions plus the ceiling thud.

Out of scope, noted for later: the Android touch settings dropdown still tops out at 500 Mbps (Apple's already goes to 3 Gbps).

A user reported the Linux client would only let them select up to 80 Mbps. That ceiling is the **gamepad/console shell's** picker (`pf-console-ui`), not the GTK dialog: seven rungs — `0, 5, 10, 20, 30, 50, 80` — unchanged since the console shipped (180ac3aa, 2026-07-09). The desktop dialog beside it has always gone to 3000 Mbit/s, so the two Linux surfaces disagreed about what this machine may ask for, and the console was the smaller of the two. The host itself accepts 500 kbps – 8 Gbps. ## The console row - **The ladder is 30 rungs, 1 Mbps to 2 Gbps.** Tight at the bottom (1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 25 …), where one rung decides whether a thin link is watchable, and coarse at the top (500, 750, 1G, 1.5G, 2G), where a rung is noise. Rates at or above a gigabit read as Gbps, with a decimal only where dropping it would print two rates the same way. - **Y opens a typed rate** on that row — digits, four of them, through the tray keyboard the add-host and pair screens already use (SDL text input for hardware keyboards; Steam's own keyboard on a Deck, where ours never draws). A goes on cycling the ladder everywhere, so the console's "A changes the value" grammar is untouched; the hint bar offers Y only on this row. An emptied field is an abandoned edit, not a request for Automatic. - **A rate that is not a rung now steps to its neighbour.** The generic picker snaps a value it does not recognise to its first option, which on this row is Automatic — so one nudge threw away a rate typed here or set by the desktop spinner. ## The desktop dialog The same complaint's other half: the spinner steps 1 Mbit/s instead of 5, so 3, 4 and 6 are reachable without typing. Its 3000 ceiling already covered 2 Gbps and is unchanged. ## One plumbing change `Screen::edit_key` now takes the `Ctx`, because this is the first field that commits into the settings store when it closes rather than holding text for a later action row to read. `add_host` and `pair` ignore it. ## Checks Run in the CI image (`punktfunk-rust-ci`, emulated amd64): - `cargo test --release -p pf-console-ui` → **200 passed, 0 failed, 1 ignored** (the `#[ignore]`d screenshot dump). - `cargo clippy --release -p pf-console-ui -p punktfunk-client-linux --all-targets -- -D warnings` → clean, which is also the compile check for the GTK change (macOS cannot build that crate). - Also compile-checked natively against the Android target, which is the console's second host. New tests cover the typed field (stores what was typed, clamps 9999 → 2000 Mbps, an empty field leaves the rate alone, Y inert on other rows) and the neighbour-stepping in both directions plus the ceiling thud. Out of scope, noted for later: the Android **touch** settings dropdown still tops out at 500 Mbps (Apple's already goes to 3 Gbps).
enricobuehler added 1 commit 2026-08-24 09:24:03 +00:00
feat(console-ui): the bitrate row reaches 2 Gbps, steps finely at the bottom, and takes a typed rate
ci / bun-nix (pull_request) Successful in 43s
ci / docs-drift (pull_request) Successful in 1m24s
ci / web (pull_request) Successful in 1m34s
ci / docs-site (pull_request) Successful in 1m34s
ci / rust-arm64 (pull_request) Successful in 2m26s
windows-client / client (x64, , x86_64-pc-windows-msvc, C:\t) (pull_request) Successful in 8m2s
ci / rust (pull_request) Successful in 11m57s
windows-client / client (arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (pull_request) Successful in 4m0s
android / android (pull_request) Successful in 12m15s
aef7f7877f
The gamepad shell's Bitrate picker has been seven rungs ending at 80 Mbps since the
console shipped, which is the ceiling a user just ran into — the GTK dialog beside it
has always gone to 3000 Mbit/s, so the two surfaces disagreed about what this machine
may ask for, and the console was the smaller of the two.

Three changes, one row:

- The ladder is 30 rungs, 1 Mbps to 2 Gbps. Tight at the bottom (1, 2, 3, 4, 5, 6, 8,
  10, 12, 15, 20, 25 …), where one rung decides whether a thin link is watchable, and
  coarse at the top, where a rung is noise. Rates at or above a gigabit read as Gbps.
- Y opens a typed rate on that row — digits, four of them, through the tray keyboard
  (or SDL text input, and Steam's own keyboard on a Deck) exactly like the add-host and
  pair fields. A goes on cycling the ladder everywhere, so the console's grammar is
  unchanged; the field is what the ladder cannot be, which is every number in between.
- A rate that is not a rung now steps to its NEIGHBOUR. The generic picker snaps a value
  it does not recognise to its first option, which on this row is Automatic: one nudge
  threw away a rate typed here or set by the desktop spinner.

The desktop dialog gets the same complaint's other half: its spinner steps 1 Mbit/s
instead of 5, so 3, 4 and 6 are reachable without typing.

`Screen::edit_key` now takes the context, because this is the first field that commits
into the settings store when it closes rather than holding text for a later action row.
enricobuehler merged commit 7951d12b06 into main 2026-08-24 09:37:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#388