feat(phase-a): remove Neo4j from startup chain, clean auth flow

- Remove NeoUserProvider + NeoInstituteProvider from App.tsx startup chain
- Strip user_db_name/school_db_name from CCUser; add school_id (Phase B wires it to Supabase)
- Remove DatabaseNameService from AuthContext and UserContext
- Remove provisionUser() call from login path; API endpoint preserved for Phase B decision
- Simplify UserContext.resolveProfile: fast-path JWT metadata then background Supabase fetch
- Replace user.user_db_name reads in singlePlayerPage + snapshotService with null-safe guards
- Add useDeviceContext hook (desktop/tablet/phone/iwb, persists to localStorage)

App now loads to dashboard without any Neo4j dependency at startup.
Canvas opens to blank TLDraw state; Phase B rebuilds navigation on Supabase.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-25 13:06:39 +00:00
co-authored by Claude Sonnet 4.6
parent 4139eb8fd3
commit 7b546c933e
8 changed files with 63 additions and 146 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ export default function SinglePlayerPage() {
const nodeStoragePath = getNodeStoragePath(context.node);
if (nodeStoragePath) {
logger.debug('single-player-page', '📥 Loading snapshot from database', {
dbName: user.user_db_name,
dbName: null,
node: context.node,
node_storage_path: nodeStoragePath,
user_type: user.user_type,
@@ -131,7 +131,7 @@ export default function SinglePlayerPage() {
await NavigationSnapshotService.loadNodeSnapshotFromDatabase(
nodeStoragePath,
user.user_db_name,
null,
newStore,
setLoadingState,
undefined, // sharedStore