You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dashboards/open-brain-dashboard-pro/README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,9 @@ If your brain runs the CRM truth layer (the `crm-core` + `crm-engagement` schema
27
27
|**Contact** (`/contacts/:id`) | Editable fact panel with per-field origin, locks, and evidence; contact methods and aliases; this contact's open proposals with accept/reject; a notes / tasks / important-dates panel; and an activity view with a merged timeline and the raw change log. |
28
28
|**Proposals** (`/proposals`) | Inbox of machine-suggested field changes filtered by status, with per-row accept/reject and bulk accept/reject for a whole import run. |
29
29
30
-
The Contacts and Proposals nav entries, and the open-proposals badge on the sidebar, appear **only when the brain exposes the `/crm` surface**. The dashboard probes for it once at login and caches the result in the session, so a brain without the CRM layer never shows these entries and behaves exactly as before. Each CRM read also degrades on its own: if an individual route is missing or errors, that panel renders empty instead of blanking the page.
30
+
The Contacts and Proposals nav entries appear **by default, whether or not the brain has the CRM layer installed yet**. Visiting either page on a brain without it shows a setup card: which schema(s) to apply (`schemas/crm-core` + `schemas/crm-engagement`), where to run them (your Supabase project's SQL editor), a link to the schema README, a reminder that `open-brain-rest` needs the `/crm/*` route group deployed, and a **Re-check now** button that re-probes the brain and refreshes the page — no sign-out required. The setup card's schema links point at the `alanshurafa/OB1` fork by default because the optional schemas haven't landed upstream yet; override with `NEXT_PUBLIC_SCHEMA_REPO_BASE` (see [Configuration](#configuration)). The open-proposals badge only ever renders a real count, so it stays hidden until CRM is actually enabled. Each CRM read also degrades on its own: if an individual route is missing or errors after CRM is enabled, that panel renders empty instead of blanking the page.
31
+
32
+
Prefer the old hide-until-detected behavior? Set `NEXT_PUBLIC_OPTIONAL_NAV=auto` (see [Configuration](#configuration)) and rebuild — the dashboard probes for `/crm` once at login, caches the result in the session, and only then shows the Contacts/Proposals entries.
31
33
32
34
## Wiki (optional)
33
35
@@ -38,7 +40,9 @@ If your brain runs the persistent-wiki layer (the `schemas/wiki-pages` schema an
38
40
|**Wiki** (`/wiki`) | Page list filtered by kind (topic / entity / autobiography / custom), with section counts and a "new page" form. |
39
41
|**Wiki page** (`/wiki/:slug`) | Sections in display order, each with its markdown body rendered sanitized, an origin chip (yours / generated), a lock toggle, and an evidence chip listing supporting thought ids. Edit a section inline (your edit takes ownership); add a section; archive the page. When a machine writer proposes an update to a section you own, a review panel shows the current body against the proposed draft with **accept / reject**. |
40
42
41
-
Wiki pages are reachable at `/wiki` (a dedicated sidebar entry lands in a later change). The dashboard probes for the `/wiki` surface once at login and caches the result in the session. When the schema is absent — the probe comes back negative, or `GET /wiki/pages` returns 404 — the page renders a short inline notice ("Wiki schema not installed — apply `schemas/wiki-pages` to enable") instead of an error, so a brain without the wiki layer behaves exactly as before.
43
+
The Wiki nav entry appears **by default, whether or not the brain has the wiki layer installed yet**. Visiting `/wiki` on a brain without it — the login-time probe came back negative, a re-check still says no, or `GET /wiki/pages` returns 404 — shows a setup card: apply `schemas/wiki-pages`, confirm `open-brain-rest` exposes the `/wiki/*` route group, and a **Re-check now** button that re-probes the brain and refreshes the page without a sign-out.
44
+
45
+
Prefer the old hide-until-detected behavior? Set `NEXT_PUBLIC_OPTIONAL_NAV=auto` (see [Configuration](#configuration)) and rebuild — the dashboard probes for `/wiki` once at login, caches the result in the session, and only then shows the Wiki entry.
42
46
43
47
Archived pages are hidden from the list but stay fetchable — and editable — by slug; unarchive is a future gateway addition.
44
48
@@ -64,6 +68,8 @@ All configuration is through environment variables. **The app refuses to start i
64
68
|`NEXT_PUBLIC_API_URL`| Yes | Base URL of your Open Brain REST API, typically `https://YOUR-PROJECT-REF.supabase.co/functions/v1/open-brain-rest`. |
65
69
|`SESSION_SECRET`| Yes | 32+ character secret used by `iron-session` to encrypt the session cookie. Generate with `openssl rand -hex 32`. |
66
70
|`RESTRICTED_PASSPHRASE_HASH`| No | SHA-256 hash of a passphrase that unlocks restricted/sensitive content. Only meaningful if your brain has a `sensitivity_tier` column on `public.thoughts`. There is no official sensitivity-tiers primitive upstream yet — either add your own migration (see PR #192 for pattern) or wait for the primitive to land. On stock OB1, this dashboard's restricted-content toggle is hidden at startup. Generate with `echo -n "your-passphrase" \| shasum -a 256`. |
71
+
|`NEXT_PUBLIC_OPTIONAL_NAV`| No | Controls whether the Contacts/Proposals (CRM) and Wiki nav entries show before their schema is installed. Default (unset, or any value other than `auto`): always show them, with a setup card on the page itself. Set to `auto` to restore hide-until-enabled behavior, gated on the login-time probe cached in the session. This is a `NEXT_PUBLIC_*` var, so it's inlined at **build** time — changing it needs a rebuild, not just a restart. |
72
+
|`NEXT_PUBLIC_SCHEMA_REPO_BASE`| No | Base URL for the schema-folder links on the setup cards, e.g. `https://github.com/YOUR-ORG/YOUR-REPO/tree/main`. Defaults to the `alanshurafa/OB1` fork, where all the optional schemas currently live (they haven't landed upstream yet). Set it to your own repo/mirror if you maintain one. Build-time, like the other `NEXT_PUBLIC_*` vars. |
67
73
68
74
Copy `.env.example` to `.env.local` (gitignored) and fill it in.
69
75
@@ -112,8 +118,8 @@ The dashboard calls these endpoints on your Open Brain REST gateway (all authent
112
118
|`/thought/:id/connections`| GET | Detail page connections panel | Optional — panel hides if it errors |
113
119
|`/duplicates`, `/duplicates/resolve`| GET / POST | Duplicates page | Optional — page shows an error otherwise |
114
120
|`/ingest`, `/ingestion-jobs`, `/ingestion-jobs/:id`, `/ingestion-jobs/:id/execute`| POST / GET | Ingest page | Optional — page still loads without jobs |
115
-
|`/crm/*` (contacts, proposals, notes, tasks, important-dates, timeline, history, …) | GET / POST / PATCH | Contacts, Proposals, contact detail panels | Optional — CRM surface is hidden unless `/crm` is detected at login|
116
-
|`/wiki/*` (pages, pages/:slug, sections/:id/accept-pending, reject-pending, lock, …) | GET / POST / PUT / DELETE | Wiki list, wiki page, section edit / lock / draft review | Optional — wiki surface degrades to an inline notice unless `/wiki` is detected at login|
121
+
|`/crm/*` (contacts, proposals, notes, tasks, important-dates, timeline, history, …) | GET / POST / PATCH | Contacts, Proposals, contact detail panels | Optional — nav entries show by default; the pages themselves render a setup card until `/crm` is detected |
122
+
|`/wiki/*` (pages, pages/:slug, sections/:id/accept-pending, reject-pending, lock, …) | GET / POST / PUT / DELETE | Wiki list, wiki page, section edit / lock / draft review | Optional — nav entry shows by default; the page itself renders a setup card until `/wiki` is detected |
117
123
118
124
> **On `/reflections/*`:** The ExoCortex upstream dashboard staged a reflections feature. This fork does not yet ship a reflections UI surface, but the architecture is ready: if you add a reflection panel later and your gateway doesn't serve `/reflections/*`, expect a 404 that the UI should swallow. The existing optional endpoints already degrade this way — the Connections panel, Duplicates page, and Ingest history all swallow fetch errors and render an empty/neutral state instead of crashing.
Wiki schema not installed — apply <codeclassName="font-mono text-xs px-1 py-0.5 rounded bg-bg-elevated border border-border text-text-primary">schemas/wiki-pages</code>{" "}
32
-
to your brain and deploy the <codeclassName="font-mono text-xs px-1 py-0.5 rounded bg-bg-elevated border border-border text-text-primary">/wiki</code>{" "}
33
-
gateway routes to enable persistent wiki pages. See the repo README for the setup steps.
34
-
</p>
35
-
</div>
36
-
</div>
37
-
);
38
-
}
39
-
40
21
exportdefaultasyncfunctionWikiPage({
41
22
searchParams,
42
23
}: {
@@ -54,7 +35,7 @@ export default async function WikiPage({
54
35
// negative signal we trust; `undefined` (old cookie) falls through to the fetch,
55
36
// whose 404 handling covers the schema-missing case anyway.
56
37
if(session.wikiEnabled===false){
57
-
return<WikiNotInstalled/>;
38
+
return<SetupStatesurface="wiki"/>;
58
39
}
59
40
60
41
letdata;
@@ -68,9 +49,9 @@ export default async function WikiPage({
0 commit comments