bots-garden/razorbillpublic Fork
⑂ 2a96bad
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 + tickets: #55 closed, #56 tasks 1-2 closed (panel waits for #26/#28)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-27T05:39:12+01:00 Browse files
2a96bad parent: 4ae74ac
modified .memory/handoffs/2026-11-27-v0-3-tui-foundation.md +6 -0
@@ -15,3 +15,9 @@
1515 - `ServerClient.localHTTP` is a process-wide HTTPClient never shut down (fine for a CLI; do not create one per request).
1616 - The host-runner on the Mac may stop; a 502 from `tools/host-runner/host.sh` means it needs restarting there.
1717 - The `/rzb` loopback check accepts anything relayed by a local proxy (the sandbox's sbx proxy included).
18+
19+## Update (same day): #56 and #55 done
20+- Dashboard (select, `u` unload, request columns, memory gauge) and Chat (stream, Esc/Ctrl-C stop, Ctrl-N, Ctrl-P picker, Ctrl-R reasoning, `/set`) are in; #55 closed, #56 open only for task 3 (pressure/GPU, needs #26/#28). Linux 300 / Mac 326, gate PASS run #38. The server now records streamed requests' tokens and writes the history after the last byte (`first_byte_ms` added).
21+- **Not tried by hand yet**: ask the user to run `rzb tui` against a real model (F1, type, Esc mid-answer, Ctrl-P, Ctrl-R with a reasoning model, `/set thinking off`; F2, `u`).
22+- Next: #57 (Models screen: HF cache read directly, pull with progress, remove), #58 (Settings: TUI preferences incl. poll interval and default sampling, server config form + reload), #59 (TUI docs: tutorial + how-to EN+FR), then #26/#28 for the Dashboard's machine panel. #61 (Olala spike) is separate, no milestone.
23+- Watch out: a key the frame ignores goes to the current screen only (`TUIApp.forward`); Models and Settings ignore keys for now. `ChatScreen.answering` is the index the stream writes to.
@@ -15,3 +15,9 @@
15 - `ServerClient.localHTTP` is a process-wide HTTPClient never shut down (fine for a CLI; do not create one per request).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.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).17 - The `/rzb` loopback check accepts anything relayed by a local proxy (the sandbox's sbx proxy included).
18+
19+## Update (same day): #56 and #55 done
20+- Dashboard (select, `u` unload, request columns, memory gauge) and Chat (stream, Esc/Ctrl-C stop, Ctrl-N, Ctrl-P picker, Ctrl-R reasoning, `/set`) are in; #55 closed, #56 open only for task 3 (pressure/GPU, needs #26/#28). Linux 300 / Mac 326, gate PASS run #38. The server now records streamed requests' tokens and writes the history after the last byte (`first_byte_ms` added).
21+- **Not tried by hand yet**: ask the user to run `rzb tui` against a real model (F1, type, Esc mid-answer, Ctrl-P, Ctrl-R with a reasoning model, `/set thinking off`; F2, `u`).
22+- Next: #57 (Models screen: HF cache read directly, pull with progress, remove), #58 (Settings: TUI preferences incl. poll interval and default sampling, server config form + reload), #59 (TUI docs: tutorial + how-to EN+FR), then #26/#28 for the Dashboard's machine panel. #61 (Olala spike) is separate, no milestone.
23+- Watch out: a key the frame ignores goes to the current screen only (`TUIApp.forward`); Models and Settings ignore keys for now. `ChatScreen.answering` is the index the stream writes to.
modified .memory/history.md +11 -0
@@ -505,3 +505,14 @@ open, a comment on each. main fast-forwarded.
505505 - **Quality**: gate PASS run #37 (0/0/0, complexity 588 → 717 with the new module).
506506 - **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).
507507 - **Tickets**: #54 closed (tasks 1–4, comment 1). main fast-forwarded.
508+
509+## 2026-11-27 — #56 Dashboard and #55 Chat in rzb tui; ticket #61
510+
511+- **Goal**: user "tu fais les deux sans t'arrêter" (#56 then #55, no checkpoints). Mid-way the user asked for a ticket on https://huggingface.co/OVHaiLLM/Olala-v1.0-mini-7A1B-MLX (needs OVHai's mlx-engine fork).
512+- **Changes**: server — streamed chat/completions record their tokens; the request history is written after the last byte (`duration_ms` to the end, new `first_byte_ms`) — without this, streamed requests (the TUI chat) had no tokens in `/rzb/status`. TUI — `DashboardScreen`, `ChatScreen`, `ChatRenderer`, `ChatOptions`, `TUIServer` protocol, `TUIApp` key routing and actions, `ListView.select`, `ConnectionView` in its own file (DashboardView removed). Commits d628c4a (code), 4ae74ac (docs + quality run #38).
513+- **Decisions (mine)**: no unload confirmation (the server refuses busy models with 409, message shown); `/set` for per-session sampling until #58's preferences; stopped answers keep their partial text and are resent; Ctrl-C stops a generation before quitting; default chat model = first loaded chat model, else first chat model of `/v1/models`; tok/s on the Dashboard = completion tokens / whole duration (prompt included), in the Chat = from first piece to last.
514+- **Traps**: a notice appended while streaming made `receive`/`stop` miss the answer entry → keep the answer's index; tuples in an `Equatable` struct; exclusivity error when a mutating closure reads `self.usage`; Mac-only tests (`RazorbillMLXTests`) call `ChatCompletionRoute.chunks` and broke on the new `usage:` parameter — only seen on the Mac build; the history is now written just after the last byte, so tests that read it right after a request must wait (`statusAfter`).
515+- **Tests**: Linux 277 → 300, Mac 326 (host-runner), compat Linux 59/20. The new screens were not tried by hand in a real terminal yet.
516+- **Quality**: gate PASS run #38 (0/0/0, complexity 815).
517+- **Docs**: EN+FR CLI reference (Dashboard and Chat keys, `/set` commands, Ctrl-C), HTTP reference (`first_byte_ms`, `duration_ms` to the last byte), how-to (unload from the TUI).
518+- **Tickets**: #55 closed; #56 tasks 1–2 closed, task 3 (memory pressure / GPU panel) open, waiting for #26/#28; #61 created (spike: olala architecture — hybrid Mamba-3/attention MoE 256×6, custom Metal MoE kernel, fp32 Mamba state, weights in sub-folders, channel chat template; a Swift port on mlx-swift-lm, feasibility depends on the fork's code). main fast-forwarded.
@@ -505,3 +505,14 @@ open, a comment on each. main fast-forwarded.
505 - **Quality**: gate PASS run #37 (0/0/0, complexity 588 → 717 with the new module).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).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.507 - **Tickets**: #54 closed (tasks 1–4, comment 1). main fast-forwarded.
508+
509+## 2026-11-27 — #56 Dashboard and #55 Chat in rzb tui; ticket #61
510+
511+- **Goal**: user "tu fais les deux sans t'arrêter" (#56 then #55, no checkpoints). Mid-way the user asked for a ticket on https://huggingface.co/OVHaiLLM/Olala-v1.0-mini-7A1B-MLX (needs OVHai's mlx-engine fork).
512+- **Changes**: server — streamed chat/completions record their tokens; the request history is written after the last byte (`duration_ms` to the end, new `first_byte_ms`) — without this, streamed requests (the TUI chat) had no tokens in `/rzb/status`. TUI — `DashboardScreen`, `ChatScreen`, `ChatRenderer`, `ChatOptions`, `TUIServer` protocol, `TUIApp` key routing and actions, `ListView.select`, `ConnectionView` in its own file (DashboardView removed). Commits d628c4a (code), 4ae74ac (docs + quality run #38).
513+- **Decisions (mine)**: no unload confirmation (the server refuses busy models with 409, message shown); `/set` for per-session sampling until #58's preferences; stopped answers keep their partial text and are resent; Ctrl-C stops a generation before quitting; default chat model = first loaded chat model, else first chat model of `/v1/models`; tok/s on the Dashboard = completion tokens / whole duration (prompt included), in the Chat = from first piece to last.
514+- **Traps**: a notice appended while streaming made `receive`/`stop` miss the answer entry → keep the answer's index; tuples in an `Equatable` struct; exclusivity error when a mutating closure reads `self.usage`; Mac-only tests (`RazorbillMLXTests`) call `ChatCompletionRoute.chunks` and broke on the new `usage:` parameter — only seen on the Mac build; the history is now written just after the last byte, so tests that read it right after a request must wait (`statusAfter`).
515+- **Tests**: Linux 277 → 300, Mac 326 (host-runner), compat Linux 59/20. The new screens were not tried by hand in a real terminal yet.
516+- **Quality**: gate PASS run #38 (0/0/0, complexity 815).
517+- **Docs**: EN+FR CLI reference (Dashboard and Chat keys, `/set` commands, Ctrl-C), HTTP reference (`first_byte_ms`, `duration_ms` to the last byte), how-to (unload from the TUI).
518+- **Tickets**: #55 closed; #56 tasks 1–2 closed, task 3 (memory pressure / GPU panel) open, waiting for #26/#28; #61 created (spike: olala architecture — hybrid Mamba-3/attention MoE 256×6, custom Metal MoE kernel, fp32 Mamba state, weights in sub-folders, channel chat template; a Swift port on mlx-swift-lm, feasibility depends on the fork's code). main fast-forwarded.
modified .memory/summary.md +15 -2
@@ -146,6 +146,16 @@ timeout); `TUIApp` actor polls a `StatusSource` every second, draws `DashboardVi
146146 `ConnectionView` (not running → the `rzb serve [--config]` command), placeholders for #55/#57/#58.
147147 `rzb tui [--url] [--config] [--api-key-env]` (`TUICommand`; `CLIEnvironment.hasTerminal` / `tui`
148148 runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
149+Dashboard (#56) and Chat (#55): `TUIApp` talks to a `TUIServer` (status, models, unload, chat;
150+`ServerClient` conforms; tests use `ScriptedServer`), routes keys the frame does not use to the
151+current screen and runs their actions. `DashboardScreen` (ListView of models, `u` → unload, the
152+server's 409 message as `notice`; request columns incl. tok/s; memory gauge). `ChatScreen` (pure
153+state: entries, `TextField` input, model + picker, `answering` index so notices added during a
154+stream do not break it, `ChatOptions` set by `/set`, reasoning shown/folded/hidden) +
155+`ChatRenderer`; Esc or Ctrl-C (while generating) cancel the stream task. Server side for this:
156+streamed chat/completions record their tokens in `RequestUsage` at the end, and
157+`RequestLogMiddleware` writes the history once the body is written (`ResponseBody.afterWriting`):
158+`duration_ms` = to the last byte, `first_byte_ms` = to the head; the log line stays at the head.
149159
150160 ## Decisions in force
151161
@@ -165,7 +175,10 @@ runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
165175 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,
166176 port, api_key_env, cors_origin → `restart_required`); invalid file → 400, old config kept.
167177 #54 (user, 2026-11-26): AsyncHTTPClient for the TUI, F1–F4 + Ctrl-T for screens, a minimal
168- Dashboard before #56.
178+ Dashboard before #56. #55/#56 done without checkpoints at the user's request (2026-11-27); my
179+ choices there: no unload confirmation (the server refuses busy models), sampling per session via
180+ `/set`, partial answers stopped by Esc stay in the conversation, Ctrl-C stops a generation before
181+ it quits.
169182 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).
170183 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.
171184 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:
@@ -269,7 +282,7 @@ Linux 34 pass / 21 skip (Mac compat not re-run after #44). After #48 (prompt cac
269282 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat
270283 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on
271284 macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run). After #54:
272-Linux 277, Mac 303.
285+Linux 277, Mac 303. After #55/#56: Linux 300, Mac 326, compat on Linux 59 pass / 20 skip.
273286
274287 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,
275288 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions
@@ -146,6 +146,16 @@ timeout); `TUIApp` actor polls a `StatusSource` every second, draws `DashboardVi
146 `ConnectionView` (not running → the `rzb serve [--config]` command), placeholders for #55/#57/#58.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`147 `rzb tui [--url] [--config] [--api-key-env]` (`TUICommand`; `CLIEnvironment.hasTerminal` / `tui`
148 runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).148 runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
149+Dashboard (#56) and Chat (#55): `TUIApp` talks to a `TUIServer` (status, models, unload, chat;
150+`ServerClient` conforms; tests use `ScriptedServer`), routes keys the frame does not use to the
151+current screen and runs their actions. `DashboardScreen` (ListView of models, `u` → unload, the
152+server's 409 message as `notice`; request columns incl. tok/s; memory gauge). `ChatScreen` (pure
153+state: entries, `TextField` input, model + picker, `answering` index so notices added during a
154+stream do not break it, `ChatOptions` set by `/set`, reasoning shown/folded/hidden) +
155+`ChatRenderer`; Esc or Ctrl-C (while generating) cancel the stream task. Server side for this:
156+streamed chat/completions record their tokens in `RequestUsage` at the end, and
157+`RequestLogMiddleware` writes the history once the body is written (`ResponseBody.afterWriting`):
158+`duration_ms` = to the last byte, `first_byte_ms` = to the head; the log line stays at the head.
149 159
150 ## Decisions in force160 ## Decisions in force
151 161
@@ -165,7 +175,10 @@ runner replaceable in tests; `TUILaunch.run(colors:)` is the real launch).
165 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,175 refused with 409 (no waiting, no cancelling); a reload applies everything but the network (host,
166 port, api_key_env, cors_origin → `restart_required`); invalid file → 400, old config kept.176 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 minimal177 #54 (user, 2026-11-26): AsyncHTTPClient for the TUI, F1–F4 + Ctrl-T for screens, a minimal
168- Dashboard before #56.178+ Dashboard before #56. #55/#56 done without checkpoints at the user's request (2026-11-27); my
179+ choices there: no unload confirmation (the server refuses busy models), sampling per session via
180+ `/set`, partial answers stopped by Esc stay in the conversation, Ctrl-C stops a generation before
181+ it quits.
169 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).182 - Default port 7920 (user, 2026-11-26; was 8080, taken by llama-server / mlx_lm.server / Open WebUI).
170 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.183 `/`, `/v1`, `/v1/` answer the usual 404 `unknown_url` plus a hint that `/v1` is the base URL.
171 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:184 - Work stays local: no push to `origin` until the user says so. `origin` is `ssh://git@rickub.com/bots-garden/razorbill.git`:
@@ -269,7 +282,7 @@ Linux 34 pass / 21 skip (Mac compat not re-run after #44). After #48 (prompt cac
269 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat282 compat on Linux 48 pass / 20 skip. After #49: Linux 172, Mac 198, compat Linux 51 / 20 (Mac compat
270 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on283 not re-run since #44). After #53: Linux 217, Mac 243 (host-runner; `sighupReloadsTheFile` runs on
271 macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run). After #54:284 macOS only), compat on Linux `-k docs_curl` 22 pass (whole compat suite not re-run). After #54:
272-Linux 277, Mac 303.285+Linux 277, Mac 303. After #55/#56: Linux 300, Mac 326, compat on Linux 59 pass / 20 skip.
273 286
274 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,287 Sampling (#49, user's rule: only what mlx-swift-lm implements): temperature, top_p, max_tokens,
275 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions288 stop, seed, presence/frequency_penalty (mlx window: last 20 tokens incl. prompt), plus extensions
modified .tickets/issues/0055-tui-chat-screen.yaml +24 -6
@@ -1,12 +1,13 @@
11 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
22 id: 55
33 title: "TUI chat screen"
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-27T05:30:00.000Z
10+closedAt: 2026-11-27T05:30:00.000Z
1011 labels:
1112 - "kind::feature"
1213 - "area::tui"
@@ -28,26 +29,43 @@ body: |
2829 tasks:
2930 - id: 1
3031 title: "Streaming chat with cancel, model picker, new conversation"
31- state: open
32+ state: closed
3233 priority: high
3334 author:
3435 name: k33g
3536 email: ph.charriere@gmail.com
3637 createdAt: 2026-11-26T08:00:00.000Z
38+ updatedAt: 2026-11-27T05:30:00.000Z
39+ closedAt: 2026-11-27T05:30:00.000Z
3740 - id: 2
3841 title: "Reasoning display and stats line"
39- state: open
42+ state: closed
4043 priority: medium
4144 author:
4245 name: k33g
4346 email: ph.charriere@gmail.com
4447 createdAt: 2026-11-26T08:00:00.000Z
48+ updatedAt: 2026-11-27T05:30:00.000Z
49+ closedAt: 2026-11-27T05:30:00.000Z
4550 - id: 3
4651 title: "Per-session sampling settings"
47- state: open
52+ state: closed
4853 priority: medium
4954 author:
5055 name: k33g
5156 email: ph.charriere@gmail.com
5257 createdAt: 2026-11-26T08:00:00.000Z
53-comments: []
58+ updatedAt: 2026-11-27T05:30:00.000Z
59+ closedAt: 2026-11-27T05:30:00.000Z
60+comments:
61+ - id: 1
62+ author:
63+ name: k33g
64+ email: ph.charriere@gmail.com
65+ createdAt: 2026-11-27T05:30:00.000Z
66+ body: |
67+ Done on branch feature/v0.3-tui (d628c4a, docs 4ae74ac), without checkpoints at the user's request ("tu fais les deux sans t'arrêter").
68+ - ChatScreen + ChatRenderer: the conversation is kept client side and resent whole; answers stream in; Esc (or Ctrl-C while generating) stops the answer, the partial text stays and is resent; Ctrl-N new conversation; Ctrl-P model picker from /v1/models (default: the first loaded chat model, else the first chat model); Ctrl-R reasoning folded / hidden / shown; PgUp/PgDn scroll.
69+ - Stats after each answer: prompt+completion tokens, cached prompt tokens (usage.prompt_tokens_details), tok/s from the first piece to the last (client side).
70+ - Per-session sampling (task 3): /set temperature|top_p|top_k|min_p|max_tokens|thinking <value>, /set <name> back to the server's value, /set lists them; thinking goes as chat_template_kwargs.enable_thinking. Defaults from the TUI preferences come with #58.
71+ - Tests: ChatScreen / ChatRenderer / ChatOptions units, TUIApp with a scripted server (stream, Esc and Ctrl-C stop with the server-side stream cancelled), live test against a real server (declared model, "echo: ping" and its stats). Linux 300, Mac 326. Not yet tried by hand in a real terminal.
@@ -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: 552 id: 55
3 title: "TUI chat screen"3 title: "TUI chat screen"
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-27T05:30:00.000Z
10+closedAt: 2026-11-27T05:30:00.000Z
10 labels:11 labels:
11 - "kind::feature"12 - "kind::feature"
12 - "area::tui"13 - "area::tui"
@@ -28,26 +29,43 @@ body: |
28 tasks:29 tasks:
29 - id: 130 - id: 1
30 title: "Streaming chat with cancel, model picker, new conversation"31 title: "Streaming chat with cancel, model picker, new conversation"
31- state: open32+ state: closed
32 priority: high33 priority: high
33 author:34 author:
34 name: k33g35 name: k33g
35 email: ph.charriere@gmail.com36 email: ph.charriere@gmail.com
36 createdAt: 2026-11-26T08:00:00.000Z37 createdAt: 2026-11-26T08:00:00.000Z
38+ updatedAt: 2026-11-27T05:30:00.000Z
39+ closedAt: 2026-11-27T05:30:00.000Z
37 - id: 240 - id: 2
38 title: "Reasoning display and stats line"41 title: "Reasoning display and stats line"
39- state: open42+ state: closed
40 priority: medium43 priority: medium
41 author:44 author:
42 name: k33g45 name: k33g
43 email: ph.charriere@gmail.com46 email: ph.charriere@gmail.com
44 createdAt: 2026-11-26T08:00:00.000Z47 createdAt: 2026-11-26T08:00:00.000Z
48+ updatedAt: 2026-11-27T05:30:00.000Z
49+ closedAt: 2026-11-27T05:30:00.000Z
45 - id: 350 - id: 3
46 title: "Per-session sampling settings"51 title: "Per-session sampling settings"
47- state: open52+ state: closed
48 priority: medium53 priority: medium
49 author:54 author:
50 name: k33g55 name: k33g
51 email: ph.charriere@gmail.com56 email: ph.charriere@gmail.com
52 createdAt: 2026-11-26T08:00:00.000Z57 createdAt: 2026-11-26T08:00:00.000Z
53-comments: []58+ updatedAt: 2026-11-27T05:30:00.000Z
59+ closedAt: 2026-11-27T05:30:00.000Z
60+comments:
61+ - id: 1
62+ author:
63+ name: k33g
64+ email: ph.charriere@gmail.com
65+ createdAt: 2026-11-27T05:30:00.000Z
66+ body: |
67+ Done on branch feature/v0.3-tui (d628c4a, docs 4ae74ac), without checkpoints at the user's request ("tu fais les deux sans t'arrêter").
68+ - ChatScreen + ChatRenderer: the conversation is kept client side and resent whole; answers stream in; Esc (or Ctrl-C while generating) stops the answer, the partial text stays and is resent; Ctrl-N new conversation; Ctrl-P model picker from /v1/models (default: the first loaded chat model, else the first chat model); Ctrl-R reasoning folded / hidden / shown; PgUp/PgDn scroll.
69+ - Stats after each answer: prompt+completion tokens, cached prompt tokens (usage.prompt_tokens_details), tok/s from the first piece to the last (client side).
70+ - Per-session sampling (task 3): /set temperature|top_p|top_k|min_p|max_tokens|thinking <value>, /set <name> back to the server's value, /set lists them; thinking goes as chat_template_kwargs.enable_thinking. Defaults from the TUI preferences come with #58.
71+ - Tests: ChatScreen / ChatRenderer / ChatOptions units, TUIApp with a scripted server (stream, Esc and Ctrl-C stop with the server-side stream cancelled), live test against a real server (declared model, "echo: ping" and its stats). Linux 300, Mac 326. Not yet tried by hand in a real terminal.
modified .tickets/issues/0056-tui-dashboard-screen.yaml +19 -4
@@ -6,7 +6,7 @@ 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-27T05:30:00.000Z
1010 labels:
1111 - "kind::feature"
1212 - "area::tui"
@@ -27,20 +27,24 @@ body: |
2727 tasks:
2828 - id: 1
2929 title: "Loaded models and unload key"
30- state: open
30+ state: closed
3131 priority: high
3232 author:
3333 name: k33g
3434 email: ph.charriere@gmail.com
3535 createdAt: 2026-11-26T08:00:00.000Z
36+ updatedAt: 2026-11-27T05:30:00.000Z
37+ closedAt: 2026-11-27T05:30:00.000Z
3638 - id: 2
3739 title: "Recent requests"
38- state: open
40+ state: closed
3941 priority: medium
4042 author:
4143 name: k33g
4244 email: ph.charriere@gmail.com
4345 createdAt: 2026-11-26T08:00:00.000Z
46+ updatedAt: 2026-11-27T05:30:00.000Z
47+ closedAt: 2026-11-27T05:30:00.000Z
4448 - id: 3
4549 title: "Memory and GPU panel (#26, #28)"
4650 state: open
@@ -49,4 +53,15 @@ tasks:
4953 name: k33g
5054 email: ph.charriere@gmail.com
5155 createdAt: 2026-11-26T08:00:00.000Z
52-comments: []
56+comments:
57+ - id: 1
58+ author:
59+ name: k33g
60+ email: ph.charriere@gmail.com
61+ createdAt: 2026-11-27T05:30:00.000Z
62+ body: |
63+ Tasks 1-2 done on branch feature/v0.3-tui (d628c4a, docs 4ae74ac).
64+ - Models: a list with a selection (arrows, PgUp/PgDn, Home/End); u unloads the selected model. The server refuses while requests hold the model (#53 decision, 409), so there is no confirmation: the server's message is shown under the requests instead.
65+ - Recent requests: age, method and path, status, model, tokens, cached tokens, tok/s, duration. For this the server now records streamed answers' tokens and writes the history once the last byte is sent (duration_ms = to the last byte, new first_byte_ms); tok/s = completion tokens over duration_ms, prompt processing included.
66+ - Memory: a gauge of MLX active / limit, cache and peak.
67+ - Task 3 stays open: memory pressure (#26) and GPU load (#28) have no source yet; the panel waits for those tickets.
@@ -6,7 +6,7 @@ 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-27T05:30:00.000Z
10 labels:10 labels:
11 - "kind::feature"11 - "kind::feature"
12 - "area::tui"12 - "area::tui"
@@ -27,20 +27,24 @@ body: |
27 tasks:27 tasks:
28 - id: 128 - id: 1
29 title: "Loaded models and unload key"29 title: "Loaded models and unload key"
30- state: open30+ state: closed
31 priority: high31 priority: high
32 author:32 author:
33 name: k33g33 name: k33g
34 email: ph.charriere@gmail.com34 email: ph.charriere@gmail.com
35 createdAt: 2026-11-26T08:00:00.000Z35 createdAt: 2026-11-26T08:00:00.000Z
36+ updatedAt: 2026-11-27T05:30:00.000Z
37+ closedAt: 2026-11-27T05:30:00.000Z
36 - id: 238 - id: 2
37 title: "Recent requests"39 title: "Recent requests"
38- state: open40+ state: closed
39 priority: medium41 priority: medium
40 author:42 author:
41 name: k33g43 name: k33g
42 email: ph.charriere@gmail.com44 email: ph.charriere@gmail.com
43 createdAt: 2026-11-26T08:00:00.000Z45 createdAt: 2026-11-26T08:00:00.000Z
46+ updatedAt: 2026-11-27T05:30:00.000Z
47+ closedAt: 2026-11-27T05:30:00.000Z
44 - id: 348 - id: 3
45 title: "Memory and GPU panel (#26, #28)"49 title: "Memory and GPU panel (#26, #28)"
46 state: open50 state: open
@@ -49,4 +53,15 @@ tasks:
49 name: k33g53 name: k33g
50 email: ph.charriere@gmail.com54 email: ph.charriere@gmail.com
51 createdAt: 2026-11-26T08:00:00.000Z55 createdAt: 2026-11-26T08:00:00.000Z
52-comments: []56+comments:
57+ - id: 1
58+ author:
59+ name: k33g
60+ email: ph.charriere@gmail.com
61+ createdAt: 2026-11-27T05:30:00.000Z
62+ body: |
63+ Tasks 1-2 done on branch feature/v0.3-tui (d628c4a, docs 4ae74ac).
64+ - Models: a list with a selection (arrows, PgUp/PgDn, Home/End); u unloads the selected model. The server refuses while requests hold the model (#53 decision, 409), so there is no confirmation: the server's message is shown under the requests instead.
65+ - Recent requests: age, method and path, status, model, tokens, cached tokens, tok/s, duration. For this the server now records streamed answers' tokens and writes the history once the last byte is sent (duration_ms = to the last byte, new first_byte_ms); tok/s = completion tokens over duration_ms, prompt processing included.
66+ - Memory: a gauge of MLX active / limit, cache and peak.
67+ - Task 3 stays open: memory pressure (#26) and GPU load (#28) have no source yet; the panel waits for those tickets.