Skip to content

feat(ui): hide AI controls when chat is disabled - #395

Closed
vishr wants to merge 1 commit into
mainfrom
feat/ui-without-ai
Closed

vishr wants to merge 1 commit into
mainfrom
feat/ui-without-ai

Conversation

@vishr

@vishr vishr commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Hide the remaining chat entry points when agent_available is false and explain how to enable chat or use an MCP client in Settings.

agentAvailable = false
  Rail: no chat, AI create, service investigation, or dashboard source-chat link
  Panels: no Explain or Fix, including fullscreen
  Home: default dashboard
  Settings: provider/key setup and MCP connection guide

Implementation choices:

  • Reuse agentAvailable throughout; gate Explain/Fix callbacks in the grid as well as the existing controls in PanelCard.
  • Hide dashboard source-chat links and service investigations because both open chat. Disable service catalogue requests for these investigations too.
  • Preserve the existing home-to-dashboards routing for both modes. Extend the integration test through actual default-dashboard selection, with the default deliberately listed second.
  • Keep the existing chat/create controls and enabled behavior. Do not add a non-AI dashboard creation flow, routes, backend changes, or another renderer.
  • Use the existing Settings components and MCP guide. Verify the provider/key names against the configuration schema; no credential inputs or storage.
  • Regenerate committed host assets as required by the embedded UI contract.

Evidence

  • Before: new rail tests exposed chat-origin links and service investigations while chat was disabled; the new settings test failed because setup guidance was absent.
    After: disabled-state coverage passes for rail chat/create entries, source-chat links, service investigations, panel Explain/Fix in grid and fullscreen, default-dashboard navigation, and Settings. Enabled-state coverage remains green.
  • Full UI suite: 101 files, 1,466 tests passed with bun run test --maxWorkers=2. The default-worker run had two timing failures in unchanged tests: the ECharts panel inspection exceeded 5 seconds and the 400-service layout took 57 ms against a 50 ms limit. No test thresholds or configuration changed.
  • Passed: just test (all Go packages), just lint, just ui (TypeScript checks and production builds), just ui-check, just notices-check, just docs-generate-check, and just site-build.
  • just check passed every preceding gate, then failed at the pre-existing ui-audit failure: two moderate advisories in unchanged seroval@1.6.8, GHSA-f86p-h4j2-7qgj and GHSA-9wx9-5pv9-3349. The standalone audit reproduces it. Dependencies were left unchanged; checks after the audit gate were run separately as listed above.
  • The pre-push hook reproduced the same audit failure. Publication excluded only its already-run check job with LEFTHOOK_EXCLUDE=check.

Merge Danger

Door: two-way

Blast Radius: UI

Only conditional AI affordances, Settings guidance, tests, and generated host assets change. No schema, API, or dependency changes.

@vishr

vishr commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Folded into #410.

@vishr vishr closed this Oct 30, 2026
vishr added a commit that referenced this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant