Merge hub connection flow into login scene

This commit is contained in:
dingo
2026-02-22 15:46:41 +00:00
parent a7dc4e60e0
commit fd7964c044
3 changed files with 30 additions and 40 deletions
+13 -14
View File
@@ -4,24 +4,23 @@ This file is the top-level map. Scene details now live in `context-files/scenes/
## Boot + Session
1. `ClientLaunch` (includes patch/version check) → `scenes/client-launch.scene.md`
2. `HubConnection` → `scenes/hub-connection.scene.md`
## Auth
3. `Login` (includes session probe + OAuth start/callback flows) → `scenes/login.scene.md`
4. `Register` → `scenes/register.scene.md`
2. `Login` (includes hub connection, session probe, and OAuth start/callback flows) → `scenes/login.scene.md`
3. `Register` → `scenes/register.scene.md`
## Primary App
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`
4. `MainMenu` → `scenes/main-menu.scene.md`
5. `Bazaar` → `scenes/bazaar.scene.md`
6. `Leaderboard` → `scenes/leaderboard.scene.md`
7. `Settings` → `scenes/settings.scene.md`
8. `AccountManagement` → `scenes/account-management.scene.md`
9. `CollectionHub` → `scenes/collection-hub.scene.md`
10. `RankedPlay` → `scenes/ranked-play.scene.md`
11. `CustomPlay` → `scenes/custom-play.scene.md`
12. `DeckEditor` → `scenes/deck-editor.scene.md`
13. `CardViewer` → `scenes/card-viewer.scene.md`
14. `Cosmetics` → `scenes/cosmetics.scene.md`
## Global Rules
- Shared/global client rules are in `global.md`.
@@ -1,25 +0,0 @@
# 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)
+17 -1
View File
@@ -1,6 +1,8 @@
# Login Scene
## UI
- Connection status indicator (connecting/retrying/failed)
- Retry action + diagnostics link (optional)
- Username/email field
- Password field
- Remember device toggle
@@ -10,17 +12,31 @@
- OAuth status text + callback verification state
## Client
- Perform session probe at scene entry.
- Open hub/relay connection in this scene.
- Send initial hello with client build/platform metadata.
- Wait for connection acceptance and service availability.
- Perform session probe after connection is established.
- 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 protocol compatibility and return environment capabilities.
- Return service status.
- Validate refresh tokens and return auth policy.
- Validate credential login.
- Generate OAuth start URL/state and process OAuth exchange.
## 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)
### Client -> Server (`SessionProbe`)
- `requestId`, `refreshToken` (optional), `deviceId`