diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-01 19:19:49 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-01 19:19:49 +0100 |
| commit | 24e3bb54db579fb9aad8df2a591527dc77fe4cb4 (patch) | |
| tree | af9a0c290f2675068e8396823f641f24bbe4d308 /docs/GUI-PLAN.md | |
| parent | v4.0.6: move the prompt editor and key mapping out of the core (diff) | |
| download | zagan-bet-24e3bb54db579fb9aad8df2a591527dc77fe4cb4.tar.gz zagan-bet-24e3bb54db579fb9aad8df2a591527dc77fe4cb4.zip | |
v4.0.7: finish the Phase 1 boundary with a command shell
The terminal command line moves to client::shell: a typed line becomes a core Command or an adapter action (connect, login, register, set-credential, host maintenance). ClientCore loses submit_line and the last TUI-shaped effects (Interactive, SetPrompt, ListHosts, ForgetHost, AnimateRoulette); the adapter animates roulette from the Result view.
Adds forget-login, which drops the stored credential for the pinned key and keeps trust, distinct from logout (session only) and forget-host (trust too).
Diffstat (limited to '')
| -rw-r--r-- | docs/GUI-PLAN.md | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/docs/GUI-PLAN.md b/docs/GUI-PLAN.md index cb0db91..2789b81 100644 --- a/docs/GUI-PLAN.md +++ b/docs/GUI-PLAN.md | |||
| @@ -24,18 +24,25 @@ Breaking wire change, released for client and server together. | |||
| 24 | **Gate:** mismatch refused in both directions, `HELLO` required before auth, | 24 | **Gate:** mismatch refused in both directions, `HELLO` required before auth, |
| 25 | existing game flows unchanged, new tests for version parsing and gating. | 25 | existing game flows unchanged, new tests for version parsing and gating. |
| 26 | 26 | ||
| 27 | ## Phase 1 — core boundary and roulette | 27 | ## Phase 1 — core boundary and roulette (done) |
| 28 | 28 | ||
| 29 | **In progress.** `Command`/`View` exist and all four games are ported: the | 29 | Complete in v4.0.7. Every game plus `Lobby` and `History` are structured views; |
| 30 | core builds a typed view, frontends send `Command`, and the TUI renders it. | 30 | the core builds the view and frontends send `Command`. The client transport |
| 31 | Done so far: every game plus `Lobby` and `History` are structured views; the | 31 | (TCP, rustls, TOFU, `HELLO`, auto-login) lives in `client::transport` behind a |
| 32 | client transport (TCP, rustls, TOFU, `HELLO`, auto-login) lives in | 32 | trust callback. The command line moved out of the core in two pieces: |
| 33 | `client::transport` behind a trust callback; login and registration are | 33 | `client::input` owns the editor, history and key mapping, and `client::shell` |
| 34 | `Command`s, so a GUI form never needs a terminal prompt. The command-line | 34 | parses a finished line into a core `Command` or an adapter action (connect, |
| 35 | editor and key mapping moved to `client::input`; `ClientCore` no longer knows | 35 | login, register, set-credential, host maintenance). `ClientCore` no longer |
| 36 | keys, the prompt or its history. Remaining: the `Connect` and `Trust` adapter | 36 | holds a `Key`, a prompt buffer, or any of the old TUI-shaped effects |
| 37 | screens, and replacing the last TUI-shaped effects (`Interactive`, host | 37 | (`Interactive`, `SetPrompt`, `ListHosts`, `ForgetHost`, `AnimateRoulette`); the |
| 38 | listing, roulette animation) with commands. | 38 | roulette wheel animation is derived from the `Result` view by the adapter. |
| 39 | "Log out" (`logout`) and "forget saved login" (`forget-login`) are distinct: the | ||
| 40 | latter drops the credential for the pinned key and keeps trust. | ||
| 41 | |||
| 42 | The `Connect` and `Trust` screens are adapter-owned for now: the terminal asks | ||
| 43 | in the transcript, and the GUI will draw them as its own screens over the same | ||
| 44 | `client::transport` callback. They are not core state because the core never | ||
| 45 | sees a certificate. | ||
| 39 | 46 | ||
| 40 | - Introduce `Command` and `View`; move terminal-only concerns (prompt editing, | 47 | - Introduce `Command` and `View`; move terminal-only concerns (prompt editing, |
| 41 | wheel animation, interactive prompts) into the TUI adapter. | 48 | wheel animation, interactive prompts) into the TUI adapter. |
| @@ -43,13 +50,14 @@ listing, roulette animation) with commands. | |||
| 43 | `History`, `Game`. | 50 | `History`, `Game`. |
| 44 | - Port roulette first: `PlaceBet(BetTarget)`, `SetChip`, `ClearBets`, `Spin`, | 51 | - Port roulette first: `PlaceBet(BetTarget)`, `SetChip`, `ClearBets`, `Spin`, |
| 45 | and a `FeltView` carrying chips, cursor, and the last result. | 52 | and a `FeltView` carrying chips, cursor, and the last result. |
| 46 | - Add `ForgetLogin` so "log out" and "forget saved login" are distinct in both | 53 | - Add `forget-login` so "log out" and "forget saved login" are distinct in both |
| 47 | frontends. | 54 | frontends. |
| 48 | - Auto-login stays: a stored credential for the pinned fingerprint logs in | 55 | - Auto-login stays: a stored credential for the pinned fingerprint logs in |
| 49 | automatically after the trust check. | 56 | automatically after the trust check. |
| 50 | 57 | ||
| 51 | **Gate:** the TUI behaves exactly as today, its tests now assert on `View` | 58 | **Gate:** met. The TUI behaves as before (same boards, keys and prompts), its |
| 52 | instead of text where practical, and `ClientCore` contains no terminal types. | 59 | tests drive the real adapter path (`shell::parse`, `Editor`, `game_input`), and |
| 60 | `ClientCore` contains no terminal types. | ||
| 53 | 61 | ||
| 54 | ## Phase 2 — the other three games | 62 | ## Phase 2 — the other three games |
| 55 | 63 | ||
