docs: refine workspace bootstrap flow

This commit is contained in:
Bu5hm4nn
2026-03-24 19:58:07 +01:00
parent 54d12e2393
commit 9d1a2f3fe8

View File

@@ -125,23 +125,27 @@ A prioritized roadmap for the Vault Dashboard Lombard loan hedging platform.
**As a** user, **I want** my dashboard settings and scenarios to live inside a shareable hashed workspace URL **so that** I can return on a new device or share the exact workspace with someone else. **As a** user, **I want** my dashboard settings and scenarios to live inside a shareable hashed workspace URL **so that** I can return on a new device or share the exact workspace with someone else.
**Acceptance Criteria:** **Acceptance Criteria:**
- First visit with no known workspace creates a new workspace id (UUID/hash-like token) and redirects to `/{workspace_id}` - First visit with no known workspace shows a welcome/bootstrap page at `/`
- App stores the workspace id in a browser cookie for return visits - Welcome page contains a short description and a clear call to action such as `Get started`
- Clicking `Get started` creates a new workspace id (UUID/hash-like token), stores it in a browser cookie, and redirects to `/{workspace_id}`
- Returning visitors with a valid workspace cookie who visit `/` are redirected to their existing workspace
- Visiting an existing `/{workspace_id}` loads that workspace without requiring the cookie - Visiting an existing `/{workspace_id}` loads that workspace without requiring the cookie
- Workspace URL is copyable/shareable and restores the same settings on another device/browser - Workspace URL is copyable/shareable and restores the same settings on another device/browser
- Settings persistence is scoped by workspace id rather than one global local file - Settings persistence is scoped by workspace id rather than one global local file
- Existing pages (`/settings`, `/overview`, `/hedge`, `/backtests`, `/event-comparison`) read/write the active workspace state - Existing pages (`/{workspace_id}`, `/{workspace_id}/settings`, `/{workspace_id}/overview`, `/{workspace_id}/hedge`, `/{workspace_id}/backtests`, `/{workspace_id}/event-comparison`) read/write the active workspace state
- Invalid or unknown workspace ids show a clear recovery path instead of a server error - Invalid or unknown workspace ids show a clear recovery path instead of a server error
- Browser test verifies: - Browser test verifies:
- first visit creates/redirects to a workspace route - first visit shows the welcome page
- cookie-backed revisit returns to the same workspace - clicking `Get started` creates/redirects to a workspace route
- cookie-backed revisit to `/` returns to the same workspace
- visiting the same workspace URL in a fresh context restores the same settings - visiting the same workspace URL in a fresh context restores the same settings
**Technical Notes:** **Technical Notes:**
- Introduce a workspace model/repository keyed by generated id - Introduce a workspace model/repository keyed by generated id
- Prefer server-side persistence keyed by workspace id; cookie stores only the id, not the full state - Prefer server-side persistence keyed by workspace id; cookie stores only the id, not the full state
- Keep workspace ids opaque and non-sequential - Keep workspace ids opaque and non-sequential
- Consider root route `/` as a bootstrap that resolves/creates the active workspace and redirects to `/{workspace_id}` plus nested page routes as needed - Treat `/` as a dedicated bootstrap/welcome route rather than making every page handle bootstrap behavior
- Workspace pages can remain focused on workspace-aware rendering only; bootstrap logic stays isolated at `/`
- Ensure routing design stays compatible with existing NiceGUI pages before implementation - Ensure routing design stays compatible with existing NiceGUI pages before implementation
**Dependencies:** PORT-001 **Dependencies:** PORT-001