Skip to content

webui: fix settings that showed wrong or empty values - #45

Merged
Rust-KVM merged 1 commit into
devfrom
claude/webui-settings-fixes
Oct 11, 2026
Merged

Rust-KVM merged 1 commit into
devfrom
claude/webui-settings-fixes

Conversation

@Rust-KVM

Copy link
Copy Markdown
Owner

Requested by 4c · project thread

Summary

Before: several settings showed wrong or empty values. The keyboard layout dropdown used codes like en_US that the device does not recognise, so the current layout never showed and changes failed. The Power section always said "DC power not supported" and requested ATX state even with no ATX extension, which logged an ERROR on the device. Switching to relative mouse with that USB function disabled silently sent nothing. Network showed only the IP, and Version showed an empty "system" field.

After: the layout list uses the device's own codes (us, uk, de, fr, es, it, jp, kr). Power shows DC controls with live V/A/W readings only when dc-power is active, ATX buttons and LED state only when atx-power is active, and a hint when neither is. Relative mouse refuses to switch, with a message pointing to Settings → USB devices, when that function is off. Network shows gateway, DNS, and notes when the page was opened via a different interface address. Version shows only "app …" when the system version is empty.

How

  • settings.rs: new layout codes; describe_network() used for both the initial load and DHCP renew; version string skips an empty system version.
  • settings_advanced.rs: calls getActiveExtension first and only queries getDCPowerState (reading isOn/restoreState/voltage/current/power) or getATXState for the mounted extension.
  • app.rs: toggle_mouse checks getUsbDevices().relative_mouse before enabling relative mode.

Testing

  • cargo +nightly fmt --all (CI)
  • cargo +nightly clippy --workspace --release --all-targets -- -D warnings (CI)
  • cargo +nightly test --workspace (CI)
  • Frontend touched: trunk build --locked and wasm32 clippy in crates/rkvm-web (CI)
  • Tested on an RK3588 device: a build merging all four web UI fix branches (this one and its three siblings) was deployed to the NanoPC-T6; the page returns 200, 4K60 video plays, and the startup log has no WARN/ERROR. Click-through UI retest is pending in the desktop app.

Checklist

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

Part of the old-version web UI test report fixes. The four branches touch overlapping files but merge onto dev together without conflicts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PbdzY6PfT28goR4BhqdsXR


Generated by Claude Code

- Keyboard layout: option values were en_US/de_DE/..., but the device
  reports and accepts us/uk/de/..., so the select was blank and any
  change was rejected. Use the device codes (and add Korean).
- Power: the DC section read supported/enabled fields the device never
  sends, so it always said "not supported"; ATX state was requested even
  when ATX is not mounted, which logged an ERROR on every open and left
  the buttons live. Show DC or ATX controls by the active extension,
  read isOn/restoreState and the V/A/W reading, and hint when neither
  extension is active.
- Mouse: switching to relative mode now checks that the relative mouse
  USB function is enabled and says how to enable it instead of
  silently sending reports the host never receives.
- Network: show gateway and DNS, and note when the page was loaded via a
  different address than the one reported (the device has two NICs).
- About: omit the empty system version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rust-KVM Rust-KVM self-assigned this Oct 11, 2026
@github-actions github-actions Bot added the rkvm-web Leptos / WASM frontend label Oct 11, 2026
@Rust-KVM
Rust-KVM merged commit 582cfff into dev Oct 11, 2026
13 checks passed
@Rust-KVM
Rust-KVM deleted the claude/webui-settings-fixes branch October 12, 2026 13:38
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