Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: resolve the Reality default by its shipped id so a rename can't break it
[._.]/ Adam Eivyfd28dae416df
diff --git a/client/src/pages/CatalogIngest.jsx b/client/src/pages/CatalogIngest.jsxindex 305f8cfde4..f9a35ecc5d 100644--- a/client/src/pages/CatalogIngest.jsx+++ b/client/src/pages/CatalogIngest.jsx@@ -39,6 +39,11 @@ const UNASSIGNED_UNIVERSE = 'unassigned';// defaults to a universe named "Reality" instead, when one exists — captured// thought is factual by default.const LAST_UNIVERSE_STORAGE_KEY = 'catalog-ingest-last-universe';+// #7616 seeds one shipped universe with this exact id ("Reality",+// `factual: true`). Match the id first — it survives a rename, which the+// display name does not — and keep the name match for an install whose+// Reality predates the seed or was recreated by hand.+const REALITY_UNIVERSE_ID = 'universe-reality';const REALITY_UNIVERSE_NAME = 'Reality';// Ingest source kinds that default to the Reality universe rather than the// last-used pick — mirrors SCRAP_SOURCE_KINDS' `factual: true` entries@@ -157,7 +162,8 @@ export default function CatalogIngest() {// 'brain' | 'babble'.const defaultUniverseForSource = (sourceKind) => {const loaded = universesRef.current;- const reality = loaded.find((u) => u.name === REALITY_UNIVERSE_NAME);+ const reality = loaded.find((u) => u.id === REALITY_UNIVERSE_ID)+ || loaded.find((u) => u.name === REALITY_UNIVERSE_NAME);if (FACTUAL_INGEST_KINDS.has(sourceKind)) return reality?.id || UNASSIGNED_UNIVERSE;const lastUsed = safeReadStorage(LAST_UNIVERSE_STORAGE_KEY);if (lastUsed && (lastUsed === UNASSIGNED_UNIVERSE || loaded.some((u) => u.id === lastUsed))) return lastUsed;diff --git a/client/src/pages/CatalogIngest.test.jsx b/client/src/pages/CatalogIngest.test.jsxindex 7139384efe..fece642ca0 100644--- a/client/src/pages/CatalogIngest.test.jsx+++ b/client/src/pages/CatalogIngest.test.jsx@@ -35,7 +35,9 @@ it('prunes only on request, keeps the brainstorm, and saves edited selected sugg// outcome #7615 exists to stop. Hold the list in a ref so the mount-effect// closure sees it.it('defaults a brain-bridge ingest to the Reality universe even though it starts from the mount effect', async () => {- listUniverseNames.mockResolvedValue([{ id: 'uni-other', name: 'Example Universe' }, { id: 'uni-reality', name: 'Reality' }]);+ // The shipped seed (#7616) is matched by id, so a renamed Reality still+ // resolves — a name-only match would fall through to Unassigned here.+ listUniverseNames.mockResolvedValue([{ id: 'uni-other', name: 'Example Universe' }, { id: 'universe-reality', name: 'Home' }]);// Resolves a macrotask later than the universe list — the real ordering,// where a tiny GET beats an LLM extraction by seconds.ingestCatalogBrain.mockImplementation(() => new Promise((resolve) => {@@ -50,12 +52,12 @@ it('defaults a brain-bridge ingest to the Reality universe even though it starts);await screen.findByDisplayValue('Captured thought');- expect(screen.getByLabelText('Catalogue into')).toHaveValue('uni-reality');+ expect(screen.getByLabelText('Catalogue into')).toHaveValue('universe-reality');fireEvent.click(screen.getByRole('button', { name: /Commit/ }));await waitFor(() => expect(commitCatalogScrapDraft).toHaveBeenCalledWith('brain-scrap',[expect.objectContaining({ name: 'Captured thought', type: 'idea' })],- expect.objectContaining({ universeRef: 'uni-reality' }),+ expect.objectContaining({ universeRef: 'universe-reality' }),));});