Skip to content

fix(ui): guide users through missing or broken AI setup - #115716

Merged
vincentkoc merged 14 commits into
mainfrom
fix/control-ui-inference-setup-state
Jul 29, 2026
Merged

vincentkoc merged 14 commits into
mainfrom
fix/control-ui-inference-setup-state

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

Related: #115062

What Problem This Solves

Fixes an issue where Control UI users could still type and submit messages when no working AI model was available, producing confusing failed threads. The Ask OpenClaw settings surface also rendered the failure as a narrow error banner with excessive empty space, and users lost location context after opening model setup.

Why This Change Was Made

Chat home, new sessions, and Ask OpenClaw now gate missing model configuration before exposing a composer. Ask OpenClaw additionally distinguishes a missing provider/model from a configured provider that fails its live inference check, keeps Models selected during the nested setup flow, and offers direct recovery actions without creating failed conversation state.

This PR improves the recovery UI for failures such as #115062, but intentionally does not change provider credential resolution or claim to fix that root cause.

User Impact

Users without a configured AI provider see a full setup splash and cannot send messages until they connect one. In Ask OpenClaw, users whose configured provider or model cannot answer see a separate explanation with likely causes, a retry action, and a direct route to provider settings.

The six logical commits are preserved on the branch:

  • block chat until inference is configured
  • gate new sessions on configured inference
  • gate Ask OpenClaw before inference starts
  • retain Models sidebar context during setup
  • explain missing provider setup
  • distinguish configured-but-unavailable AI

Evidence

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts --configLoader runner ui/src/pages/custodian/custodian-session-store.test.ts ui/src/pages/chat/chat-model-setup.test.ts ui/src/pages/chat/chat-view.test.ts — 215 tests passed.
  • OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/inference-setup-gate.e2e.test.ts — 4 browser scenarios passed.
  • UI and test UI TypeScript checks passed with scripts/run-tsgo.mjs.
  • Production Vite build passed; 680 precompressed sidecars verified; Control UI performance budgets passed.
  • Browser proof captured at desktop and short-window sizes for chat home, new sessions, missing-provider Ask OpenClaw, selected Models navigation, and configured-provider failure recovery.

Risk checklist

  • User-visible behavior: Yes — composer availability and setup recovery copy change when AI inference is unavailable.
  • Config/env/migration behavior: No.
  • Security/auth/secrets/network/tool execution: No — existing provider verification and credential boundaries are unchanged.
  • Plugins/providers/channels/SDK: No provider implementation changes; the UI consumes the existing structured inference-unavailable marker.
  • Highest-risk area: Misclassifying a configured provider failure as missing setup.
  • Mitigation: Store-level tests cover both states and the browser test injects a configured model plus a structured live-check failure.

AI assistance

  • AI-assisted implementation
  • Maintainer reviewed the behavior and validation evidence

@vincentkoc vincentkoc self-assigned this Jul 29, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 29, 2026 07:09
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: L maintainer Maintainer-authored PR labels Jul 29, 2026
* origin/main: (100 commits)
  fix(hooks): kill gog process tree on gmail-watcher shutdown (#112452)
  fix(memory): avoid phantom continuation pages (#115722)
  fix(agents): reject cancelled foreground commands (#115694)
  fix(telegram): prevent false empty replies after message-tool delivery (#115588)
  refactor: unify session cost rollup scans (#115749)
  fix(agents): honor completed semantic command exits (#115737)
  feat(agents): persist last-used session model as the agent default (#115717)
  feat(openai): support GPT-Live over backend WebSocket (#115622)
  fix(ui): unify sidebar thread density (#115646)
  feat(ui): path-based agent and panel URLs on Settings > Agents (#115673)
  feat(gateway): serve HTTP byte ranges on media routes (#115667)
  refactor: consolidate Teams and Zoom meeting plugin shells (#115707)
  fix(browser): release unread CDP response streams (#115675)
  feat(ui): move settings save feedback into the sidebar footer (#115679)
  fix(plugins): enforce hook security invariants (#115701)
  refactor: deduplicate extension normalization primitives (#115650)
  feat(gateway): add least-privilege voice-node pairing (#115712)
  fix(ui): restore in-flight assistant replies after reconnect (#115691)
  fix(whatsapp): infer native media from filenames (#115725)
  fix(system-agent): avoid TUI startup catalog preparation (#113136)
  ...
@vincentkoc

Copy link
Copy Markdown
Member Author

Landing evidence for exact head 29dd04d3ad127c67a40c0b4ab4dc0e948c1b6c07:

The branch was synced with current main to absorb the new required settings save-indicator contract. Related issue #115062 remains open because this PR does not claim to fix its SecretRef root cause.

* origin/main:
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
  fix(msteams): finalize sent replies after dispatch (#82354)
  fix(cron): deliver explicitly configured failure alerts (#115762)
  fix(hooks): resolve inbound claim conversation once (#115491)
  refactor: retire legacy provider and secret paths (#115655)
  fix(memory): reject malformed QMD result entries (#115705)
  fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261)
  fix(ui): localize remaining control surfaces (#115730)
  fix(gateway): prevent model owner mismatch after plugin activation (#115747)
  fix(agents): run reply hooks for restart recovery (#115711)
  fix(cron): initialize detached hook run sessions (#115765)
  fix(ios): keep stop available for staged voice notes (#115744)
  fix(doctor): preserve config includes during cleanup (#115723)
  fix(memory): keep dreaming consolidation within project scope (#115721)
  fix(discord): keep tool rows under verbose progress (#111947)

# Conflicts:
#	ui/src/pages/custodian/custodian-surface.ts
#	ui/src/styles/custodian.css
@vincentkoc

Copy link
Copy Markdown
Member Author

Final sync evidence for head 93672090ca13b8898e958838cc4ef1125b515c17:

@vincentkoc
vincentkoc merged commit cc6b766 into main Jul 29, 2026
39 checks passed
@vincentkoc
vincentkoc deleted the fix/control-ui-inference-setup-state branch July 29, 2026 08:48
vincentkoc added a commit that referenced this pull request Jul 29, 2026
…ft-ingestion

* origin/main:
  fix(feishu): reject unsupported initial document content (#115697)
  feat(media): probe duration and dimensions for playback metadata (#115728)
  fix(sandbox): scope runtimes by workspace (#115766)
  fix(ui): guide users through missing or broken AI setup (#115716)
  fix(sessions): return direct-agent replies to their active session (#115756)
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
)

* fix(ui): block chat until inference is configured

* fix(ui): gate new sessions on configured inference

* fix(ui): gate custodian before inference starts

* fix(ui): clarify custodian setup navigation

* fix(ui): explain missing AI provider setup

* fix(ui): distinguish unavailable configured AI

* fix(ui): align inference setup fixtures

* test(ui): default mock gateway to working inference

* test(ui): align startup send gate coverage

* test(ui): inherit inference in gateway fixtures

* test(ui): normalize deferred gateway agents

* test(ui): update model setup sidebar fixture
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
…ft-ingestion

* origin/main:
  fix(feishu): reject unsupported initial document content (openclaw#115697)
  feat(media): probe duration and dimensions for playback metadata (openclaw#115728)
  fix(sandbox): scope runtimes by workspace (openclaw#115766)
  fix(ui): guide users through missing or broken AI setup (openclaw#115716)
  fix(sessions): return direct-agent replies to their active session (openclaw#115756)
  fix(zalo): stop provider startup after gateway shutdown (openclaw#115763)
  fix(agents): bound completed background process retention (openclaw#115760)
  fix(plugins): bound hook execution and retire stale registrations (openclaw#115695)
  fix(ui): collapse custodian startup error gap (openclaw#115720)
  fix(gateway): reload edited hook transforms (openclaw#107875)
  refactor: centralize channel streaming config hints (openclaw#115739)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant