fix: add control UI auth guidance

This commit is contained in:
Peter Steinberger
2026-01-16 09:01:45 +00:00
parent 1791c1a765
commit 6c6bc6ff1c
2 changed files with 49 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
- Onboarding: switch channels setup to a single-select loop with per-channel actions and disabled hints in the picker. - Onboarding: switch channels setup to a single-select loop with per-channel actions and disabled hints in the picker.
- TUI: show provider/model labels for the active session and default model. - TUI: show provider/model labels for the active session and default model.
- Heartbeat: add per-agent heartbeat configuration and multi-agent docs example. - Heartbeat: add per-agent heartbeat configuration and multi-agent docs example.
- UI: show gateway auth guidance + doc link on unauthorized Control UI connections.
- Fix: list model picker entries as provider/model pairs for explicit selection. (#970) — thanks @mcinteerj. - Fix: list model picker entries as provider/model pairs for explicit selection. (#970) — thanks @mcinteerj.
- Fix: align OpenAI image-gen defaults with DALL-E 3 standard quality and document output formats. (#880) — thanks @mkbehr. - Fix: align OpenAI image-gen defaults with DALL-E 3 standard quality and document output formats. (#880) — thanks @mkbehr.
- Fix: persist `gateway.mode=local` after selecting Local run mode in `clawdbot configure`, even if no other sections are chosen. - Fix: persist `gateway.mode=local` after selecting Local run mode in `clawdbot configure`, even if no other sections are chosen.

View File

@@ -31,6 +31,52 @@ export function renderOverview(props: OverviewProps) {
const tick = snapshot?.policy?.tickIntervalMs const tick = snapshot?.policy?.tickIntervalMs
? `${snapshot.policy.tickIntervalMs}ms` ? `${snapshot.policy.tickIntervalMs}ms`
: "n/a"; : "n/a";
const authHint = (() => {
if (props.connected || !props.lastError) return null;
const lower = props.lastError.toLowerCase();
const authFailed = lower.includes("unauthorized") || lower.includes("connect failed");
if (!authFailed) return null;
const hasToken = Boolean(props.settings.token.trim());
const hasPassword = Boolean(props.password.trim());
if (!hasToken && !hasPassword) {
return html`
<div class="muted" style="margin-top: 8px;">
This gateway requires auth. Add a token or password, then click Connect.
<div style="margin-top: 6px;">
<span class="mono">clawdbot dashboard --no-open</span> → tokenized URL<br />
<span class="mono">clawdbot doctor --generate-gateway-token</span> → set token
</div>
<div style="margin-top: 6px;">
<a
class="session-link"
href="https://docs.clawd.bot/web/dashboard"
target="_blank"
rel="noreferrer"
title="Control UI auth docs (opens in new tab)"
>Docs: Control UI auth</a
>
</div>
</div>
`;
}
return html`
<div class="muted" style="margin-top: 8px;">
Auth failed. Re-copy a tokenized URL with
<span class="mono">clawdbot dashboard --no-open</span>, or update the token,
then click Connect.
<div style="margin-top: 6px;">
<a
class="session-link"
href="https://docs.clawd.bot/web/dashboard"
target="_blank"
rel="noreferrer"
title="Control UI auth docs (opens in new tab)"
>Docs: Control UI auth</a
>
</div>
</div>
`;
})();
return html` return html`
<section class="grid grid-cols-2"> <section class="grid grid-cols-2">
@@ -119,7 +165,8 @@ export function renderOverview(props: OverviewProps) {
</div> </div>
${props.lastError ${props.lastError
? html`<div class="callout danger" style="margin-top: 14px;"> ? html`<div class="callout danger" style="margin-top: 14px;">
${props.lastError} <div>${props.lastError}</div>
${authHint ?? ""}
</div>` </div>`
: html`<div class="callout" style="margin-top: 14px;"> : html`<div class="callout" style="margin-top: 14px;">
Use Connections to link WhatsApp, Telegram, Discord, Signal, or iMessage. Use Connections to link WhatsApp, Telegram, Discord, Signal, or iMessage.