feat(FN-2269): migrate dashboard session selection to global settings

- Add global settings schema/types fields for persisted dashboard session state (selected project and node)
- Refactor NodeContext and current-project hooks to read/write project and node selection via global settings instead of project-local state
- Update App wiring to use the new selection flow across dashboard startup and switching behavior
- Add and expand dashboard tests for NodeContext, useCurrentProject, and view-state persistence behavior
This commit is contained in:
Fusion
2026-04-22 17:12:27 -07:00
committed by gsxdsm
parent 331d283125
commit 85a1adbd0b
9 changed files with 602 additions and 118 deletions

View File

@@ -47,6 +47,9 @@ export const DEFAULT_GLOBAL_SETTINGS = {
settingsSyncAuth: false,
settingsSyncInterval: 900000,
settingsSyncConflictResolution: "last-write-wins",
// Dashboard session state (persisted to global settings for PWA/offline restore)
dashboardCurrentNodeId: undefined,
dashboardCurrentProjectIdByNode: undefined,
} satisfies CompleteSettings<GlobalSettings>;
/** Default values for project-level settings. */