Skip to content

fix(console): show only the surfaces the engine has data for (brain-only launch) - #81

Merged
xerj-org merged 1 commit into
mainfrom
fix/console-brain-only
Jul 31, 2026
Merged

fix(console): show only the surfaces the engine has data for (brain-only launch)#81
xerj-org merged 1 commit into
mainfrom
fix/console-brain-only

Conversation

@xerj-org

Copy link
Copy Markdown
Owner

Problem

Launching XERJ with no data — or with only a brain indexed — greeted the user with the full row of AI / RAG / Vector / Agent-Memory / Logs dashboards. Worse than empty: each of those falls back to full mock data when its backing index has zero rows (data/backends/xerj.jsmock.js), so the console was advertising fabricated telemetry behind a real-looking UI, with only a small "MOCK FALLBACK" pill as the tell.

Fix

Extend the existing requiresLive nav gate — today wired only for Second Brain via brains-probe — to the data-plane dashboards.

  • data/data-probe.js (new): one cheap _cat/indices call classifies which data-class indices exist (chat-events, vector-ops, agent-memory, anomalies, logs-*), fail-closed, mirroring brains-probe. Pure parse/classify logic unit-tested (14 cases).
  • dashboards/registry.js: ai-overview/rag-quality gate on chat-events, vector-index on vector-ops, agent-memory on agent-memory, anomaly-detect on anomalies, ingest-pipeline on logs-ingest-events, logs-overview on logs-*.
  • app.js: probeLiveFeatures() now also runs the data probe; the default landing resolves to the first visible dashboard (deep links still resolve gated ids, so a fresh xerj brain link opens instantly); empty dashboard groups collapse.

Always-on: System (cluster stats always exist), Data / Settings / Users (management surfaces).

Verified against a freshly-built binary

Launch state Console now
Empty engine Lands on System; dashboard groups = [Infra] only; no mock
Brain-only (xerj brain) Lands on Second Brain; groups = [AI, Infra], AI group = just Second Brain; no mock
Has telemetry Dashboards return as their data appears

Follow-up (not in this PR)

A deep link to a gated dashboard still shows mock data (each adapter does null → mock). The honest fix is a real empty state per adapter (like second-brain.js already has) — a larger, separate change.

A fresh or brain-only engine used to greet you with the full row of AI / RAG /
Vector / Agent-Memory / Logs dashboards — and each of those falls back to full
MOCK data when its backing index is empty (data/backends/xerj.js -> mock.js), so
the console was advertising fabricated telemetry behind a real-looking UI, with
only a small "MOCK FALLBACK" pill as the tell.

Extend the existing `requiresLive` nav gate (today wired only for Second Brain
via brains-probe) to the data-plane dashboards:

  - data-probe.js: one cheap `_cat/indices` call classifies which data-class
    indices exist (chat-events, vector-ops, agent-memory, anomalies, logs-*),
    fail-closed, mirroring brains-probe. Unit-tested.
  - registry.js: ai-overview/rag-quality gate on chat-events, vector-index on
    vector-ops, agent-memory on agent-memory, anomaly-detect on anomalies,
    ingest-pipeline on logs-ingest-events, logs-overview on logs-*.
  - app.js: probeLiveFeatures now also runs the data probe; the DEFAULT landing
    resolves to the first VISIBLE dashboard (deep links still resolve gated
    ids); empty dashboard GROUPS collapse.

Result: an empty engine shows only System (cluster stats always exist); a
brain-only engine lands on Second Brain with just that in the AI group. System,
Data, Settings and Users stay always-on as management surfaces.
@xerj-org
xerj-org merged commit f6e4ed0 into main Jul 31, 2026
4 checks passed
@xerj-org
xerj-org deleted the fix/console-brain-only branch July 31, 2026 13:20
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