Split scene planning into global + per-scene context files

This commit is contained in:
dingo
2026-02-22 14:11:44 +00:00
parent 34e56d4d3d
commit d711c50d4e
21 changed files with 456 additions and 724 deletions
@@ -0,0 +1,72 @@
# AccountManagement Scene
## UI
- Identity panel: username, email, profile image
- Password change modal:
- fields: `new password`, `confirm password`
- actions: `Submit`, `Cancel`
- Linked accounts panel:
- `Link Account` for OAuth providers
- linked provider status list
- Stats panel:
- Origin points, Win, Loss, Forfeit, Draw, Cards owned, Cards played
- Spending panel:
- `Total Spent` censored by default
- uncensor toggle
- money spent + origin points spent
- `Download Report` for full spending profile
- Spending controls panel:
- set monthly spending cap (money and/or origin points)
- cap lock-enforced once set
- cap can be changed once per month
- warnings required before set/change
- show next eligible cap-change date/time
- Legal links panel:
- TOS, EULA, other required legal docs
## Client
- Display profile, linked providers, stats, spending, legal docs.
- Support password update workflow.
- Support spending cap update workflow with warning acknowledgment.
## Server
- Return account profile, linked providers, stats, spending summary.
- Process password changes.
- Enforce spending cap locks and cooldown windows.
- Return spending report export URL.
- Return legal document metadata and URLs.
## Data Exchange
### Client -> Server (`AccountOverviewRequest`)
- `requestId`, `accountId`
### Server -> Client (`AccountOverviewResponse`)
- `requestId`, `username`, `email`, `profileImageUrl`, `linkedProviders`
- `stats`: `originPoints`, `wins`, `losses`, `forfeits`, `draws`, `cardsOwned`, `cardsPlayed`
- `spendingSummary`: `moneySpent`, `originPointsSpent`, `censoredByDefault`
- `spendingCap`: `capEnabled`, `moneyCapAmount`, `originPointsCapAmount`, `effectiveFromUtc`, `nextCapChangeAllowedAtUtc`, `lockReason`
- `legalDocuments` (name + url)
### Client -> Server (`ChangePasswordRequest`)
- `requestId`, `currentPassword` (if policy requires), `newPassword`, `confirmPassword`
### Server -> Client (`ChangePasswordResponse`)
- `requestId`, `success`, `errorCode`
### Client -> Server (`LinkOAuthRequest`)
- `requestId`, `provider`
### Server -> Client (`LinkOAuthResponse`)
- `requestId`, `success`, `linkedProviders`, `errorCode`
### Client -> Server (`SpendingCapUpdateRequest`)
- `requestId`, `moneyCapAmount` (optional), `originPointsCapAmount` (optional), `acceptWarning`
### Server -> Client (`SpendingCapUpdateResponse`)
- `requestId`, `success`, `spendingCap`, `nextCapChangeAllowedAtUtc`, `warningMessage`, `errorCode`
### Client -> Server (`SpendingReportRequest`)
- `requestId`, `format` (`csv`, `json`, `pdf`)
### Server -> Client (`SpendingReportResponse`)
- `requestId`, `success`, `downloadUrl`, `expiresAtUtc`, `errorCode`
@@ -0,0 +1,22 @@
# AuthGateway Scene
## UI
- Account/session check spinner
- Auth route chooser (Login/Register/OAuth)
- Service status banner
## Client
- Decide entry path: session refresh, login, register, OAuth.
- Render enabled options based on server capabilities.
## Server
- Validate refresh tokens and return session state.
- Provide auth policy.
## Data Exchange
### Client -> Server (`SessionProbe`)
- `requestId`, `refreshToken` (optional), `deviceId`
### Server -> Client (`SessionProbeResult`)
- `requestId`, `isAuthenticated`, `accountId`, `displayName`
- `authMethodsAvailable`, `passwordPolicy`
@@ -0,0 +1,9 @@
# Bazaar Scene
## Status
Draft placeholder.
## Planned Scope
- Define scene UI blocks
- Define client interactions
- Define server contract and payloads
@@ -0,0 +1,20 @@
# CardViewer Scene
## UI
- Search input
- Filter/sort controls
- Card grid/list
- Card detail drawer/modal
## Client
- Browse card library and owned-only views.
## Server
- Return searchable metadata, ownership projection, and variant manifests.
## Data Exchange
### Client -> Server (`CardSearchRequest`)
- `requestId`, `query`, `filters`, `sort`, `page`, `pageSize`
### Server -> Client (`CardSearchResponse`)
- `requestId`, `results`, `totalCount`, `facets`
@@ -0,0 +1,14 @@
# ClientLaunch Scene
## UI
- Splash/logo
- Build/version text
- Background init indicator
## Client
- Boot local config, device fingerprint, cached token state.
- Initialize telemetry/session id.
- Transition to `HubConnection`.
## Server
- None (local-only scene).
@@ -0,0 +1,18 @@
# CollectionHub Scene
## UI
- Tab nav (`DeckEditor`, `CardViewer`, `Cosmetics`)
- Collection summary strip
## Client
- Load owned cards, deck list, cosmetics.
## Server
- Return collection inventory, deck metadata, validation rules, cosmetic inventory.
## Data Exchange
### Client -> Server (`CollectionBootstrapRequest`)
- `requestId`, `accountId`, `includeInventory`, `includeDecks`, `includeCosmetics`
### Server -> Client (`CollectionBootstrapResponse`)
- `requestId`, `cardInventory`, `deckSummaries`, `cosmeticInventory`, `collectionStats`, `rulesVersion`
@@ -0,0 +1,20 @@
# Cosmetics Scene
## UI
- Cosmetic category selector (back/trim/art/model)
- Preview pane
- Owned/locked state indicators
- Equip/apply controls
## Client
- Display and preview cosmetic options; equip selections.
## Server
- Verify ownership/compatibility and persist equipped defaults/overrides.
## Data Exchange
### Client -> Server (`CosmeticEquipRequest`)
- `requestId`, `scope`, `targetId`, `cardBackId`, `trimId`, `artVariantId`, `modelVariantId`
### Server -> Client (`CosmeticEquipResponse`)
- `requestId`, `success`, `equippedState`, `errorCode`
@@ -0,0 +1,9 @@
# Custom play Scene
## Status
Draft placeholder.
## Planned Scope
- Define scene UI blocks
- Define client interactions
- Define server contract and payloads
@@ -0,0 +1,27 @@
# DeckEditor Scene
## UI
- Deck list panel
- Card search/filter panel
- Deck composition panel
- Validation/errors panel
- Save/duplicate/delete actions
## Client
- Build/edit decks, local mirror validation, save/duplicate/rename/delete.
## Server
- Validate deck against current rules and persist deck revisions.
## Data Exchange
### Client -> Server (`DeckValidateRequest`)
- `requestId`, `deckDraft`, `formatId`
### Server -> Client (`DeckValidateResponse`)
- `requestId`, `isValid`, `errors`, `warnings`
### Client -> Server (`DeckSaveRequest`)
- `requestId`, `deckId`, `deckName`, `deckCards`, `formatId`
### Server -> Client (`DeckSaveResponse`)
- `requestId`, `success`, `deckId`, `deckRevision`, `isValid`, `errors`
@@ -0,0 +1,25 @@
# HubConnection Scene
## UI
- Connection status indicator (connecting/retrying/failed)
- Retry button + diagnostics link (optional)
## Client
- Open relay/hub socket.
- Send initial hello with client build + platform metadata.
- Wait for connection acceptance and service availability.
## Server
- Validate protocol version compatibility.
- Return environment capabilities and endpoint map.
- Return maintenance/degraded status if active.
## Data Exchange
### Client -> Server (`HubHello`)
- `requestId`, `clientVersion`, `contentVersion`, `platform`, `locale`, `deviceId`, `sessionId`
### Server -> Client (`HubWelcome`)
- `requestId`, `connectionId`
- `minSupportedClientVersion`, `latestClientVersion`, `latestContentVersion`
- `serviceStatus`, `apiBaseUrl`, `cdnBaseUrl`
- `authProvidersEnabled`, `motd` (optional)
@@ -0,0 +1,9 @@
# Leaderboard Scene
## Status
Draft placeholder.
## Planned Scope
- Define scene UI blocks
- Define client interactions
- Define server contract and payloads
@@ -0,0 +1,21 @@
# Login Scene
## UI
- Username/email field
- Password field
- Remember device toggle
- Submit + Forgot Password actions
## Client
- Submit account identifier + password.
- On success transition to `MainMenu`.
## Server
- Validate credentials, enforce lockout and MFA if enabled.
## Data Exchange
### Client -> Server (`LoginRequest`)
- `requestId`, `emailOrUsername`, `password`, `deviceId`
### Server -> Client (`LoginResponse`)
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
@@ -0,0 +1,30 @@
# MainMenu Scene (Primary Interactive Hub)
## UI
- Navigation nodes/buttons to:
- `Bazaar`, `Leaderboard`, `Settings`, `AccountManagement`, `CollectionHub`, `RankedPlay`, `CustomPlay`
- Profile summary widget
- Notifications widget
- Settings/logout actions
- Interactive background:
- dark aura visual treatment
- rotatable 3D grid layer
- grid topology can shift between square and hex
## Input
- mouse + touch (multi-touch required)
- standard camera gestures for movement
- node selection via left click and middle mouse click
## Client
- Display entry points and key account notifications.
## Server
- Return role/entitlement menu permissions, badge counts, feature flags.
## Data Exchange
### Client -> Server (`MainMenuBootstrapRequest`)
- `requestId`, `accountId`, `clientVersion`
### Server -> Client (`MainMenuBootstrapResponse`)
- `requestId`, `profileSummary`, `roles`, `featureFlags`, `menuPermissions`, `notificationCounts`, `rankedSummary`
@@ -0,0 +1,19 @@
# OAuthCallback Scene
## UI
- Verifying auth state message
- Success/failure redirect panel
## Client
- Receive callback code/state and exchange with backend.
- On success transition to `MainMenu`.
## Server
- Exchange auth code with provider and bind/create game account.
## Data Exchange
### Client -> Server (`OAuthExchangeRequest`)
- `requestId`, `provider`, `authorizationCode`, `state`, `codeVerifier`
### Server -> Client (`OAuthExchangeResponse`)
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
@@ -0,0 +1,19 @@
# OAuthStart Scene
## UI
- Provider buttons
- OAuth status text
## Client
- Start OAuth flow with selected provider.
- Open provider auth URL.
## Server
- Generate signed OAuth start URL and anti-forgery state.
## Data Exchange
### Client -> Server (`OAuthStartRequest`)
- `requestId`, `provider`, `returnUri`, `deviceId`
### Server -> Client (`OAuthStartResponse`)
- `requestId`, `authorizationUrl`, `state`, `codeVerifier` (if PKCE client-managed)
@@ -0,0 +1,25 @@
# PatchAndVersionCheck Scene
## UI
- Version comparison summary
- Patch progress bar
- Release notes panel (optional)
- Continue button when ready
## Client
- Compare installed version/content against server-required values.
- If update needed: show patch status UI, download/apply, reconnect.
- If up-to-date: continue to `AuthGateway`.
## Server
- Provide update manifest and rollout policy.
- Enforce hard-block below minimum supported version.
## Data Exchange
### Client -> Server (`VersionStatusRequest`)
- `requestId`, `clientVersion`, `contentVersion`, `platform`
### Server -> Client (`VersionStatusResponse`)
- `requestId`, `isClientSupported`, `requiresClientUpdate`, `requiresContentUpdate`
- `minimumAllowedVersion`, `targetClientVersion`, `targetContentVersion`
- `updateManifestUrl`, `updateNotes` (optional), `blockReason` (if unsupported)
@@ -0,0 +1,9 @@
# Ranked play Scene
## Status
Draft placeholder.
## Planned Scope
- Define scene UI blocks
- Define client interactions
- Define server contract and payloads
@@ -0,0 +1,20 @@
# Register Scene
## UI
- Email/username/password inputs
- Terms/privacy acceptance controls
- Submit action + validation messages
## Client
- Submit account fields and required agreements.
- On success transition to `MainMenu`.
## Server
- Create account, validate uniqueness, persist agreements.
## Data Exchange
### Client -> Server (`RegisterRequest`)
- `requestId`, `email`, `username`, `password`, `countryCode`, `dob`, `acceptedPolicies`
### Server -> Client (`RegisterResponse`)
- `requestId`, `success`, `accessToken` (optional), `refreshToken` (optional), `accountSummary` (optional), `requiresEmailVerification`, `errorCode`
@@ -0,0 +1,9 @@
# Settings Scene
## Status
Draft placeholder.
## Planned Scope
- Define scene UI blocks
- Define client interactions
- Define server contract and payloads