diff --git a/Client/context-files/scenes.md b/Client/context-files/scenes.md index 2698f38..022f5fa 100644 --- a/Client/context-files/scenes.md +++ b/Client/context-files/scenes.md @@ -3,29 +3,25 @@ This file is the top-level map. Scene details now live in `context-files/scenes/*.scene.md`. ## Boot + Session -1. `ClientLaunch` → `scenes/client-launch.scene.md` +1. `ClientLaunch` (includes patch/version check) → `scenes/client-launch.scene.md` 2. `HubConnection` → `scenes/hub-connection.scene.md` -3. `PatchAndVersionCheck` → `scenes/patch-and-version-check.scene.md` -4. `AuthGateway` → `scenes/auth-gateway.scene.md` ## Auth -5. `Login` → `scenes/login.scene.md` -6. `Register` → `scenes/register.scene.md` -7. `OAuthStart` → `scenes/oauth-start.scene.md` -8. `OAuthCallback` → `scenes/oauth-callback.scene.md` +3. `Login` (includes session probe + OAuth start/callback flows) → `scenes/login.scene.md` +4. `Register` → `scenes/register.scene.md` ## Primary App -9. `MainMenu` → `scenes/main-menu.scene.md` -10. `Bazaar` → `scenes/bazaar.scene.md` -11. `Leaderboard` → `scenes/leaderboard.scene.md` -12. `Settings` → `scenes/settings.scene.md` -13. `AccountManagement` → `scenes/account-management.scene.md` -14. `CollectionHub` → `scenes/collection-hub.scene.md` -15. `RankedPlay` → `scenes/ranked-play.scene.md` -16. `CustomPlay` → `scenes/custom-play.scene.md` -17. `DeckEditor` → `scenes/deck-editor.scene.md` -18. `CardViewer` → `scenes/card-viewer.scene.md` -19. `Cosmetics` → `scenes/cosmetics.scene.md` +5. `MainMenu` → `scenes/main-menu.scene.md` +6. `Bazaar` → `scenes/bazaar.scene.md` +7. `Leaderboard` → `scenes/leaderboard.scene.md` +8. `Settings` → `scenes/settings.scene.md` +9. `AccountManagement` → `scenes/account-management.scene.md` +10. `CollectionHub` → `scenes/collection-hub.scene.md` +11. `RankedPlay` → `scenes/ranked-play.scene.md` +12. `CustomPlay` → `scenes/custom-play.scene.md` +13. `DeckEditor` → `scenes/deck-editor.scene.md` +14. `CardViewer` → `scenes/card-viewer.scene.md` +15. `Cosmetics` → `scenes/cosmetics.scene.md` ## Global Rules - Shared/global client rules are in `global.md`. diff --git a/Client/context-files/scenes/auth-gateway.scene.md b/Client/context-files/scenes/auth-gateway.scene.md deleted file mode 100644 index efdfc1d..0000000 --- a/Client/context-files/scenes/auth-gateway.scene.md +++ /dev/null @@ -1,22 +0,0 @@ -# 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` diff --git a/Client/context-files/scenes/client-launch.scene.md b/Client/context-files/scenes/client-launch.scene.md index 6e5fa5a..52d1126 100644 --- a/Client/context-files/scenes/client-launch.scene.md +++ b/Client/context-files/scenes/client-launch.scene.md @@ -4,11 +4,24 @@ - Splash/logo - Build/version text - Background init indicator +- Version/patch status panel when update checks run +- Patch progress bar when updates are required ## Client - Boot local config, device fingerprint, cached token state. - Initialize telemetry/session id. -- Transition to `HubConnection`. +- Perform client/content version check during launch. +- If update required: show patch flow, apply update, and continue. +- If up-to-date: transition to `HubConnection`. ## Server -- None (local-only scene). +- Provide version support status and update manifest metadata. + +## 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) diff --git a/Client/context-files/scenes/login.scene.md b/Client/context-files/scenes/login.scene.md index ab6e15b..164391f 100644 --- a/Client/context-files/scenes/login.scene.md +++ b/Client/context-files/scenes/login.scene.md @@ -5,17 +5,43 @@ - Password field - Remember device toggle - Submit + Forgot Password actions +- OAuth provider buttons (Google/Steam/Apple/Microsoft as enabled) +- Session check/loading indicator +- OAuth status text + callback verification state ## Client -- Submit account identifier + password. +- Perform session probe at scene entry. +- Decide path: existing session refresh, password login, or OAuth login. +- Start OAuth flow and handle OAuth callback exchange in this scene. - On success transition to `MainMenu`. ## Server -- Validate credentials, enforce lockout and MFA if enabled. +- Validate refresh tokens and return auth policy. +- Validate credential login. +- Generate OAuth start URL/state and process OAuth exchange. ## Data Exchange +### Client -> Server (`SessionProbe`) +- `requestId`, `refreshToken` (optional), `deviceId` + +### Server -> Client (`SessionProbeResult`) +- `requestId`, `isAuthenticated`, `accountId`, `displayName` +- `authMethodsAvailable`, `passwordPolicy` + ### Client -> Server (`LoginRequest`) - `requestId`, `emailOrUsername`, `password`, `deviceId` ### Server -> Client (`LoginResponse`) - `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode` + +### Client -> Server (`OAuthStartRequest`) +- `requestId`, `provider`, `returnUri`, `deviceId` + +### Server -> Client (`OAuthStartResponse`) +- `requestId`, `authorizationUrl`, `state`, `codeVerifier` (if PKCE client-managed) + +### Client -> Server (`OAuthExchangeRequest`) +- `requestId`, `provider`, `authorizationCode`, `state`, `codeVerifier` + +### Server -> Client (`OAuthExchangeResponse`) +- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode` diff --git a/Client/context-files/scenes/oauth-callback.scene.md b/Client/context-files/scenes/oauth-callback.scene.md deleted file mode 100644 index 4d07c13..0000000 --- a/Client/context-files/scenes/oauth-callback.scene.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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` diff --git a/Client/context-files/scenes/oauth-start.scene.md b/Client/context-files/scenes/oauth-start.scene.md deleted file mode 100644 index 7e0cdee..0000000 --- a/Client/context-files/scenes/oauth-start.scene.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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) diff --git a/Client/context-files/scenes/patch-and-version-check.scene.md b/Client/context-files/scenes/patch-and-version-check.scene.md deleted file mode 100644 index abde34b..0000000 --- a/Client/context-files/scenes/patch-and-version-check.scene.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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)