Skip to content

web: make the settings drawer readable and honest - #69

Merged
Rust-KVM merged 1 commit into
devfrom
claude/project-thread-3pe6z9
Oct 18, 2026
Merged

Rust-KVM merged 1 commit into
devfrom
claude/project-thread-3pe6z9

Conversation

@Rust-KVM

Copy link
Copy Markdown
Owner

Requested by 4c · project thread

Summary

Before: the Cloud section printed the raw getCloudState JSON ({"appUrl":…,"connected":false,"url":…}), wrapped mid-word. Many fields had only placeholders, so once filled (e.g. MQTT base topic "rustkvm") nothing said what they were. Save buttons fired silently. Some controls did nothing on the device, and the brightness slider never saved.

After: Cloud shows a status dot with "Connected / Not connected" and the API and App URLs on separate rows, with the inputs prefilled. Every field has a visible label, save actions report success or the device's error, and controls the device ignores are hidden.

How

  • New util::fire_status: like fire, but writes "Saving…" / ok message / Failed: <error> into a status line. Used for cloud, Tailscale, extension, HTTPS, EDID, WOL, IP settings, SSH, MQTT, macros.
  • Extension is a select (None / ATX power board / DC power board) instead of a free-text id; applying it reloads the Power section.
  • Network and About render as label/value rows; virtual media, update and OCR status lines are full sentences.
  • Bug fix: setBacklightSettings requires dim_after and off_after; the slider sent only max_brightness, so every change failed deserialization silently. They are now read and sent back unchanged.
  • Hidden because the backend does not act on them: serial Send (sendCustomCommand only logs; old history is still shown and clearable), video sleep, host display idle (both stored, never read). Time zone shows as text instead of a disabled select.
  • Danger-zone and deregister confirmations reworded; macro Delete asks first.
  • .muted wraps with overflow-wrap: anywhere instead of word-break: break-all.

No RPC method or backend changes.

Testing

  • cargo +nightly fmt --check in crates/rkvm-web
  • cargo +nightly clippy --workspace --release --all-targets -- -D warnings (backend untouched)
  • cargo +nightly test --workspace (backend untouched)
  • Frontend touched: wasm32 clippy -D warnings clean locally; trunk build runs in CI
  • Tested on an RK3588 device: needs a look at the settings drawer on the device (Cloud, MQTT, Extension, brightness)

Checklist

  • No #[allow(...)] suppressions and no new unwrap() / expect() in production paths
  • Hot paths stay zero-copy; periodic loops use MissedTickBehavior::Delay
  • Shared protocol types live in rkvm-proto
  • RPC method set changed → not changed
  • Module tree or build invariants changed → not changed

Generated by Claude Code

The Cloud section printed the raw getCloudState JSON. It now shows a
connected/not-connected status with the API and App URLs on their own
rows, and prefills the URL inputs with the current values.

Same pass over the rest of the drawer:
- Labels on every form field (MQTT, IP address, cloud, EDID, WOL, SSH)
  instead of placeholders that disappear once a value is filled in.
- Save buttons report success or the device's error instead of firing
  silently (new util::fire_status).
- Extension is a select of the known boards instead of a free-text id,
  and applying it reloads the Power section.
- Network and About are label/value rows; status lines are sentences.
- Brightness never saved: setBacklightSettings requires dim_after and
  off_after, which the slider did not send. Send them back unchanged.
- Hide controls the device does not act on (serial Send, video sleep,
  host display idle) instead of offering buttons that do nothing.
- .muted text wraps at word boundaries instead of mid-word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2qNacq5gbEg9WMeL6W6gz
@Rust-KVM Rust-KVM self-assigned this Oct 18, 2026
@github-actions github-actions Bot added the rkvm-web Leptos / WASM frontend label Oct 18, 2026
@Rust-KVM
Rust-KVM marked this pull request as ready for review October 18, 2026 14:57
@Rust-KVM
Rust-KVM merged commit f62406e into dev Oct 18, 2026
13 checks passed
@Rust-KVM
Rust-KVM deleted the claude/project-thread-3pe6z9 branch October 18, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rkvm-web Leptos / WASM frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants