Skip to content

feat(ops): distinguish no-credential from empty in graph + drawer - #54

Merged
sulthannauval merged 1 commit into
mainfrom
feat/graph-no-credential-state
Aug 10, 2026
Merged

feat(ops): distinguish no-credential from empty in graph + drawer#54
sulthannauval merged 1 commit into
mainfrom
feat/graph-no-credential-state

Conversation

@sulthannauval

Copy link
Copy Markdown
Member

Companion to RantAIClaw plan 097 (capability block). deriveGraphState gains a no-credential state — enabled extraction with credential_configured === false — with a distinct hint in graph-lens and capability-aware drawer empty text. Older gateways that omit the field fall through to empty, pinned by test.

Validation: vitest 6/6 (first test file for the helper), next build clean.

Risk: additive · Rollback: revert

- deriveGraphState gains 'no-credential' (enabled but
  credential_configured === false); undefined (older gateway) falls
  through to empty, never no-credential
- graph-lens renders a distinct hint; drawer empty state is
  capability-aware instead of one fixed text
- KbCapability type widened (optional fields, additive)
- first test file for the helper: 6 cases across all five states
@sulthannauval
sulthannauval merged commit b63be9c into main Aug 10, 2026
1 check passed
sulthannauval added a commit that referenced this pull request Aug 10, 2026
- 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)
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