fix(webui): support WSL browser launch and clearer startup output (#6150)
* feat(webui): add local first-run access setup * feat(webui): defer password setup until network access Keep generated local credentials and provide the full browser login link in every launch mode. Require a chosen password when enabling network access, preserve existing authentication, and show pending listener changes until restart. Remove mandatory first-run initialization gates and simplify startup output while retaining gateway warnings and errors. * fix(webui): align access settings with channel contracts * fix(webui): clarify startup guidance and spacing * fix(webui): keep setup guidance readable in narrow terminals * fix(webui): clarify startup and preserve remote password access * fix(webui): move access explanations into settings hints * fix(webui): require strong ASCII passwords and reject malformed auth * fix(webui): simplify access password character rules * test(webui): reflect pending restart after password save * fix(webui): open Windows browser from WSL * fix(webui): clarify public access copy * refactor(webui): focus on WSL launch and startup output * fix(webui): preserve platform browser fallback
This commit is contained in:
1 parent
a27f294f52
commit
41f2eeb7ba
12 files changed
+693
-374
No files matched your search
+7
-1
@@ -16,7 +16,7 @@ Use the launcher:
|
||||
nanobot webui
|
||||
```
|
||||
|
||||
`nanobot webui` creates the config/workspace when needed, enables the local WebSocket channel after confirmation, generates a WebUI bootstrap secret when one is missing, starts or joins the same on-demand gateway used by the native TUI, and opens the browser. With a fresh config, it can open before a model is configured so you can finish setup in **Settings → Models**. The first-run path binds the WebUI to `127.0.0.1` by default, so it is not available from other devices on your LAN. While the launcher remains attached, it mirrors new log output from that exact gateway instance in the terminal without replaying older logs.
|
||||
`nanobot webui` asks for one confirmation on a new installation, creates the config/workspace, enables the local WebSocket channel, and generates a WebUI bootstrap secret when one is missing. It starts or joins the same on-demand gateway used by the native TUI and opens the browser. With a fresh config, it can open before a model is configured so you can finish setup in **Settings → Models**. The first-run path binds the WebUI to `127.0.0.1` by default, so it is not available from other devices on your LAN. The startup summary groups the login link, model setup guidance, config, and exit controls with blank lines. While attached, the launcher displays new gateway warnings and errors; use the printed logs command for full output.
|
||||
|
||||
After model setup, explicitly promote the shared gateway when you do not want to keep a client open:
|
||||
|
||||
@@ -28,6 +28,12 @@ nanobot gateway --background
|
||||
|
||||
Each foreground WebUI or TUI launcher releases only its own client. The last interactive launcher stops an on-demand gateway. `nanobot gateway --background` makes the gateway persistent; manage it with `nanobot gateway status`, `nanobot gateway logs`, `nanobot gateway restart`, and `nanobot gateway stop`.
|
||||
|
||||
The browser signs in automatically using the generated credential in the launch URL. The terminal also prints the complete login link: if automatic opening fails, copy that link into your browser, including the fragment after `#`. In WSL, the launcher opens your Windows default browser through Windows PowerShell; an explicit `BROWSER` setting takes precedence. If Windows integration is unavailable, open the printed link in your Windows browser. The plain page address does not sign in a new browser. Treat the login link as a credential and do not share it.
|
||||
|
||||
`nanobot webui --no-open` prints the same login link without opening a browser. Development mode uses the Vite address, normally `http://127.0.0.1:5173`, with the same gateway authentication.
|
||||
|
||||
If no provider is configured, follow the **Next step** prompt to open **Settings → Models**. Errors for a configured provider appear with that prompt.
|
||||
|
||||
Manual config still works. Same-machine localhost WebUI access can run without a browser password. Set `tokenIssueSecret` when you intentionally expose the WebUI beyond localhost or want a browser password:
|
||||
|
||||
```json
|
||||
|
||||
Reference in new issue
Block a user