fix(console): show only the surfaces the engine has data for (brain-only launch) - #81
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.Fix
Extend the existing
requiresLivenav gate — today wired only for Second Brain viabrains-probe— to the data-plane dashboards.data/data-probe.js(new): one cheap_cat/indicescall classifies which data-class indices exist (chat-events,vector-ops,agent-memory,anomalies,logs-*), fail-closed, mirroringbrains-probe. Pure parse/classify logic unit-tested (14 cases).dashboards/registry.js:ai-overview/rag-qualitygate onchat-events,vector-indexonvector-ops,agent-memoryonagent-memory,anomaly-detectonanomalies,ingest-pipelineonlogs-ingest-events,logs-overviewonlogs-*.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 freshxerj brainlink opens instantly); empty dashboard groups collapse.Always-on: System (cluster stats always exist), Data / Settings / Users (management surfaces).
Verified against a freshly-built binary
[Infra]only; no mockxerj brain)[AI, Infra], AI group = just Second Brain; no mockFollow-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 (likesecond-brain.jsalready has) — a larger, separate change.