Skip to content

webui: stop the toolbar wrapping at half the window width - #52

Merged
Rust-KVM merged 1 commit into
devfrom
claude/webui-toolbar-width-fix
Oct 11, 2026
Merged

Rust-KVM merged 1 commit into
devfrom
claude/webui-toolbar-width-fix

Conversation

@Rust-KVM

Copy link
Copy Markdown
Owner

Requested by 4c · project thread

Summary

Before (regression from #47): the toolbar wrapped into several rows even on normal-width windows, because the absolutely positioned, translateX(-50%) toolbar shrank to about half the viewport once flex-wrap was on.

After: the toolbar sizes to its content on one row and only wraps when the window is actually narrower than the toolbar.

How

Adds width: max-content to .toolbar; the existing max-width: calc(100vw - 16px) still caps it on narrow screens.

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: deployed to the NanoPC-T6; the new style is in effect.

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 applicable
  • Module tree or build invariants changed → not applicable

🤖 Generated with Claude Code

https://claude.ai/code/session_01PbdzY6PfT28goR4BhqdsXR


Generated by Claude Code

With position: fixed and left: 50%, the toolbar's available width was
only half the viewport, so at 696px it wrapped into five rows and
covered the top of the video. Size it to its content (width:
max-content) and keep the viewport cap, so it only wraps when it truly
does not fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the rkvm-web Leptos / WASM frontend label Oct 11, 2026
@Rust-KVM Rust-KVM self-assigned this Oct 11, 2026
@Rust-KVM
Rust-KVM merged commit 717921a into dev Oct 11, 2026
13 checks passed
@Rust-KVM
Rust-KVM deleted the claude/webui-toolbar-width-fix 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