summaryrefslogtreecommitdiffstats
path: root/docs/adr/0001-testable-client-server-cores.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 19:19:49 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 19:19:49 +0100
commit24e3bb54db579fb9aad8df2a591527dc77fe4cb4 (patch)
treeaf9a0c290f2675068e8396823f641f24bbe4d308 /docs/adr/0001-testable-client-server-cores.md
parentv4.0.6: move the prompt editor and key mapping out of the core (diff)
downloadzagan-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/adr/0001-testable-client-server-cores.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/adr/0001-testable-client-server-cores.md b/docs/adr/0001-testable-client-server-cores.md
index 2e3cd1e..c19c01a 100644
--- a/docs/adr/0001-testable-client-server-cores.md
+++ b/docs/adr/0001-testable-client-server-cores.md
@@ -16,10 +16,12 @@ exercised from `tests/`.
16- The library (`src/lib.rs`) owns shared logic. `src/bin/client` and 16- The library (`src/lib.rs`) owns shared logic. `src/bin/client` and
17 `src/bin/server` are thin adapters for crossterm, TLS, environment variables, 17 `src/bin/server` are thin adapters for crossterm, TLS, environment variables,
18 and interactive prompts. 18 and interactive prompts.
19- `client::core::ClientCore` owns input, history, commands, game state, and 19- `client::core::ClientCore` owns commands, game state, the current screen, and
20 pending replies. It returns `Effect`s (`Print`, `ReplaceRegion`, `ClearRegion`, 20 pending replies. It returns `Effect`s (`Print`, `Render(View)`, `ClearRegion`,
21 `SetPrompt`, `SendLine`, `Interactive`, ...). The binary applies them; the 21 `SendLine`, `Disconnect`, `Quit`). The binary applies them; the tests apply
22 tests apply them to a headless screen. 22 them to a headless screen. The prompt buffer, history and key mapping live in
23 `client::input`, and `client::shell` parses a finished line, so the core never
24 sees a `Key` or a raw command line.
23- `server::core::ServerCore` owns message handling and receives an injected 25- `server::core::ServerCore` owns message handling and receives an injected
24 `Connection`, `GameRegistry`, and bcrypt cost. The binary only owns the TLS 26 `Connection`, `GameRegistry`, and bcrypt cost. The binary only owns the TLS
25 listener and per-connection thread. 27 listener and per-connection thread.