bots-garden/razorbillpublic Fork
⑂ f0b00a8
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

memory + ticket #54 closed: rzb tui foundation done

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-27T05:16:10+01:00 Browse files
f0b00a8 parent: 58ecc00
added .memory/handoffs/2026-11-27-v0-3-tui-foundation.md +17 -0
new file mode 100644
@@ -0,0 +1,17 @@
1+# Handoff — 2026-11-27 — v0.3 TUI: #54 foundation done
2+
3+## State
4+- Branch `feature/v0.3-tui`, main fast-forwarded to it. #53 (admin routes) and #54 (`rzb tui` foundation) closed. Tests Linux 277 / Mac 303, gate PASS (run #37), docs EN+FR, `rzb tui` checked by hand on the Mac by the user.
5+- Nothing pushed (the user pushes from the Mac).
6+
7+## Next steps
8+1. Ask the user which ticket next. Suggested: #56 (full Dashboard: select a model with `ListView`, unload with a confirmation, 409 shown as a message — all data already in `/rzb/status`), or #55 (chat screen: `ServerClient.chat` stream, `TextField`, model picker from `/v1/models`, reasoning shown/folded, cancel = stop reading the stream).
9+2. Then #57 (models screen: reads the HF cache directly like `rzb models`), #58 (settings: TUI preferences incl. poll interval + server config via `FormView`, reload), #59 (TUI docs EN+FR, tutorial/how-to).
10+3. At the v0.3 release: version string, CLI reference header ("razorbill 0.2.0"), diagram title "v0.2".
11+
12+## Watch out for
13+- Screens get keys only after `AppState.handle` returns `.none`; `TUIApp.run` currently ignores those keys — #55/#56 must route them to the current screen.
14+- Cancelling a streamed chat client side is not tested yet (FakeEngine answers too fast): add a hanging engine in the TUI tests for #55.
15+- `ServerClient.localHTTP` is a process-wide HTTPClient never shut down (fine for a CLI; do not create one per request).
16+- The host-runner on the Mac may stop; a 502 from `tools/host-runner/host.sh` means it needs restarting there.
17+- The `/rzb` loopback check accepts anything relayed by a local proxy (the sandbox's sbx proxy included).
new file mode 100644
@@ -0,0 +1,17 @@
1+# Handoff — 2026-11-27 — v0.3 TUI: #54 foundation done
2+
3+## State
4+- Branch `feature/v0.3-tui`, main fast-forwarded to it. #53 (admin routes) and #54 (`rzb tui` foundation) closed. Tests Linux 277 / Mac 303, gate PASS (run #37), docs EN+FR, `rzb tui` checked by hand on the Mac by the user.
5+- Nothing pushed (the user pushes from the Mac).
6+
7+## Next steps
8+1. Ask the user which ticket next. Suggested: #56 (full Dashboard: select a model with `ListView`, unload with a confirmation, 409 shown as a message — all data already in `/rzb/status`), or #55 (chat screen: `ServerClient.chat` stream, `TextField`, model picker from `/v1/models`, reasoning shown/folded, cancel = stop reading the stream).
9+2. Then #57 (models screen: reads the HF cache directly like `rzb models`), #58 (settings: TUI preferences incl. poll interval + server config via `FormView`, reload), #59 (TUI docs EN+FR, tutorial/how-to).
10+3. At the v0.3 release: version string, CLI reference header ("razorbill 0.2.0"), diagram title "v0.2".
11+
12+## Watch out for
13+- Screens get keys only after `AppState.handle` returns `.none`; `TUIApp.run` currently ignores those keys — #55/#56 must route them to the current screen.
14+- Cancelling a streamed chat client side is not tested yet (FakeEngine answers too fast): add a hanging engine in the TUI tests for #55.
15+- `ServerClient.localHTTP` is a process-wide HTTPClient never shut down (fine for a CLI; do not create one per request).
16+- The host-runner on the Mac may stop; a 502 from `tools/host-runner/host.sh` means it needs restarting there.
17+- The `/rzb` loopback check accepts anything relayed by a local proxy (the sandbox's sbx proxy included).
modified .memory/history.md +11 -0
@@ -494,3 +494,14 @@ open, a comment on each. main fast-forwarded.
494494 - **Quality**: gate PASS run #36 (0/0/0, complexity 548 → 588), no refactoring needed.
495495 - **Docs**: EN+FR reference (http-api / api-http /rzb section, errors 403/409 + 4 codes, configuration "Reloading" / "Rechargement", SIGHUP under rzb serve), how-to `watch-and-steer-a-running-server.md` / `surveiller-et-piloter-le-serveur.md`, explanations (openai-compatibility: routes of our own under /rzb; model-lifecycle: unloading on demand and reloading), indexes, `packages.drawio` labels. `test_docs_curl.py` now runs `/health` and `/rzb` examples (22 pass on Linux).
496496 - **Tickets**: #53 closed (tasks 1–4, comment 1). Mid-session the user asked for a structured-output ticket, then withdrew it ("au temps pour moi": #39 already covers it). No ticket created.
497+
498+## 2026-11-26/27 — #54 TUI foundation (rzb tui)
499+
500+- **Goal**: next v0.3 ticket after #53, methodical-dev, same branch. User choices: AsyncHTTPClient (recommended over URLSession, which has no streaming on Linux), F1–F4 + Ctrl-T for screens (Tab kept for forms), a minimal Dashboard now (other screens name their ticket). 8-step plan approved ("oui").
501+- **Changes**: step 1 terminal layer restored from `v0.1-agent` + F-keys — b971e1f; step 2 `AppState`, `AppRenderer`, `ListView`, `FormView`, `Style` — 96dad58; step 3 `ServerClient`, `ServerSentEventParser`, `ServerAPI.swift`, `ChatChunk.swift` — 9d02f90; step 4 `TUIApp`, `DashboardView`, `ConnectionView` — 19e3378; step 5 `TUICommand`, `TUILaunch`, `CLIEnvironment.hasTerminal/tui` — 64c4687; docs + quality — 58ecc00.
502+- **Decisions (mine, at checkpoints)**: TUI starts on the Dashboard; memory shown in binary GB like the server's messages; the TUI module does not link RazorbillServer (wire types redeclared); poll interval fixed at 1 s for now (a #58 preference later); `0.0.0.0`/`::` in the config's server section → connect to 127.0.0.1.
503+- **Traps found**: AsyncHTTPClient retries a refused connection until the request deadline (2 s to notice a stopped server) → `retryConnectionEstablishment = false`; on macOS Network.framework also waits for connectivity (still 2 s on the Mac, seen in the host-runner run) → `networkFrameworkWaitForConnectivity = false`; now ~10 ms on both. Swift treats "\r\n" as one Character, so the SSE parser normalises line ends first. `#expect` cannot call mutating methods. swiftlint and swift-format fight over trailing commas in one-element multi-line arrays: hoist the element into a `let`.
504+- **Tests**: Linux 217 → 277 (RazorbillTUITests 52 incl. live tests against a real Hummingbird server with FakeEngine and an end-to-end TUIApp + ServerClient test; TUICommandTests 8). Mac 303 via host-runner (it had stopped once; user restarted it). User checked `rzb tui` by hand on the Mac: no server, server started, chat (I sent the curls from the sandbox through host.docker.internal), two parallel requests → busy / 1 waiting, screens and resize, server stopped, Ctrl-Q — "impeccable". Noted: requests through the sandbox proxy reach the Mac's server from loopback, so `/rzb` routes accept them.
505+- **Quality**: gate PASS run #37 (0/0/0, complexity 588 → 717 with the new module).
506+- **Docs**: EN+FR `rzb tui` in the CLI reference, architecture module table + sentence on the TUI not linking the server, how-to mention, indexes, `packages.drawio` (RazorbillTUI, async-http-client). The CLI reference header still says "razorbill 0.2.0" (changes at release).
507+- **Tickets**: #54 closed (tasks 1–4, comment 1). main fast-forwarded.
@@ -494,3 +494,14 @@ open, a comment on each. main fast-forwarded.
494 - **Quality**: gate PASS run #36 (0/0/0, complexity 548 → 588), no refactoring needed.494 - **Quality**: gate PASS run #36 (0/0/0, complexity 548 → 588), no refactoring needed.
495 - **Docs**: EN+FR reference (http-api / api-http /rzb section, errors 403/409 + 4 codes, configuration "Reloading" / "Rechargement", SIGHUP under rzb serve), how-to `watch-and-steer-a-running-server.md` / `surveiller-et-piloter-le-serveur.md`, explanations (openai-compatibility: routes of our own under /rzb; model-lifecycle: unloading on demand and reloading), indexes, `packages.drawio` labels. `test_docs_curl.py` now runs `/health` and `/rzb` examples (22 pass on Linux).495 - **Docs**: EN+FR reference (http-api / api-http /rzb section, errors 403/409 + 4 codes, configuration "Reloading" / "Rechargement", SIGHUP under rzb serve), how-to `watch-and-steer-a-running-server.md` / `surveiller-et-piloter-le-serveur.md`, explanations (openai-compatibility: routes of our own under /rzb; model-lifecycle: unloading on demand and reloading), indexes, `packages.drawio` labels. `test_docs_curl.py` now runs `/health` and `/rzb` examples (22 pass on Linux).
496 - **Tickets**: #53 closed (tasks 1–4, comment 1). Mid-session the user asked for a structured-output ticket, then withdrew it ("au temps pour moi": #39 already covers it). No ticket created.496 - **Tickets**: #53 closed (tasks 1–4, comment 1). Mid-session the user asked for a structured-output ticket, then withdrew it ("au temps pour moi": #39 already covers it). No ticket created.
497+
498+## 2026-11-26/27 — #54 TUI foundation (rzb tui)
499+
500+- **Goal**: next v0.3 ticket after #53, methodical-dev, same branch. User choices: AsyncHTTPClient (recommended over URLSession, which has no streaming on Linux), F1–F4 + Ctrl-T for screens (Tab kept for forms), a minimal Dashboard now (other screens name their ticket). 8-step plan approved ("oui").
501+- **Changes**: step 1 terminal layer restored from `v0.1-agent` + F-keys — b971e1f; step 2 `AppState`, `AppRenderer`, `ListView`, `FormView`, `Style` — 96dad58; step 3 `ServerClient`, `ServerSentEventParser`, `ServerAPI.swift`, `ChatChunk.swift` — 9d02f90; step 4 `TUIApp`, `DashboardView`, `ConnectionView` — 19e3378; step 5 `TUICommand`, `TUILaunch`, `CLIEnvironment.hasTerminal/tui` — 64c4687; docs + quality — 58ecc00.
502+- **Decisions (mine, at checkpoints)**: TUI starts on the Dashboard; memory shown in binary GB like the server's messages; the TUI module does not link RazorbillServer (wire types redeclared); poll interval fixed at 1 s for now (a #58 preference later); `0.0.0.0`/`::` in the config's server section → connect to 127.0.0.1.
503+- **Traps found**: AsyncHTTPClient retries a refused connection until the request deadline (2 s to notice a stopped server) → `retryConnectionEstablishment = false`; on macOS Network.framework also waits for connectivity (still 2 s on the Mac, seen in the host-runner run) → `networkFrameworkWaitForConnectivity = false`; now ~10 ms on both. Swift treats "\r\n" as one Character, so the SSE parser normalises line ends first. `#expect` cannot call mutating methods. swiftlint and swift-format fight over trailing commas in one-element multi-line arrays: hoist the element into a `let`.
504+- **Tests**: Linux 217 → 277 (RazorbillTUITests 52 incl. live tests against a real Hummingbird server with FakeEngine and an end-to-end TUIApp + ServerClient test; TUICommandTests 8). Mac 303 via host-runner (it had stopped once; user restarted it). User checked `rzb tui` by hand on the Mac: no server, server started, chat (I sent the curls from the sandbox through host.docker.internal), two parallel requests → busy / 1 waiting, screens and resize, server stopped, Ctrl-Q — "impeccable". Noted: requests through the sandbox proxy reach the Mac's server from loopback, so `/rzb` routes accept them.
505+- **Quality**: gate PASS run #37 (0/0/0, complexity 588 → 717 with the new module).
506+- **Docs**: EN+FR `rzb tui` in the CLI reference, architecture module table + sentence on the TUI not linking the server, how-to mention, indexes, `packages.drawio` (RazorbillTUI, async-http-client). The CLI reference header still says "razorbill 0.2.0" (changes at release).
507+- **Tickets**: #54 closed (tasks 1–4, comment 1). main fast-forwarded.
modified .memory/summary.md +18 -1
@@ -133,6 +133,20 @@ started file's `server:` keys, ignoring those set on the command line (`ServerSe
133133 `ConfigReloadSignalService` (UnixSignals, injectable stream) is added to the app's services by
134134 `makeApplication(reloader:)`. Types around the manager moved to `ModelManagerTypes.swift`.
135135
136+TUI foundation (#54, v0.3): module `RazorbillTUI` (Core + async-http-client + NIOCore/NIOHTTP1; no
137+MLX, does not link RazorbillServer — wire shapes redeclared client side in `ServerAPI.swift`,
138+snake_case decoded). Terminal layer from tag `v0.1-agent` (`PosixTerminal`, `KeyDecoder` with
139+F1–F12 and `.backtab`, `TextLayout`, `Screen` with `hidesCursor`); `AppState` (screens chat /
140+dashboard / models / settings, `Connection`, F1–F4, Ctrl-T next, Ctrl-C/Ctrl-Q quit; starts on the
141+Dashboard) + `AppRenderer` (tabs, body, status bar) + `ListView` / `FormView` / `TextField`
142+widgets; `ServerClient` (status, models, unload, reload, streamed chat via `ServerSentEventParser`;
143+`ServerClientError.connection` maps 401/403 local_only/unreachable to the status bar) on its own
144+`ServerClient.localHTTP` (no connection retries, no Network.framework connectivity wait, 2 s connect
145+timeout); `TUIApp` actor polls a `StatusSource` every second, draws `DashboardView` or
146+`ConnectionView` (not running → the `rzb serve [--config]` command), placeholders for #55/#57/#58.
147+`rzb tui [--url] [--config] [--api-key-env]` (`TUICommand`; `CLIEnvironment.hasTerminal` / `tui`
148+runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
149+
136150 ## Decisions in force
137151
138152 - #37 reasoning switches were chosen by Claude after the user's plain "go" (see the ticket's
@@ -150,6 +164,8 @@ started file's `server:` keys, ignoring those set on the command line (`ServerSe
150164 #53 (user, 2026-11-26): the TUI polls `GET /rzb/status` (no SSE); unloading a model in use is
151165 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,
152166 port, api_key_env, cors_origin → `restart_required`); invalid file → 400, old config kept.
167+ #54 (user, 2026-11-26): AsyncHTTPClient for the TUI, F1–F4 + Ctrl-T for screens, a minimal
168+ Dashboard before #56.
153169 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).
154170 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.
155171 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:
@@ -252,7 +268,8 @@ Tests 2026-11-25 after #43 fixes: Linux 155, Mac 178. After #44: Linux 161, Mac
252268 Linux 34 pass / 21 skip (Mac compat not re-run after #44). After #48 (prompt cache): Linux 168, Mac 193,
253269 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat
254270 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on
255-macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run).
271+macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run). After #54:
272+Linux 277, Mac 303.
256273
257274 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,
258275 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions
@@ -133,6 +133,20 @@ started file's `server:` keys, ignoring those set on the command line (`ServerSe
133 `ConfigReloadSignalService` (UnixSignals, injectable stream) is added to the app's services by133 `ConfigReloadSignalService` (UnixSignals, injectable stream) is added to the app's services by
134 `makeApplication(reloader:)`. Types around the manager moved to `ModelManagerTypes.swift`.134 `makeApplication(reloader:)`. Types around the manager moved to `ModelManagerTypes.swift`.
135 135
136+TUI foundation (#54, v0.3): module `RazorbillTUI` (Core + async-http-client + NIOCore/NIOHTTP1; no
137+MLX, does not link RazorbillServer — wire shapes redeclared client side in `ServerAPI.swift`,
138+snake_case decoded). Terminal layer from tag `v0.1-agent` (`PosixTerminal`, `KeyDecoder` with
139+F1–F12 and `.backtab`, `TextLayout`, `Screen` with `hidesCursor`); `AppState` (screens chat /
140+dashboard / models / settings, `Connection`, F1–F4, Ctrl-T next, Ctrl-C/Ctrl-Q quit; starts on the
141+Dashboard) + `AppRenderer` (tabs, body, status bar) + `ListView` / `FormView` / `TextField`
142+widgets; `ServerClient` (status, models, unload, reload, streamed chat via `ServerSentEventParser`;
143+`ServerClientError.connection` maps 401/403 local_only/unreachable to the status bar) on its own
144+`ServerClient.localHTTP` (no connection retries, no Network.framework connectivity wait, 2 s connect
145+timeout); `TUIApp` actor polls a `StatusSource` every second, draws `DashboardView` or
146+`ConnectionView` (not running → the `rzb serve [--config]` command), placeholders for #55/#57/#58.
147+`rzb tui [--url] [--config] [--api-key-env]` (`TUICommand`; `CLIEnvironment.hasTerminal` / `tui`
148+runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
149+
136 ## Decisions in force150 ## Decisions in force
137 151
138 - #37 reasoning switches were chosen by Claude after the user's plain "go" (see the ticket's152 - #37 reasoning switches were chosen by Claude after the user's plain "go" (see the ticket's
@@ -150,6 +164,8 @@ started file's `server:` keys, ignoring those set on the command line (`ServerSe
150 #53 (user, 2026-11-26): the TUI polls `GET /rzb/status` (no SSE); unloading a model in use is164 #53 (user, 2026-11-26): the TUI polls `GET /rzb/status` (no SSE); unloading a model in use is
151 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,165 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,
152 port, api_key_env, cors_origin → `restart_required`); invalid file → 400, old config kept.166 port, api_key_env, cors_origin → `restart_required`); invalid file → 400, old config kept.
167+ #54 (user, 2026-11-26): AsyncHTTPClient for the TUI, F1–F4 + Ctrl-T for screens, a minimal
168+ Dashboard before #56.
153 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).169 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).
154 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.170 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.
155 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:171 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:
@@ -252,7 +268,8 @@ Tests 2026-11-25 after #43 fixes: Linux 155, Mac 178. After #44: Linux 161, Mac
252 Linux 34 pass / 21 skip (Mac compat not re-run after #44). After #48 (prompt cache): Linux 168, Mac 193,268 Linux 34 pass / 21 skip (Mac compat not re-run after #44). After #48 (prompt cache): Linux 168, Mac 193,
253 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat269 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat
254 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on270 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on
255-macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run).271+macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run). After #54:
272+Linux 277, Mac 303.
256 273
257 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,274 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,
258 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions275 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions
modified .tickets/issues/0054-tui-foundation-rzb-tui-screens-server-client.yaml +39 -7
@@ -1,12 +1,13 @@
11 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
22 id: 54
33 title: "TUI foundation: rzb tui, screens, connection to the local server"
4-state: open
4+state: closed
55 author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-11-26T08:00:00.000Z
9-updatedAt: 2026-11-26T08:00:00.000Z
9+updatedAt: 2026-11-27T04:30:00.000Z
10+closedAt: 2026-11-27T04:30:00.000Z
1011 labels:
1112 - "kind::feature"
1213 - "area::tui"
@@ -27,34 +28,65 @@ body: |
2728 tasks:
2829 - id: 1
2930 title: "Restore the terminal layer from v0.1-agent"
30- state: open
31+ state: closed
3132 priority: high
3233 author:
3334 name: k33g
3435 email: ph.charriere@gmail.com
3536 createdAt: 2026-11-26T08:00:00.000Z
37+ updatedAt: 2026-11-27T04:30:00.000Z
38+ closedAt: 2026-11-27T04:30:00.000Z
3639 - id: 2
3740 title: "Screen routing, status bar, list and form widgets"
38- state: open
41+ state: closed
3942 priority: high
4043 author:
4144 name: k33g
4245 email: ph.charriere@gmail.com
4346 createdAt: 2026-11-26T08:00:00.000Z
47+ updatedAt: 2026-11-27T04:30:00.000Z
48+ closedAt: 2026-11-27T04:30:00.000Z
4449 - id: 3
4550 title: "HTTP client (SSE, admin routes, API key) and the not-running state"
46- state: open
51+ state: closed
4752 priority: high
4853 author:
4954 name: k33g
5055 email: ph.charriere@gmail.com
5156 createdAt: 2026-11-26T08:00:00.000Z
57+ updatedAt: 2026-11-27T04:30:00.000Z
58+ closedAt: 2026-11-27T04:30:00.000Z
5259 - id: 4
5360 title: "rzb tui command, CLI reference EN + FR"
54- state: open
61+ state: closed
5562 priority: medium
5663 author:
5764 name: k33g
5865 email: ph.charriere@gmail.com
5966 createdAt: 2026-11-26T08:00:00.000Z
60-comments: []
67+ updatedAt: 2026-11-27T04:30:00.000Z
68+ closedAt: 2026-11-27T04:30:00.000Z
69+comments:
70+ - id: 1
71+ author:
72+ name: k33g
73+ email: ph.charriere@gmail.com
74+ createdAt: 2026-11-27T04:30:00.000Z
75+ body: |
76+ Done on branch feature/v0.3-tui (b971e1f..58ecc00). Decisions (user, 2026-11-26): AsyncHTTPClient
77+ (streaming on macOS and Linux alike), F1-F4 + Ctrl-T to switch screens, a minimal Dashboard now.
78+
79+ - RazorbillTUI (Core + async-http-client + swift-nio; no MLX, no RazorbillServer): terminal layer
80+ restored from v0.1-agent (PosixTerminal, KeyDecoder now with F1-F12 and Shift-Tab, TextLayout,
81+ Screen), AppState / AppRenderer (tabs, status bar saying what to do for each connection problem),
82+ ListView and FormView widgets, ServerClient (status, models, unload, reload, streamed chat; SSE
83+ parser; errors -> Connection), TUIApp (polls /rzb/status every second; Dashboard; not-running,
84+ key-refused and not-local screens; placeholders naming #55, #57, #58).
85+ - The TUI's HTTPClient disables connection retries and, on macOS, Network.framework's wait for
86+ connectivity: a stopped server shows within milliseconds instead of after the timeout.
87+ - rzb tui [--url] [--config] [--api-key-env]: address from --url, else the config's server section
88+ (0.0.0.0 and :: -> 127.0.0.1), else 127.0.0.1:7920; no terminal -> exit 1 with the address.
89+ - Tests: Linux 277, Mac 303 (host-runner); checked by hand on the Mac by the user (no server,
90+ server started, chat and two parallel requests -> busy/waiting, screens and resize, server
91+ stopped, Ctrl-Q restores the terminal). Gate PASS (run #37).
92+ - Docs EN+FR: rzb tui in the CLI reference, architecture (module table, diagram). Full TUI docs: #59.
@@ -1,12 +1,13 @@
1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2 id: 542 id: 54
3 title: "TUI foundation: rzb tui, screens, connection to the local server"3 title: "TUI foundation: rzb tui, screens, connection to the local server"
4-state: open4+state: closed
5 author:5 author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-11-26T08:00:00.000Z8 createdAt: 2026-11-26T08:00:00.000Z
9-updatedAt: 2026-11-26T08:00:00.000Z9+updatedAt: 2026-11-27T04:30:00.000Z
10+closedAt: 2026-11-27T04:30:00.000Z
10 labels:11 labels:
11 - "kind::feature"12 - "kind::feature"
12 - "area::tui"13 - "area::tui"
@@ -27,34 +28,65 @@ body: |
27 tasks:28 tasks:
28 - id: 129 - id: 1
29 title: "Restore the terminal layer from v0.1-agent"30 title: "Restore the terminal layer from v0.1-agent"
30- state: open31+ state: closed
31 priority: high32 priority: high
32 author:33 author:
33 name: k33g34 name: k33g
34 email: ph.charriere@gmail.com35 email: ph.charriere@gmail.com
35 createdAt: 2026-11-26T08:00:00.000Z36 createdAt: 2026-11-26T08:00:00.000Z
37+ updatedAt: 2026-11-27T04:30:00.000Z
38+ closedAt: 2026-11-27T04:30:00.000Z
36 - id: 239 - id: 2
37 title: "Screen routing, status bar, list and form widgets"40 title: "Screen routing, status bar, list and form widgets"
38- state: open41+ state: closed
39 priority: high42 priority: high
40 author:43 author:
41 name: k33g44 name: k33g
42 email: ph.charriere@gmail.com45 email: ph.charriere@gmail.com
43 createdAt: 2026-11-26T08:00:00.000Z46 createdAt: 2026-11-26T08:00:00.000Z
47+ updatedAt: 2026-11-27T04:30:00.000Z
48+ closedAt: 2026-11-27T04:30:00.000Z
44 - id: 349 - id: 3
45 title: "HTTP client (SSE, admin routes, API key) and the not-running state"50 title: "HTTP client (SSE, admin routes, API key) and the not-running state"
46- state: open51+ state: closed
47 priority: high52 priority: high
48 author:53 author:
49 name: k33g54 name: k33g
50 email: ph.charriere@gmail.com55 email: ph.charriere@gmail.com
51 createdAt: 2026-11-26T08:00:00.000Z56 createdAt: 2026-11-26T08:00:00.000Z
57+ updatedAt: 2026-11-27T04:30:00.000Z
58+ closedAt: 2026-11-27T04:30:00.000Z
52 - id: 459 - id: 4
53 title: "rzb tui command, CLI reference EN + FR"60 title: "rzb tui command, CLI reference EN + FR"
54- state: open61+ state: closed
55 priority: medium62 priority: medium
56 author:63 author:
57 name: k33g64 name: k33g
58 email: ph.charriere@gmail.com65 email: ph.charriere@gmail.com
59 createdAt: 2026-11-26T08:00:00.000Z66 createdAt: 2026-11-26T08:00:00.000Z
60-comments: []67+ updatedAt: 2026-11-27T04:30:00.000Z
68+ closedAt: 2026-11-27T04:30:00.000Z
69+comments:
70+ - id: 1
71+ author:
72+ name: k33g
73+ email: ph.charriere@gmail.com
74+ createdAt: 2026-11-27T04:30:00.000Z
75+ body: |
76+ Done on branch feature/v0.3-tui (b971e1f..58ecc00). Decisions (user, 2026-11-26): AsyncHTTPClient
77+ (streaming on macOS and Linux alike), F1-F4 + Ctrl-T to switch screens, a minimal Dashboard now.
78+
79+ - RazorbillTUI (Core + async-http-client + swift-nio; no MLX, no RazorbillServer): terminal layer
80+ restored from v0.1-agent (PosixTerminal, KeyDecoder now with F1-F12 and Shift-Tab, TextLayout,
81+ Screen), AppState / AppRenderer (tabs, status bar saying what to do for each connection problem),
82+ ListView and FormView widgets, ServerClient (status, models, unload, reload, streamed chat; SSE
83+ parser; errors -> Connection), TUIApp (polls /rzb/status every second; Dashboard; not-running,
84+ key-refused and not-local screens; placeholders naming #55, #57, #58).
85+ - The TUI's HTTPClient disables connection retries and, on macOS, Network.framework's wait for
86+ connectivity: a stopped server shows within milliseconds instead of after the timeout.
87+ - rzb tui [--url] [--config] [--api-key-env]: address from --url, else the config's server section
88+ (0.0.0.0 and :: -> 127.0.0.1), else 127.0.0.1:7920; no terminal -> exit 1 with the address.
89+ - Tests: Linux 277, Mac 303 (host-runner); checked by hand on the Mac by the user (no server,
90+ server started, chat and two parallel requests -> busy/waiting, screens and resize, server
91+ stopped, Ctrl-Q restores the terminal). Gate PASS (run #37).
92+ - Docs EN+FR: rzb tui in the CLI reference, architecture (module table, diagram). Full TUI docs: #59.