Repository navigation
webui: warn when the device has no password; name the shell honestly - #44
Merged
Merged
Conversation
With authMode noPassword, anyone on the LAN who opens the page can drive the host and open a root shell on the device, but the UI said nothing and the shell was titled "Serial / Terminal". Show a warning on the Connect card and a dismissible banner while connected, retitle the terminal "Device shell (root)", and let the Password section set a first password (POST /auth/password-local) instead of requiring a current one that does not exist. Default auth behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 4c · project thread
Summary
Before: with no password set, nothing on the page said that anyone on the network could control the host and open a root shell on the device. The shell was labelled "Serial / Terminal", and Settings only offered "Change password", which needs a current password that does not exist.
After: when the device is in no-password mode, the connect card shows a warning, and after connecting a dismissible banner at the top says the same and points to Settings → Password. The shell is named "Device shell (root)". Settings → Password lets you set the first password directly (no "current password" field). Default auth behaviour is unchanged; this only adds warnings, as chosen by the owner.
How
net/rest.rs:no_password()readsauthModefromGET /device;set_password()calls the existingPOST /auth/password-local.app.rs:no_passwordsignal loaded at startup and after setup; banner and card warnings; the banner hides until reload when dismissed.settings.rs: the password section usesset_passwordwhen no password exists and clears the warning on success.terminal.rs, toolbar tooltip: renamed to "Device shell (root)".Testing
cargo +nightly fmt --all(CI)cargo +nightly clippy --workspace --release --all-targets -- -D warnings(CI)cargo +nightly test --workspace(CI)trunk build --lockedand wasm32 clippy incrates/rkvm-web(CI)Checklist
#[allow(...)]suppressions and no newunwrap()/expect()in production pathsMissedTickBehavior::Delay(frontend only)rkvm-protoPart of the old-version web UI test report fixes. The four branches touch overlapping files but merge onto
devtogether without conflicts.🤖 Generated with Claude Code
https://claude.ai/code/session_01PbdzY6PfT28goR4BhqdsXR
Generated by Claude Code