docs: refine workspace bootstrap flow
This commit is contained in:
@@ -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.
|
||||
|
||||
**Acceptance Criteria:**
|
||||
- First visit with no known workspace creates a new workspace id (UUID/hash-like token) and redirects to `/{workspace_id}`
|
||||
- App stores the workspace id in a browser cookie for return visits
|
||||
- First visit with no known workspace shows a welcome/bootstrap page at `/`
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- Browser test verifies:
|
||||
- first visit creates/redirects to a workspace route
|
||||
- cookie-backed revisit returns to the same workspace
|
||||
- first visit shows the welcome page
|
||||
- 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
|
||||
|
||||
**Technical Notes:**
|
||||
- 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
|
||||
- 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
|
||||
|
||||
**Dependencies:** PORT-001
|
||||
|
||||
Reference in New Issue
Block a user