summaryrefslogtreecommitdiffstats
path: root/docs/GUI-PLAN.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/GUI-PLAN.md')
-rw-r--r--docs/GUI-PLAN.md38
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,
25existing game flows unchanged, new tests for version parsing and gating. 25existing 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 29Complete in v4.0.7. Every game plus `Lobby` and `History` are structured views;
30core builds a typed view, frontends send `Command`, and the TUI renders it. 30the core builds the view and frontends send `Command`. The client transport
31Done 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
32client transport (TCP, rustls, TOFU, `HELLO`, auto-login) lives in 32trust 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 34parses a finished line into a core `Command` or an adapter action (connect,
35editor and key mapping moved to `client::input`; `ClientCore` no longer knows 35login, register, set-credential, host maintenance). `ClientCore` no longer
36keys, the prompt or its history. Remaining: the `Connect` and `Trust` adapter 36holds a `Key`, a prompt buffer, or any of the old TUI-shaped effects
37screens, and replacing the last TUI-shaped effects (`Interactive`, host 37(`Interactive`, `SetPrompt`, `ListHosts`, `ForgetHost`, `AnimateRoulette`); the
38listing, roulette animation) with commands. 38roulette wheel animation is derived from the `Result` view by the adapter.
39"Log out" (`logout`) and "forget saved login" (`forget-login`) are distinct: the
40latter drops the credential for the pinned key and keeps trust.
41
42The `Connect` and `Trust` screens are adapter-owned for now: the terminal asks
43in 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
45sees 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
52instead of text where practical, and `ClientCore` contains no terminal types. 59tests 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