@yahyahammad/venastine 0.2.0 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.env.example +9 -4
  2. package/CONFIG_ARCHITECTURE.md +2030 -0
  3. package/LICENSE +201 -201
  4. package/NOTICE +1 -1
  5. package/README.md +1034 -895
  6. package/agents/builtin/build.md +73 -0
  7. package/agents/builtin/compactor.md +75 -75
  8. package/agents/builtin/explore.md +77 -77
  9. package/agents/builtin/general.md +80 -0
  10. package/agents/builtin/pipeline-reviewer.md +100 -100
  11. package/agents/builtin/plan.md +106 -88
  12. package/agents/builtin/review.md +74 -74
  13. package/agents/builtin/test.md +65 -0
  14. package/agents/builtin/writer.md +67 -0
  15. package/agents/manager.py +68 -2
  16. package/agents/subagent_tool.py +472 -238
  17. package/agents/tui_commands.py +238 -151
  18. package/bin/venastine.mjs +150 -4
  19. package/bin/venastine.py +71 -0
  20. package/cli_commands.py +838 -0
  21. package/config.py +95 -1198
  22. package/config.yaml +1103 -0
  23. package/config_edit.py +1301 -0
  24. package/config_schema.py +971 -0
  25. package/config_update.py +749 -0
  26. package/core/agent_activity.py +256 -118
  27. package/core/ansi.py +452 -0
  28. package/core/approval.py +137 -115
  29. package/core/call_view.py +364 -0
  30. package/core/cancel.py +121 -0
  31. package/core/chatgpt_auth.py +747 -0
  32. package/core/claims_view.py +107 -0
  33. package/core/client.py +2715 -1559
  34. package/core/commands.py +460 -0
  35. package/core/compaction.py +1735 -971
  36. package/core/config_loader.py +1982 -1563
  37. package/core/connect.py +686 -0
  38. package/core/events.py +123 -61
  39. package/core/file_mentions.py +280 -0
  40. package/core/interaction.py +411 -328
  41. package/core/line_pattern.py +128 -0
  42. package/core/loop.py +2566 -1490
  43. package/core/memory.py +482 -370
  44. package/core/pipeline_models.py +190 -176
  45. package/core/provider_errors.py +234 -0
  46. package/core/reasoning/authorization.py +130 -130
  47. package/core/reasoning/base.py +219 -219
  48. package/core/reasoning/confidence_scoring.py +484 -468
  49. package/core/reasoning/events.py +149 -149
  50. package/core/reasoning/json_retry.py +19 -1
  51. package/core/reasoning/orchestrator.py +1561 -1382
  52. package/core/reasoning/output_writer.py +345 -286
  53. package/core/reasoning/payload_validation.py +524 -398
  54. package/core/reasoning/pipeline_storage.py +88 -22
  55. package/core/reasoning/review.py +659 -615
  56. package/core/reasoning/scholar.py +458 -434
  57. package/core/reasoning/source_corpus.py +433 -327
  58. package/core/reasoning/source_scoring.py +855 -855
  59. package/core/replay.py +315 -183
  60. package/core/session.py +36 -12
  61. package/core/session_view.py +259 -0
  62. package/core/session_wake.py +259 -0
  63. package/core/shell_sessions.py +1553 -0
  64. package/core/workspace_trust.py +1 -1
  65. package/credentials.py +148 -20
  66. package/database.py +333 -252
  67. package/{PRIVACY.md → docs/PRIVACY.md} +78 -66
  68. package/docs/SECURITY.md +108 -0
  69. package/docs/THIRD_PARTY_NOTICES.md +148 -0
  70. package/env_secrets.py +50 -9
  71. package/json_store.py +343 -123
  72. package/logging_setup.py +295 -185
  73. package/main.py +3433 -1961
  74. package/mcp_client/client.py +733 -499
  75. package/mcp_client/config.py +126 -21
  76. package/mcp_client/registration.py +343 -182
  77. package/memories/manager.py +147 -132
  78. package/memories/tui_commands.py +319 -244
  79. package/package.json +303 -73
  80. package/project_init/config_files.py +282 -278
  81. package/project_init/generator.py +728 -564
  82. package/project_init/manifest.py +18 -6
  83. package/project_init/tui_commands.py +147 -144
  84. package/prompts/critic_pass.md +24 -24
  85. package/prompts/revalidate.md +25 -25
  86. package/prompts/revise.md +2 -0
  87. package/prompts/source_grounding.md +66 -66
  88. package/prompts/system_prompts.py +316 -262
  89. package/providers.json.example +4 -2
  90. package/pyproject.toml +149 -100
  91. package/requirements.txt +295 -72
  92. package/safety/policy_enforcement.py +1082 -746
  93. package/security/askpass.py +419 -0
  94. package/security/capability.py +207 -177
  95. package/security/confine.py +484 -0
  96. package/security/hosted.py +182 -0
  97. package/security/permissions.py +237 -190
  98. package/security/posture.py +124 -12
  99. package/security/protected_paths.py +501 -309
  100. package/security/sandbox.py +4108 -985
  101. package/security/secrets.py +855 -0
  102. package/skills/builtin/math/formal-specification.md +67 -67
  103. package/skills/builtin/math/numerical-methods.md +66 -66
  104. package/skills/builtin/research/experiment-design.md +62 -62
  105. package/skills/builtin/research/reproducibility.md +55 -55
  106. package/skills/builtin/research/source-evaluation.md +70 -70
  107. package/skills/builtin/research/statistical-inference.md +63 -63
  108. package/skills/builtin/research/technical-writing.md +59 -59
  109. package/skills/builtin/software/code-review.md +61 -61
  110. package/skills/builtin/software/debugging.md +61 -61
  111. package/skills/builtin/software/test-design.md +67 -67
  112. package/skills/tui_commands.py +110 -111
  113. package/storage.py +1338 -1005
  114. package/tools/base.py +161 -1
  115. package/tools/builtin/_math_common.py +667 -377
  116. package/tools/builtin/_net_common.py +225 -19
  117. package/tools/builtin/arxiv.py +497 -39
  118. package/tools/builtin/ask_user.py +231 -213
  119. package/tools/builtin/discrete_math.py +35 -4
  120. package/tools/builtin/fetch_url.py +371 -153
  121. package/tools/builtin/file_ops.py +720 -412
  122. package/tools/builtin/geometry.py +48 -12
  123. package/tools/builtin/get_time.py +2 -2
  124. package/tools/builtin/linear_algebra.py +66 -23
  125. package/tools/builtin/load_skill.py +76 -66
  126. package/tools/builtin/logic.py +171 -12
  127. package/tools/builtin/pin.py +227 -193
  128. package/tools/builtin/probability_stats.py +12 -16
  129. package/tools/builtin/project_docs.py +464 -405
  130. package/tools/builtin/remember.py +175 -158
  131. package/tools/builtin/shell.py +980 -461
  132. package/tools/builtin/shell_sessions.py +613 -0
  133. package/tools/builtin/symbolic_math.py +80 -10
  134. package/tools/builtin/todo.py +149 -147
  135. package/tools/builtin/web_search.py +191 -13
  136. package/tools/context.py +159 -136
  137. package/tools/isolation.py +107 -34
  138. package/tools/registry.py +1242 -925
  139. package/tui/app.py +8318 -4100
  140. package/tui/app.tcss +747 -556
  141. package/tui/commands.py +26 -170
  142. package/tui/diffs.py +34 -13
  143. package/tui/history.py +128 -128
  144. package/tui/hosted_driver.py +102 -0
  145. package/tui/markdown.py +1329 -1279
  146. package/tui/meters.py +364 -268
  147. package/tui/ravens.py +146 -146
  148. package/tui/screens.py +1255 -943
  149. package/tui/themes.py +599 -559
  150. package/tui/widgets.py +3813 -2332
  151. package/SECURITY.md +0 -88
  152. package/THIRD_PARTY_NOTICES.md +0 -100
package/tui/app.tcss CHANGED
@@ -1,556 +1,747 @@
1
- /* ROADMAP_v2 §16. Colours come from the active theme's variables rather
2
- than literals, so all eight themes restyle this without edits. */
3
-
4
- #main {
5
- width: 1fr;
6
- }
7
-
8
- /* IT SCROLLS, because a Vertical does not (batch 59). Textual's Vertical
9
- is `overflow: hidden hidden`, so the sidebar silently dropped whatever
10
- did not fit. Measured at the 24-row floor with a todo list and a
11
- research run both live: `max_scroll_y` was 11 -- eleven rows the
12
- container had already computed and clipped anyway -- #todo-panel lost
13
- three rows and #research-progress was ENTIRELY off screen, its header
14
- drawn on the last visible row with its whole body gone.
15
-
16
- `overflow-y` on the CONTAINER, not a swap to VerticalScroll. That class
17
- is `can_focus=True` and binds up/down/home/end/pageup/pagedown, which
18
- would add a tab stop and take the arrows batch 55 gave the suggestion
19
- panel. The trade, named rather than discovered later: this scrolls by
20
- wheel and not by keyboard. EP3's sibling rule (a consent surface must
21
- not be mouse-only) does not reach here -- no decision is made in the
22
- sidebar, and every figure in it is also said in the transcript.
23
-
24
- `scrollbar-size-vertical: 1` because the budget is tiny. Measured: 19
25
- usable columns when everything fits, 18 while the bar is up, against 17
26
- at textual's default 2. The width is CONDITIONAL either way -- widgets
27
- reflow by a column when the bar appears. */
28
- #sidebar {
29
- width: 22;
30
- border-left: solid $panel;
31
- padding: 1;
32
- overflow-y: auto;
33
- scrollbar-size-vertical: 1;
34
- }
35
-
36
- #transcript {
37
- height: 1fr;
38
- border: solid $panel;
39
- padding: 0 1;
40
- }
41
-
42
- /* Batch 55, the slash-command suggestions. Directly above the prompt
43
- because it is the last child in #main's flow and #prompt is docked out
44
- of that flow -- so it opens UPWARDS with no layer and no offset.
45
-
46
- `height: auto` with a `max-height` again, and the cap is arithmetic:
47
- SUGGEST_MAX_ROWS is 8, plus two border rows is 10, which at the 24-row
48
- floor leaves the transcript nine rows while the panel is up. The widget
49
- budgets itself to those 8 rows, so the cap is a backstop rather than a
50
- clip -- if it ever clips, the budget is wrong.
51
-
52
- No `overflow-y`. A panel that scrolled would be a second thing to
53
- navigate inside a thing being navigated. */
54
- #slash-suggest {
55
- height: auto;
56
- max-height: 10;
57
- border: solid $primary;
58
- padding: 0 1;
59
- /* The count, `4 of 26 - /help for all`. Muted for #prompt's reason:
60
- it is a hint about the list, not a heading over it. */
61
- border-title-color: $text-muted;
62
- /* Batch 62's key hints, on the bottom border. STATED, and measured
63
- rather than assumed: an unstyled subtitle renders in $primary --
64
- the border's own green -- so without this the hint would be
65
- brighter than the count above it on the same box, and the less
66
- important of the two labels would be the louder one. No
67
- `border-subtitle-align`: textual already defaults a subtitle to
68
- the right, which is the corner #prompt's meter uses one box
69
- down, so titles sit left and status sits right throughout. */
70
- border-subtitle-color: $text-muted;
71
- }
72
-
73
- /* Batch 54. `height: auto` with a `max-height` -- batch 49's shape, for
74
- batch 49's reason. A definite height would reserve four rows whether or
75
- not anything is typed, and this box's whole point is that it is one row
76
- until it isn't; auto also means the transcript gets those rows back the
77
- moment a turn is submitted. The cap is what stops a pasted essay from
78
- eating the transcript: 6 is the border plus four text rows, so a fully
79
- extended prompt still leaves 18 of the 24-row floor above it, and past
80
- four rows the box scrolls instead of growing.
81
-
82
- `padding: 0 1` is stated rather than inherited. TextArea's own default
83
- is `0 1` and the Input this replaced was `0 2`; naming it is what keeps
84
- the typed text's left edge where a reader already has it. */
85
- #prompt {
86
- dock: bottom;
87
- border: solid $primary;
88
- height: auto;
89
- max-height: 6;
90
- padding: 0 1;
91
- /* The placeholder, which a TextArea has no other way to carry. Muted
92
- is already this sheet's vocabulary for a hint (#usage-line,
93
- #todo-panel, #research-progress), so it reads as one rather than
94
- as a heading. */
95
- border-title-color: $text-muted;
96
- }
97
-
98
- #raven {
99
- height: 5;
100
- color: $accent;
101
- content-align: center middle;
102
- }
103
-
104
- /* §40. Hidden unless a shipped protection is off; auto height so it
105
- costs nothing in the shipped posture. $error because the one thing it
106
- must not read as is decoration. */
107
- #posture-badge {
108
- height: auto;
109
- color: $error;
110
- text-style: bold;
111
- padding: 1 0 0 0;
112
- }
113
-
114
- /* Batch 59's agent stack. Auto height and hidden until there is an active
115
- agent or a running spawn, so it costs no rows in the ordinary case --
116
- the same shape #posture-badge and #usage-line already use. No colours
117
- here: the panel renders through Rich styles resolved per draw
118
- (role_styles), which is what makes /theme reach it. */
119
- #agent-panel {
120
- height: auto;
121
- padding-top: 1;
122
- }
123
-
124
- #effort-raven {
125
- height: 2;
126
- color: $secondary;
127
- content-align: center middle;
128
- }
129
-
130
- /* #4 session usage line. Auto height and hidden until the first turn
131
- gives it figures, like the research panel above. */
132
- #usage-line {
133
- height: auto;
134
- padding-top: 1;
135
- color: $text-muted;
136
- }
137
-
138
- /* §22 live research view. Auto height so it takes no sidebar space until
139
- a run starts.
140
-
141
- THE CAP AND THE OVERFLOW ARE GONE (batch 59), and they were EP3's trap
142
- a second time. `Static` + `max-height` + `overflow-y: auto` reads as
143
- "clip it and let them scroll" and does neither: a Static's
144
- `virtual_size` follows its clamped box rather than its text, so
145
- `max_scroll_y` was 0 and the rows past the bound were not below the
146
- fold, they were gone. Measured here at one lost row with twenty passes
147
- and twelve claims; measured in tui/screens.py at nine lines in a
148
- seven-row block, which is the ScrollBox that fixed it there.
149
-
150
- The fix is the same shape: the bound belongs on a real scroll
151
- container, and #sidebar is now one. What still bounds this panel is
152
- ResearchProgress.ROWS -- a window over the passes, which is the half of
153
- that comment that was always true. */
154
- #research-progress {
155
- height: auto;
156
- padding-top: 1;
157
- color: $text-muted;
158
- }
159
-
160
- PermissionScreen {
161
- align: center middle;
162
- }
163
-
164
- /* Every modal screen gets one of these (#112). Nothing checked that a
165
- screen had both a type selector and an id block for its dialog, and
166
- five of nine never got the first -- they measured at x=0, y=0, pinned
167
- to the top-left corner of an 80x24 terminal. The viewport test in
168
- tests/test_tui.py pushes all nine and would catch a tenth. */
169
-
170
- GrantPickerScreen {
171
- align: center middle;
172
- }
173
-
174
- SubagentSignoffScreen {
175
- align: center middle;
176
- }
177
-
178
- ConfirmScreen {
179
- align: center middle;
180
- }
181
-
182
- ProjectKindScreen {
183
- align: center middle;
184
- }
185
-
186
- ReviewScreen {
187
- align: center middle;
188
- }
189
-
190
- #permission-dialog {
191
- /* A VERTICAL, not a grid (batch 49). §46 left this a two-column grid
192
- in which every child carried `column-span: 2`, so the second column
193
- held nothing but the Deny button -- and `grid-size` being static is
194
- the only reason the `with-headline` class existed, to tell the
195
- stylesheet whether the screen had composed three children or four.
196
- A Vertical does not need telling, so the template somebody had to
197
- keep in sync is gone rather than commented.
198
- The `1fr` row EP1 removed is still not to come back: a fractional
199
- row inside a `height: auto` container resolves to ZERO, and it is
200
- what made the payload absent from every permission modal this app
201
- had ever shown. What bounds a long payload is `max-height` on the
202
- ScrollBox -- see #permission-params-box for why not a definite
203
- `height`, which is what EP1 shipped and what took the buttons. */
204
- padding: 1 2;
205
- /* 90% with a cap, not a fixed 60 (§46, EP1). Width is what decides
206
- how many rows the notice and the reason cost, and those rows are
207
- what the command and the payload have to share -- at 60 the
208
- notice alone wrapped to three. Same shape as #claims-dialog and
209
- for the same reason (#112): align cannot centre something wider
210
- than an 80-column terminal, so the cap has to stay under it. */
211
- width: 90%;
212
- max-width: 96;
213
- height: auto;
214
- /* 22, which is what the deleted `.with-headline` block used: the
215
- four rows the pinned command takes are the reason that block
216
- existed, and with one template the taller shape sets the cap.
217
- Still inside the 24-row floor #112 pins, and `height: auto` means
218
- a short approval is nowhere near it -- `web_search` measures 14. */
219
- max-height: 22;
220
- border: thick $warning;
221
- background: $surface;
222
- }
223
-
224
- /* The blank row between blocks was `grid-gutter: 1 2` and a Vertical
225
- has no gutter, so it is a margin now. It is not decoration: §46 pinned
226
- the command OUTSIDE the payload precisely so the two read as separate
227
- claims about the call, and flush against each other they do not. */
228
- #permission-title {
229
- text-style: bold;
230
- margin-bottom: 1;
231
- }
232
-
233
- /* The pinned subject of the question (§46, EP1), and the split
234
- favours it deliberately: the payload below repeats the notice, the
235
- reason and the command itself, so rows spent here buy the one thing
236
- nothing else on the screen shows in full. Four is what a wrapped
237
- `docker run ... bash -c "..."` needs at this width, measured; past
238
- that it scrolls rather than growing, so a pathological command
239
- cannot eat the modal. Deliberately not $text-muted -- this is the
240
- one thing on the screen the reader must actually read. */
241
- #permission-command-box {
242
- height: auto;
243
- max-height: 4;
244
- margin-bottom: 1;
245
- }
246
-
247
- #permission-command {
248
- text-style: bold;
249
- }
250
-
251
- /* `auto` WITH a `max-height`, not a definite height (batch 49,
252
- amending EP3). EP3 got the Static half right -- a Static given
253
- `max-height` reports no content past the bound, so its hidden rows
254
- are gone rather than below the fold -- and the ScrollBox half wrong.
255
- A scrollable container asked for `height: auto` does NOT resolve to
256
- zero; EP1's `1fr` ROW did, and the box was measured inside one. With
257
- the row `auto`, a DEFINITE height bounds what the box draws and not
258
- what its parent reserves, so the row kept growing with the payload
259
- and pushed the decision bar past the dialog's own `max-height`, where
260
- it was clipped away -- on nine of fourteen modal shapes, `shell`'s
261
- among them. `auto` with a `max-height` reports the bound upward, and
262
- still shrinks to a two-line payload, which a definite height never
263
- did. Do not "restore" one:
264
- test_a_bounded_box_reserves_its_bound_not_its_content fails. */
265
- /* 7 rows, and NO margin below it -- the arithmetic is the point.
266
- A dialog capped at 22 has 18 rows inside it, and the title, its
267
- margin, the pinned command, its margin and the decision bar claim 11
268
- of them whether or not the payload wants more. Leaving the last
269
- blank row off buys the slack a title that wraps to two lines needs,
270
- which is the one length here that nothing bounds.
271
- Everything past row 7 is scrollable, and on the shell modal every
272
- line of it also appears above. */
273
- #permission-params-box {
274
- height: auto;
275
- max-height: 7;
276
- }
277
-
278
- #permission-params {
279
- height: auto;
280
- color: $text-muted;
281
- }
282
-
283
- /* THE DECISION BAR (batch 49). One rule for every consent surface,
284
- because the defect it answers was one defect on nine of them: the
285
- buttons were the LAST children of a dialog whose body could outgrow
286
- it, so they were what fell off. In a bar they are one child, and the
287
- bounded bodies above keep the sum inside the dialog.
288
- Centred rather than stretched: the dialog was always centred and its
289
- contents were not -- Allow sat flush against the left padding and a
290
- 16-wide Deny left ~22 dead columns beside it. Filling the columns
291
- instead would have made the permissive answer a target half the width
292
- of the modal. `height: auto` so a bar costs exactly its buttons. */
293
- #permission-buttons,
294
- #grant-buttons,
295
- #review-buttons,
296
- #question-buttons {
297
- height: auto;
298
- align: center middle;
299
- }
300
-
301
- #permission-buttons Button,
302
- #grant-buttons Button,
303
- #review-buttons Button,
304
- #question-buttons Button {
305
- margin: 0 1;
306
- }
307
-
308
- /* FOCUS WITHOUT `reverse` (batch 49). Textual's Button carries
309
- `text-style: $button-focus-text-style` when focused and this theme
310
- resolves that to `reverse`, which inverts the LABEL and nothing else
311
- -- so a focused green Allow drew its word as green on white and read
312
- as a highlighted selection rather than as the keyboard's position.
313
- Bold plus a lifted background tints the whole button instead, which
314
- is what a person actually looks for, and it composes with all
315
- fourteen palettes because both values come from the theme rather than
316
- from a literal (#116). */
317
- Button:focus {
318
- text-style: bold;
319
- background-tint: $foreground 25%;
320
- }
321
-
322
- /* The answer box lines up with the options above it (batch 49).
323
- Textual's Input takes a `tall` border on all four sides and a Button
324
- takes one on the top and bottom only, so at the same `x` the Input's
325
- left edge is drawn a column in from the option buttons' -- close
326
- enough to look like a mistake and far enough to see. Dropping the two
327
- side edges gives both widgets the same box, rather than giving the
328
- buttons a border they do not want. */
329
- #question-text,
330
- #review-note {
331
- border-left: none;
332
- border-right: none;
333
- }
334
-
335
- ThreadPickerScreen {
336
- align: center middle;
337
- }
338
-
339
- /* §26 claims view. Wider than the other dialogs because claim text is
340
- prose rather than a label, and primary-bordered rather than
341
- warning-bordered: this one only reads, it authorises nothing. */
342
- ClaimsScreen {
343
- align: center middle;
344
- }
345
-
346
- #claims-dialog {
347
- /* 90% with a cap, not a fixed width (#112): at 96 the dialog was
348
- wider than an 80-column terminal, and align: center middle cannot
349
- centre something wider than its container -- the right ~16
350
- columns, tail of every score: line included, sat off-screen. */
351
- width: 90%;
352
- max-width: 96;
353
- height: auto;
354
- max-height: 22;
355
- padding: 1 2;
356
- border: thick $primary;
357
- background: $surface;
358
- }
359
-
360
- #claims-title {
361
- text-style: bold;
362
- padding-bottom: 1;
363
- }
364
-
365
- /* The Static keeps the colour and the box keeps the bound (batch 49);
366
- `max-height` on the Static itself was EP3's truncation-without-scroll,
367
- on the one screen that exists to show every claim. */
368
- #claims-body-box {
369
- height: auto;
370
- max-height: 14;
371
- }
372
-
373
- /* §25 research grant picker. Warning-bordered like the permission modal
374
- rather than primary-bordered like the thread picker: both are
375
- authorization decisions, and looking like the neutral list-of-threads
376
- dialog would undersell what confirming here does. */
377
- #grant-dialog {
378
- width: 76;
379
- height: auto;
380
- max-height: 22;
381
- padding: 1 2;
382
- border: thick $warning;
383
- background: $surface;
384
- }
385
-
386
- #grant-title {
387
- text-style: bold;
388
- }
389
-
390
- #grant-help {
391
- padding-bottom: 1;
392
- color: $text-muted;
393
- }
394
-
395
- /* 8, not 14 (batch 49). A dialog has 18 rows inside it on the 24-row
396
- floor, and the title, the two-sentence help, the bar and this list
397
- have to share them -- at 14 the confirm button was off the bottom
398
- with twenty tools offered. */
399
- #grant-list {
400
- height: auto;
401
- max-height: 8;
402
- margin-bottom: 1;
403
- }
404
-
405
- #thread-dialog {
406
- width: 70;
407
- height: auto;
408
- max-height: 24;
409
- padding: 1 2;
410
- border: thick $primary;
411
- background: $surface;
412
- }
413
-
414
- #thread-title {
415
- text-style: bold;
416
- padding-bottom: 1;
417
- }
418
-
419
- #thread-list {
420
- height: auto;
421
- max-height: 18;
422
- }
423
-
424
- /* §23 slice 2's question modal. Borrows the grant dialog's proportions --
425
- both are "read this, then choose" rather than "allow or deny" -- but
426
- takes the primary border rather than the warning one: this authorises
427
- nothing, it answers something. */
428
- QuestionScreen {
429
- align: center middle;
430
- }
431
-
432
- #question-dialog {
433
- width: 66;
434
- height: auto;
435
- /* The body is the MODEL's question -- the one length the app does
436
- not choose (#112). Without a max-height a long question pushed the
437
- dialog to 45 rows on a 24-row terminal, title off the top and the
438
- defer button off the bottom. */
439
- max-height: 22;
440
- padding: 1 2;
441
- border: thick $primary;
442
- background: $surface;
443
- }
444
-
445
- #question-title {
446
- text-style: bold;
447
- width: 100%;
448
- }
449
-
450
- #question-body-box {
451
- height: auto;
452
- max-height: 4;
453
- padding: 1 0;
454
- width: 100%;
455
- }
456
-
457
- #question-body {
458
- height: auto;
459
- width: 100%;
460
- }
461
-
462
- /* The single-select options. Bounded like the SelectionList the
463
- multi-select branch uses, and for the same reason -- four options of
464
- two lines each is 16 rows, and the dialog has 18. */
465
- #question-options {
466
- height: auto;
467
- max-height: 6;
468
- width: 100%;
469
- margin-bottom: 1;
470
- }
471
-
472
- /* FIXED WIDTH, and it is what stops the truncation (batch 49). At
473
- Button's default `width: auto` an option is as wide as its label
474
- unwrapped -- measured at 119 columns inside a 60-column dialog, so a
475
- long option was CUT at the dialog edge, and three options of
476
- different lengths gave three different right edges. At `width: 100%`
477
- the same label WRAPS to two centred lines and every option is the
478
- same size. Nothing is truncated anywhere: ask_user refuses an option
479
- too long to render rather than shortening it. */
480
- #question-options Button {
481
- width: 100%;
482
- }
483
-
484
- #question-help {
485
- color: $text-muted;
486
- padding-bottom: 1;
487
- width: 100%;
488
- }
489
-
490
- #question-list {
491
- height: auto;
492
- max-height: 6;
493
- margin-bottom: 1;
494
- }
495
-
496
- /* The sign-off's list is capped like the grant list it is modelled on:
497
- its length is the subagent's gated tool set, and uncapped it pushed
498
- the decision buttons off-screen (#112). Capped at 14 it still did --
499
- #112 bounded the list and nothing bounded the SUM, which is the
500
- defect batch 49 answers. */
501
- #signoff-list {
502
- height: auto;
503
- max-height: 8;
504
- margin-bottom: 1;
505
- }
506
-
507
- /* §20's review consent surface (#112). It had NO rules at all -- full
508
- screen, top-left, unbordered -- and its body carries reason and
509
- proposed straight from the reviewer model, so an uncapped body pushed
510
- the four decision buttons below the fold. Warning-bordered like
511
- permission/grant rather than primary like claims/question: this one
512
- AUTHORISES AN EDIT to a finished research run. */
513
- #review-dialog {
514
- width: 76;
515
- height: auto;
516
- max-height: 22;
517
- padding: 1 2;
518
- border: thick $warning;
519
- background: $surface;
520
- }
521
-
522
- #review-title {
523
- text-style: bold;
524
- }
525
-
526
- #review-body-box {
527
- height: auto;
528
- max-height: 8;
529
- }
530
-
531
- #review-body {
532
- height: auto;
533
- }
534
-
535
- /* §38's collapsed thinking line. `height: auto` and hidden until a span
536
- starts, so it costs no rows when tui.show_thinking is on -- the same
537
- arrangement the checklist below uses for its unfilled slots. */
538
- #thinking-indicator {
539
- height: auto;
540
- padding: 0 1;
541
- }
542
-
543
- /* §23 slice 2's checklist. `height: auto` so an empty list costs no rows in
544
- whichever slot tui.todo_position put it in -- the widget hides itself, and
545
- this is what makes the unused slots free.
546
-
547
- No `max-height`, no `overflow-y`: see #research-progress for why that
548
- pairing on a Static clips rather than scrolls (batch 59, EP3's trap).
549
- TodoPanel.ROWS is the bound. This panel also sits in the `top` and
550
- `bottom` slots inside #main, where nothing scrolls at all -- one more
551
- reason its own height must be honest rather than clamped. */
552
- #todo-panel {
553
- height: auto;
554
- padding: 0 1;
555
- color: $text-muted;
556
- }
1
+ /* ROADMAP_v2 §16. Colours come from the active theme's variables rather
2
+ than literals, so all eight themes restyle this without edits. */
3
+
4
+ #main {
5
+ width: 1fr;
6
+ }
7
+
8
+ /* IT SCROLLS, because a Vertical does not (batch 59). Textual's Vertical
9
+ is `overflow: hidden hidden`, so the sidebar silently dropped whatever
10
+ did not fit. Measured at the 24-row floor with a todo list and a
11
+ research run both live: `max_scroll_y` was 11 -- eleven rows the
12
+ container had already computed and clipped anyway -- #todo-panel lost
13
+ three rows and #research-progress was ENTIRELY off screen, its header
14
+ drawn on the last visible row with its whole body gone.
15
+
16
+ `overflow-y` on the CONTAINER, not a swap to VerticalScroll. That class
17
+ is `can_focus=True` and binds up/down/home/end/pageup/pagedown, which
18
+ would add a tab stop and take the arrows batch 55 gave the suggestion
19
+ panel. The trade, named rather than discovered later: this scrolls by
20
+ wheel and not by keyboard. EP3's sibling rule (a consent surface must
21
+ not be mouse-only) does not reach here -- no decision is made in the
22
+ sidebar, and every figure in it is also said in the transcript.
23
+
24
+ `scrollbar-size-vertical: 1` because the budget is tiny. Measured: 19
25
+ usable columns when everything fits, 18 while the bar is up, against 17
26
+ at textual's default 2. The width is CONDITIONAL either way -- widgets
27
+ reflow by a column when the bar appears. */
28
+ #sidebar {
29
+ width: 22;
30
+ border-left: solid $panel;
31
+ padding: 1;
32
+ overflow-y: auto;
33
+ scrollbar-size-vertical: 1;
34
+ }
35
+
36
+ /* Section 47. The switcher holding the live transcript and the read-only
37
+ view. Both children stay mounted; only `current` changes -- which is what
38
+ lets a running turn keep writing to the live pane while a stored thread is
39
+ on screen, with nothing to buffer and nothing to flush on the way back. */
40
+ #pane {
41
+ height: 1fr;
42
+ }
43
+
44
+ #transcript {
45
+ height: 1fr;
46
+ border: solid $panel;
47
+ padding: 0 1;
48
+ }
49
+
50
+ /* The accent border is the whole affordance: at a glance this is not the
51
+ conversation you are having. The prompt is disabled underneath it, so the
52
+ read-only rule is visible rather than merely true. */
53
+ #thread-view {
54
+ height: 1fr;
55
+ border: solid $accent;
56
+ padding: 0 1;
57
+ }
58
+
59
+ /* The lineage trail. `height: auto` and hidden until the viewer opens, so
60
+ the live conversation costs no row for a trail it does not need -- the
61
+ GoalBanner rule, which every conditional row in #main follows. */
62
+ /* ROADMAP_v3 §49 (SS14). THE SAME BOX as #transcript and #thread-view --
63
+ `border: solid` and `padding: 0 1` -- and that is load-bearing rather
64
+ than tidy: a hidden pane measures 0 and borrows the on-screen pane's
65
+ width (Transcript._region_width), so four panes that are not the same
66
+ box would each write at another one's width. The accent border is
67
+ #thread-view's affordance, for #thread-view's reason: at a glance this
68
+ is not the conversation you are having. */
69
+ #session-view {
70
+ height: 1fr;
71
+ border: solid $accent;
72
+ padding: 0 1;
73
+ }
74
+
75
+ /* ROADMAP_v3 §55 (TR10). One tool call: the whole command and what it
76
+ printed. The FOURTH pane, and the same box for the paragraph above --
77
+ `test_the_panes_measure_the_same_width_when_shown` holds that, and a
78
+ different gutter here would silently rewrap every row the live
79
+ transcript wrote while this one was up. Accent border, same reason:
80
+ this is not the conversation you are having. */
81
+ #call-view {
82
+ height: 1fr;
83
+ border: solid $accent;
84
+ padding: 0 1;
85
+ }
86
+
87
+ #thread-crumb {
88
+ height: auto;
89
+ padding: 0 1;
90
+ /* One line, elided rather than wrapped: a trail that reflowed
91
+ would take a second row from the transcript below it. The
92
+ ellipsis is the point -- the segment you are standing on is
93
+ the last one, so the cut belongs at the far end. Moved off
94
+ the Rich Text for `#agent-panel`'s reason. */
95
+ text-wrap: nowrap;
96
+ text-overflow: ellipsis;
97
+ }
98
+
99
+ /* Batch 55, the slash-command suggestions. Directly above the prompt
100
+ because it is the last child in #main's flow and #prompt is docked out
101
+ of that flow -- so it opens UPWARDS with no layer and no offset.
102
+
103
+ `height: auto` with a `max-height` again, and the cap is arithmetic:
104
+ SUGGEST_MAX_ROWS is 8, plus two border rows is 10, which at the 24-row
105
+ floor leaves the transcript nine rows while the panel is up. The widget
106
+ budgets itself to those 8 rows, so the cap is a backstop rather than a
107
+ clip -- if it ever clips, the budget is wrong.
108
+
109
+ No `overflow-y`. A panel that scrolled would be a second thing to
110
+ navigate inside a thing being navigated. */
111
+ #slash-suggest {
112
+ height: auto;
113
+ max-height: 10;
114
+ border: solid $primary;
115
+ padding: 0 1;
116
+ /* The count, `4 of 26 - /help for all`. Muted for #prompt's reason:
117
+ it is a hint about the list, not a heading over it. */
118
+ border-title-color: $text-muted;
119
+ /* Batch 62's key hints, on the bottom border. STATED, and measured
120
+ rather than assumed: an unstyled subtitle renders in $primary --
121
+ the border's own green -- so without this the hint would be
122
+ brighter than the count above it on the same box, and the less
123
+ important of the two labels would be the louder one. No
124
+ `border-subtitle-align`: textual already defaults a subtitle to
125
+ the right, which is the corner #prompt's meter uses one box
126
+ down, so titles sit left and status sits right throughout. */
127
+ border-subtitle-color: $text-muted;
128
+ /* `render()` pads every row to the panel width itself, and the
129
+ pin on that arithmetic is a test that no drawn row is wider
130
+ than the panel. This is the net under it, moved off the Rich
131
+ Text for `#agent-panel`'s reason: a row that ever does
132
+ overrun clips visibly instead of reflowing into a height the
133
+ budget did not count. */
134
+ text-wrap: nowrap;
135
+ text-overflow: clip;
136
+ }
137
+
138
+ /* Batch 54. `height: auto` with a `max-height` -- batch 49's shape, for
139
+ batch 49's reason. A definite height would reserve four rows whether or
140
+ not anything is typed, and this box's whole point is that it is one row
141
+ until it isn't; auto also means the transcript gets those rows back the
142
+ moment a turn is submitted. The cap is what stops a pasted essay from
143
+ eating the transcript: 6 is the border plus four text rows, so a fully
144
+ extended prompt still leaves 18 of the 24-row floor above it, and past
145
+ four rows the box scrolls instead of growing.
146
+
147
+ `padding: 0 1` is stated rather than inherited. TextArea's own default
148
+ is `0 1` and the Input this replaced was `0 2`; naming it is what keeps
149
+ the typed text's left edge where a reader already has it. */
150
+ #prompt {
151
+ dock: bottom;
152
+ border: solid $primary;
153
+ height: auto;
154
+ max-height: 6;
155
+ padding: 0 1;
156
+ /* The placeholder, carried by the border title rather than TextArea's
157
+ native in-box one (assigning both drew it twice). Muted
158
+ is already this sheet's vocabulary for a hint (#usage-line,
159
+ #todo-panel, #research-progress), so it reads as one rather than
160
+ as a heading. */
161
+ border-title-color: $text-muted;
162
+ }
163
+
164
+ #raven {
165
+ height: 5;
166
+ color: $accent;
167
+ content-align: center middle;
168
+ }
169
+
170
+ /* §40. Hidden unless a shipped protection is off; auto height so it
171
+ costs nothing in the shipped posture. $error because the one thing it
172
+ must not read as is decoration. */
173
+ #posture-badge {
174
+ height: auto;
175
+ color: $error;
176
+ text-style: bold;
177
+ padding: 1 0 0 0;
178
+ }
179
+
180
+ /* Batch 59's agent stack. Auto height and hidden until there is an active
181
+ agent or a running spawn, so it costs no rows in the ordinary case --
182
+ the same shape #posture-badge and #usage-line already use. No colours
183
+ here: the panel renders through Rich styles resolved per draw
184
+ (role_styles), which is what makes /theme reach it. */
185
+ #agent-panel {
186
+ height: auto;
187
+ padding-top: 1;
188
+ /* The rows are sized by the widget (AgentPanel.WIDTH lays out
189
+ against 18) and must not be re-wrapped underneath it: a
190
+ miscalculation should clip where it can be seen rather than
191
+ reflow where it cannot. This used to be `no_wrap` /
192
+ `overflow` on the Rich Text itself, which stopped meaning
193
+ anything when the textual pin moved -- a Content carries
194
+ neither flag and the conversion drops both. See
195
+ `widgets.as_content`. */
196
+ text-wrap: nowrap;
197
+ text-overflow: clip;
198
+ }
199
+
200
+ /* ROADMAP_v3 §49 (SS14). The same box as #agent-panel above, because it is
201
+ the same kind of widget in the same twenty columns: rows sized by the
202
+ widget (SessionPanel.WIDTH, which is AgentPanel.WIDTH) and clipped rather
203
+ than reflowed, for that block's reason. */
204
+ #session-panel {
205
+ height: auto;
206
+ padding-top: 1;
207
+ text-wrap: nowrap;
208
+ text-overflow: clip;
209
+ }
210
+
211
+ #effort-raven {
212
+ height: 2;
213
+ color: $secondary;
214
+ content-align: center middle;
215
+ }
216
+
217
+ /* #4 session usage line. Auto height and hidden until the first turn
218
+ gives it figures, like the research panel above. */
219
+ #usage-line {
220
+ height: auto;
221
+ padding-top: 1;
222
+ color: $text-muted;
223
+ }
224
+
225
+ /* §22 live research view. Auto height so it takes no sidebar space until
226
+ a run starts.
227
+
228
+ THE CAP AND THE OVERFLOW ARE GONE (batch 59), and they were EP3's trap
229
+ a second time. `Static` + `max-height` + `overflow-y: auto` reads as
230
+ "clip it and let them scroll" and does neither: a Static's
231
+ `virtual_size` follows its clamped box rather than its text, so
232
+ `max_scroll_y` was 0 and the rows past the bound were not below the
233
+ fold, they were gone. Measured here at one lost row with twenty passes
234
+ and twelve claims; measured in tui/screens.py at nine lines in a
235
+ seven-row block, which is the ScrollBox that fixed it there.
236
+
237
+ The fix is the same shape: the bound belongs on a real scroll
238
+ container, and #sidebar is now one. What still bounds this panel is
239
+ ResearchProgress.ROWS -- a window over the passes, which is the half of
240
+ that comment that was always true. */
241
+ #research-progress {
242
+ height: auto;
243
+ padding-top: 1;
244
+ color: $text-muted;
245
+ }
246
+
247
+ PermissionScreen {
248
+ align: center middle;
249
+ }
250
+
251
+ /* Every modal screen gets one of these (#112). Nothing checked that a
252
+ screen had both a type selector and an id block for its dialog, and
253
+ five of nine never got the first -- they measured at x=0, y=0, pinned
254
+ to the top-left corner of an 80x24 terminal. The viewport test in
255
+ tests/test_tui.py pushes every modal the app defines; until batch 179
256
+ it pushed only the ones its table listed, and SecretScreen, which came
257
+ later and missed both the row and this rule, opened every masked
258
+ prompt in the corner. */
259
+
260
+ GrantPickerScreen {
261
+ align: center middle;
262
+ }
263
+
264
+ SecretScreen {
265
+ align: center middle;
266
+ }
267
+
268
+ NoticeScreen {
269
+ align: center middle;
270
+ }
271
+
272
+ SubagentSignoffScreen {
273
+ align: center middle;
274
+ }
275
+
276
+ MemoryPickerScreen {
277
+ align: center middle;
278
+ }
279
+
280
+ ConfirmScreen {
281
+ align: center middle;
282
+ }
283
+
284
+ ProjectKindScreen {
285
+ align: center middle;
286
+ }
287
+
288
+ ReviewScreen {
289
+ align: center middle;
290
+ }
291
+
292
+ #permission-dialog {
293
+ /* A VERTICAL, not a grid (batch 49). §46 left this a two-column grid
294
+ in which every child carried `column-span: 2`, so the second column
295
+ held nothing but the Deny button -- and `grid-size` being static is
296
+ the only reason the `with-headline` class existed, to tell the
297
+ stylesheet whether the screen had composed three children or four.
298
+ A Vertical does not need telling, so the template somebody had to
299
+ keep in sync is gone rather than commented.
300
+ The `1fr` row EP1 removed is still not to come back: a fractional
301
+ row inside a `height: auto` container resolves to ZERO, and it is
302
+ what made the payload absent from every permission modal this app
303
+ had ever shown. What bounds a long payload is `max-height` on the
304
+ ScrollBox -- see #permission-params-box for why not a definite
305
+ `height`, which is what EP1 shipped and what took the buttons. */
306
+ padding: 1 2;
307
+ /* 90% with a cap, not a fixed 60 (§46, EP1). Width is what decides
308
+ how many rows the notice and the reason cost, and those rows are
309
+ what the command and the payload have to share -- at 60 the
310
+ notice alone wrapped to three. Same shape as #claims-dialog and
311
+ for the same reason (#112): align cannot centre something wider
312
+ than an 80-column terminal, so the cap has to stay under it. */
313
+ width: 90%;
314
+ max-width: 96;
315
+ height: auto;
316
+ /* 22, which is what the deleted `.with-headline` block used: the
317
+ four rows the pinned command takes are the reason that block
318
+ existed, and with one template the taller shape sets the cap.
319
+ Still inside the 24-row floor #112 pins, and `height: auto` means
320
+ a short approval is nowhere near it -- `web_search` measures 14. */
321
+ max-height: 22;
322
+ border: thick $warning;
323
+ background: $surface;
324
+ }
325
+
326
+ /* The blank row between blocks was `grid-gutter: 1 2` and a Vertical
327
+ has no gutter, so it is a margin now. It is not decoration: §46 pinned
328
+ the command OUTSIDE the payload precisely so the two read as separate
329
+ claims about the call, and flush against each other they do not. */
330
+ #permission-title {
331
+ text-style: bold;
332
+ margin-bottom: 1;
333
+ }
334
+
335
+ /* Section 47. Which run raised the question, when it was not the
336
+ conversation itself. Muted and unbold: it qualifies the title rather
337
+ than competing with it, and it sits directly under it because RA6
338
+ reads a harness fact before anything the agent wrote.
339
+
340
+ It eats the title's margin, so the pair reads as one heading rather
341
+ than as two blocks -- which is what the margin exists to separate.
342
+
343
+ ONE ID ACROSS THE THREE MODALS that can be asked from inside a run
344
+ (batch 75: the sign-off and the model's own question joined the
345
+ permission prompt). Ids are per-screen, so one rule styles all three
346
+ and there is nothing to keep in step -- the same reason
347
+ `screens.asker_label` is one function. */
348
+ #permission-asker {
349
+ color: $text-muted;
350
+ margin-top: -1;
351
+ margin-bottom: 1;
352
+ }
353
+
354
+ /* The pinned subject of the question (§46, EP1), and the split
355
+ favours it deliberately: the payload below repeats the notice, the
356
+ reason and the command itself, so rows spent here buy the one thing
357
+ nothing else on the screen shows in full. Four is what a wrapped
358
+ `docker run ... bash -c "..."` needs at this width, measured; past
359
+ that it scrolls rather than growing, so a pathological command
360
+ cannot eat the modal. Deliberately not $text-muted -- this is the
361
+ one thing on the screen the reader must actually read. */
362
+ #permission-command-box {
363
+ height: auto;
364
+ max-height: 4;
365
+ margin-bottom: 1;
366
+ }
367
+
368
+ #permission-command {
369
+ text-style: bold;
370
+ }
371
+
372
+ /* `auto` WITH a `max-height`, not a definite height (batch 49,
373
+ amending EP3). EP3 got the Static half right -- a Static given
374
+ `max-height` reports no content past the bound, so its hidden rows
375
+ are gone rather than below the fold -- and the ScrollBox half wrong.
376
+ A scrollable container asked for `height: auto` does NOT resolve to
377
+ zero; EP1's `1fr` ROW did, and the box was measured inside one. With
378
+ the row `auto`, a DEFINITE height bounds what the box draws and not
379
+ what its parent reserves, so the row kept growing with the payload
380
+ and pushed the decision bar past the dialog's own `max-height`, where
381
+ it was clipped away -- on nine of fourteen modal shapes, `shell`'s
382
+ among them. `auto` with a `max-height` reports the bound upward, and
383
+ still shrinks to a two-line payload, which a definite height never
384
+ did. Do not "restore" one:
385
+ test_a_bounded_box_reserves_its_bound_not_its_content fails. */
386
+ /* 7 rows, and NO margin below it -- the arithmetic is the point.
387
+ A dialog capped at 22 has 18 rows inside it, and the title, its
388
+ margin, the pinned command, its margin and the decision bar claim 11
389
+ of them whether or not the payload wants more. Leaving the last
390
+ blank row off buys the slack a title that wraps to two lines needs,
391
+ which is the one length here that nothing bounds.
392
+ Everything past row 7 is scrollable, and on the shell modal every
393
+ line of it also appears above. */
394
+ #permission-params-box {
395
+ height: auto;
396
+ max-height: 7;
397
+ }
398
+
399
+ #permission-params {
400
+ height: auto;
401
+ color: $text-muted;
402
+ }
403
+
404
+ /* THE DECISION BAR (batch 49). One rule for every consent surface,
405
+ because the defect it answers was one defect on nine of them: the
406
+ buttons were the LAST children of a dialog whose body could outgrow
407
+ it, so they were what fell off. In a bar they are one child, and the
408
+ bounded bodies above keep the sum inside the dialog.
409
+ Centred rather than stretched: the dialog was always centred and its
410
+ contents were not -- Allow sat flush against the left padding and a
411
+ 16-wide Deny left ~22 dead columns beside it. Filling the columns
412
+ instead would have made the permissive answer a target half the width
413
+ of the modal. `height: auto` so a bar costs exactly its buttons. */
414
+ #permission-buttons,
415
+ #grant-buttons,
416
+ #review-buttons,
417
+ #question-buttons {
418
+ height: auto;
419
+ align: center middle;
420
+ }
421
+
422
+ #permission-buttons Button,
423
+ #grant-buttons Button,
424
+ #review-buttons Button,
425
+ #question-buttons Button {
426
+ margin: 0 1;
427
+ }
428
+
429
+ /* FOCUS WITHOUT `reverse` (batch 49). Textual's Button carries
430
+ `text-style: $button-focus-text-style` when focused and this theme
431
+ resolves that to `reverse`, which inverts the LABEL and nothing else
432
+ -- so a focused green Allow drew its word as green on white and read
433
+ as a highlighted selection rather than as the keyboard's position.
434
+ Bold plus a lifted background tints the whole button instead, which
435
+ is what a person actually looks for, and it composes with all
436
+ fourteen palettes because both values come from the theme rather than
437
+ from a literal (#116). */
438
+ Button:focus {
439
+ text-style: bold;
440
+ background-tint: $foreground 25%;
441
+ }
442
+
443
+ /* The answer box lines up with the options above it (batch 49).
444
+ Textual's Input takes a `tall` border on all four sides and a Button
445
+ takes one on the top and bottom only, so at the same `x` the Input's
446
+ left edge is drawn a column in from the option buttons' -- close
447
+ enough to look like a mistake and far enough to see. Dropping the two
448
+ side edges gives both widgets the same box, rather than giving the
449
+ buttons a border they do not want. */
450
+ #question-text,
451
+ #review-note {
452
+ border-left: none;
453
+ border-right: none;
454
+ }
455
+
456
+ ThreadPickerScreen {
457
+ align: center middle;
458
+ }
459
+
460
+ /* §26 claims view. Wider than the other dialogs because claim text is
461
+ prose rather than a label, and primary-bordered rather than
462
+ warning-bordered: this one only reads, it authorises nothing. */
463
+ ClaimsScreen {
464
+ align: center middle;
465
+ }
466
+
467
+ #claims-dialog {
468
+ /* 90% with a cap, not a fixed width (#112): at 96 the dialog was
469
+ wider than an 80-column terminal, and align: center middle cannot
470
+ centre something wider than its container -- the right ~16
471
+ columns, tail of every score: line included, sat off-screen. */
472
+ width: 90%;
473
+ max-width: 96;
474
+ height: auto;
475
+ max-height: 22;
476
+ padding: 1 2;
477
+ border: thick $primary;
478
+ background: $surface;
479
+ }
480
+
481
+ #claims-title {
482
+ text-style: bold;
483
+ padding-bottom: 1;
484
+ }
485
+
486
+ /* The Static keeps the colour and the box keeps the bound (batch 49);
487
+ `max-height` on the Static itself was EP3's truncation-without-scroll,
488
+ on the one screen that exists to show every claim. */
489
+ #claims-body-box {
490
+ height: auto;
491
+ max-height: 14;
492
+ }
493
+
494
+ /* §25 research grant picker. Warning-bordered like the permission modal
495
+ rather than primary-bordered like the thread picker: both are
496
+ authorization decisions, and looking like the neutral list-of-threads
497
+ dialog would undersell what confirming here does. */
498
+ #grant-dialog {
499
+ width: 76;
500
+ height: auto;
501
+ max-height: 22;
502
+ padding: 1 2;
503
+ border: thick $warning;
504
+ background: $surface;
505
+ }
506
+
507
+ #grant-title {
508
+ text-style: bold;
509
+ }
510
+
511
+ #grant-help {
512
+ padding-bottom: 1;
513
+ color: $text-muted;
514
+ }
515
+
516
+ /* 8, not 14 (batch 49). A dialog has 18 rows inside it on the 24-row
517
+ floor, and the title, the two-sentence help, the bar and this list
518
+ have to share them -- at 14 the confirm button was off the bottom
519
+ with twenty tools offered. */
520
+ /* ROADMAP_v3 §59's memory picker shares the grant list's 8, for the same
521
+ 18 rows: a longer list scrolls inside the dialog instead of pushing
522
+ Forget and Cancel off the bottom. */
523
+ #grant-list,
524
+ #forget-list {
525
+ height: auto;
526
+ max-height: 8;
527
+ margin-bottom: 1;
528
+ }
529
+
530
+ /* Section 47's run picker, the keyboard route to what the sidebar
531
+ offers on a click. Narrower than the thread picker because its rows
532
+ are agent names and an indent rather than a uuid plus a preview,
533
+ and it takes the accent border the read-only pane takes: both say
534
+ the same thing, that what you are about to look at is not the
535
+ conversation you are having. */
536
+ #agent-picker-dialog {
537
+ width: 48;
538
+ height: auto;
539
+ max-height: 20;
540
+ padding: 1 2;
541
+ border: thick $accent;
542
+ background: $surface;
543
+ }
544
+
545
+ #agent-picker-title {
546
+ text-style: bold;
547
+ padding-bottom: 1;
548
+ }
549
+
550
+ #agent-picker-list {
551
+ height: auto;
552
+ max-height: 14;
553
+ }
554
+
555
+ /* Finished runs read muted. They open like any other row, so this is
556
+ de-emphasis rather than a warning -- and a muted hue rather than the
557
+ `dim` attribute, which is the transcript's vocabulary (test_themes
558
+ pins it to the system role) while this list is a modal, where
559
+ UNVERIFIED_COVERAGE already set the precedent that quiet names a
560
+ different state rather than a broken one. */
561
+ #agent-picker-list .finished {
562
+ color: $text-muted;
563
+ }
564
+
565
+ AgentPickerScreen {
566
+ align: center middle;
567
+ }
568
+
569
+ /* ROADMAP_v3 §49 (SS2): the kill picker. Wider than the run picker
570
+ because its rows carry a command as well as a name, and a command cut
571
+ at 48 columns is exactly the "which one is this?" the picker exists to
572
+ answer. */
573
+ #session-kill-dialog {
574
+ width: 72;
575
+ height: auto;
576
+ max-height: 20;
577
+ padding: 1 2;
578
+ border: thick $accent;
579
+ background: $surface;
580
+ }
581
+
582
+ #session-kill-title {
583
+ text-style: bold;
584
+ padding-bottom: 1;
585
+ }
586
+
587
+ #session-kill-list {
588
+ height: auto;
589
+ max-height: 14;
590
+ }
591
+
592
+ SessionKillScreen {
593
+ align: center middle;
594
+ }
595
+
596
+ #thread-dialog {
597
+ width: 70;
598
+ height: auto;
599
+ max-height: 24;
600
+ padding: 1 2;
601
+ border: thick $primary;
602
+ background: $surface;
603
+ }
604
+
605
+ #thread-title {
606
+ text-style: bold;
607
+ padding-bottom: 1;
608
+ }
609
+
610
+ #thread-list {
611
+ height: auto;
612
+ max-height: 18;
613
+ }
614
+
615
+ /* §23 slice 2's question modal. Borrows the grant dialog's proportions --
616
+ both are "read this, then choose" rather than "allow or deny" -- but
617
+ takes the primary border rather than the warning one: this authorises
618
+ nothing, it answers something. */
619
+ QuestionScreen {
620
+ align: center middle;
621
+ }
622
+
623
+ #question-dialog {
624
+ width: 66;
625
+ height: auto;
626
+ /* The body is the MODEL's question -- the one length the app does
627
+ not choose (#112). Without a max-height a long question pushed the
628
+ dialog to 45 rows on a 24-row terminal, title off the top and the
629
+ defer button off the bottom. */
630
+ max-height: 22;
631
+ padding: 1 2;
632
+ border: thick $primary;
633
+ background: $surface;
634
+ }
635
+
636
+ #question-title {
637
+ text-style: bold;
638
+ width: 100%;
639
+ }
640
+
641
+ #question-body-box {
642
+ height: auto;
643
+ max-height: 4;
644
+ padding: 1 0;
645
+ width: 100%;
646
+ }
647
+
648
+ #question-body {
649
+ height: auto;
650
+ width: 100%;
651
+ }
652
+
653
+ /* The single-select options. Bounded like the SelectionList the
654
+ multi-select branch uses, and for the same reason -- four options of
655
+ two lines each is 16 rows, and the dialog has 18. */
656
+ #question-options {
657
+ height: auto;
658
+ max-height: 6;
659
+ width: 100%;
660
+ margin-bottom: 1;
661
+ }
662
+
663
+ /* FIXED WIDTH, and it is what stops the truncation (batch 49). At
664
+ Button's default `width: auto` an option is as wide as its label
665
+ unwrapped -- measured at 119 columns inside a 60-column dialog, so a
666
+ long option was CUT at the dialog edge, and three options of
667
+ different lengths gave three different right edges. At `width: 100%`
668
+ the same label WRAPS to two centred lines and every option is the
669
+ same size. Nothing is truncated anywhere: ask_user refuses an option
670
+ too long to render rather than shortening it. */
671
+ #question-options Button {
672
+ width: 100%;
673
+ }
674
+
675
+ #question-help {
676
+ color: $text-muted;
677
+ padding-bottom: 1;
678
+ width: 100%;
679
+ }
680
+
681
+ #question-list {
682
+ height: auto;
683
+ max-height: 6;
684
+ margin-bottom: 1;
685
+ }
686
+
687
+ /* The sign-off's list is capped like the grant list it is modelled on:
688
+ its length is the subagent's gated tool set, and uncapped it pushed
689
+ the decision buttons off-screen (#112). Capped at 14 it still did --
690
+ #112 bounded the list and nothing bounded the SUM, which is the
691
+ defect batch 49 answers. */
692
+ #signoff-list {
693
+ height: auto;
694
+ max-height: 8;
695
+ margin-bottom: 1;
696
+ }
697
+
698
+ /* §20's review consent surface (#112). It had NO rules at all -- full
699
+ screen, top-left, unbordered -- and its body carries reason and
700
+ proposed straight from the reviewer model, so an uncapped body pushed
701
+ the four decision buttons below the fold. Warning-bordered like
702
+ permission/grant rather than primary like claims/question: this one
703
+ AUTHORISES AN EDIT to a finished research run. */
704
+ #review-dialog {
705
+ width: 76;
706
+ height: auto;
707
+ max-height: 22;
708
+ padding: 1 2;
709
+ border: thick $warning;
710
+ background: $surface;
711
+ }
712
+
713
+ #review-title {
714
+ text-style: bold;
715
+ }
716
+
717
+ #review-body-box {
718
+ height: auto;
719
+ max-height: 8;
720
+ }
721
+
722
+ #review-body {
723
+ height: auto;
724
+ }
725
+
726
+ /* §38's collapsed thinking line. `height: auto` and hidden until a span
727
+ starts, so it costs no rows when tui.show_thinking is on -- the same
728
+ arrangement the checklist below uses for its unfilled slots. */
729
+ #thinking-indicator {
730
+ height: auto;
731
+ padding: 0 1;
732
+ }
733
+
734
+ /* §23 slice 2's checklist. `height: auto` so an empty list costs no rows in
735
+ whichever slot tui.todo_position put it in -- the widget hides itself, and
736
+ this is what makes the unused slots free.
737
+
738
+ No `max-height`, no `overflow-y`: see #research-progress for why that
739
+ pairing on a Static clips rather than scrolls (batch 59, EP3's trap).
740
+ TodoPanel.ROWS is the bound. This panel also sits in the `top` and
741
+ `bottom` slots inside #main, where nothing scrolls at all -- one more
742
+ reason its own height must be honest rather than clamped. */
743
+ #todo-panel {
744
+ height: auto;
745
+ padding: 0 1;
746
+ color: $text-muted;
747
+ }