Skip to content

feat(ops): KB activation screen; stop stacking broken sub-panels - #56

Merged
sulthannauval merged 1 commit into
mainfrom
feat/kb-activation-screen
Aug 10, 2026
Merged

feat(ops): KB activation screen; stop stacking broken sub-panels#56
sulthannauval merged 1 commit into
mainfrom
feat/kb-activation-screen

Conversation

@sulthannauval

Copy link
Copy Markdown
Member

Companion to RantAIClaw plans 102-105 (#462/#464/#465/#467) — plan 106.

Change

  • Panel gating: KbPanel reads GET /config/knowledge first; until the KB is enabled it renders only the activation screen — previously KbList fetched on mount and a disabled/keyless KB stacked two 503 error panels under the "add an API key" card.
  • Activation screen (three states on enabled × embedding_configured): off+no-key → inputs + Activate (sends keys + enabled:true); off+key → "Knowledge Base is off" + one-click Activate (key kept); on+key → compact row + Deactivate/Edit/Remove key.
  • Deactivate ≠ Clear: Deactivate sends {enabled:false}, key survives. Remove key stays destructive behind its confirm modal, reworded (the old text described what Deactivate now does, and the modal names Deactivate as the non-destructive path).
  • The gateway's live key probe 400 (#464) surfaces inline on the input — a rejected key is a form error; button shows "Verifying…".
  • Third dead-end KB_INTELLIGENCE_ENABLED instruction (knowledge-graph zero-node EmptyState) replaced with actionable text — the first two were fixed in feat(ops): distinguish no-credential from empty in graph + drawer #54.
  • Optional fields throughout: older gateways omit enabled and the panel treats configured-as-enabled (pre-v0.18.5 behaviour preserved).

Validation

vitest: 156/156 · next build clean. Full browser drive (off → activate → bad-key inline error → deactivate → one-click reactivate → remove key) queued for the release-verification pass against a gateway that serves the new PUT — the currently released gateway (v0.18.4) predates enabled.

Risk: panel-scoped · Rollback: revert

- KbPanel mounted the settings card, the Documents/Graph switch, and
  KbList unconditionally; KbList fetches on mount, so a disabled or
  keyless KB rendered the 'add an API key' card with two 503 error
  panels underneath it — the panel now gates on GET /config/knowledge
  and renders ONLY the activation screen until the KB can answer
- knowledge-settings-card becomes the activation screen with three
  states (off+no-key: inputs + Activate; off+key: one-click Activate,
  key kept; on+key: compact row + Deactivate/Edit/Remove key)
- Deactivate is not Clear: it sends {enabled:false} and keeps the key;
  the destructive Remove key stays behind its confirm modal, reworded —
  'search will stop working' now describes Deactivate, and the modal
  points at it for the non-destructive path
- the gateway's live key probe 400 surfaces INLINE on the key input (a
  rejected key is a form error), with the button reading 'Verifying…'
- third dead-end KB_INTELLIGENCE_ENABLED instruction (knowledge-graph
  zero-node EmptyState) replaced with actions the operator can take —
  the other two were fixed with the no-credential state in #54
- KnowledgeStatus.enabled + setKnowledge enabled are optional: older
  gateways omit them and the panel treats configured-as-enabled
  (pre-v0.18.5 behaviour preserved)
@sulthannauval
sulthannauval merged commit 60443b9 into main Aug 10, 2026
1 check passed
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