@pellux/goodvibes-tui 2.0.21 → 2.1.1

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 (391) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/README.md +30 -29
  3. package/docs/README.md +8 -5
  4. package/docs/foundation-artifacts/operator-contract.json +1 -1
  5. package/package.json +28 -19
  6. package/src/cli/management.ts +5 -2
  7. package/src/cli/tui-startup.ts +34 -39
  8. package/src/core/agent-view-render.ts +157 -0
  9. package/src/core/approval-alert.ts +49 -11
  10. package/src/core/bookmark-navigation.ts +7 -1
  11. package/src/core/budget-breach-notifier.ts +27 -8
  12. package/src/core/compaction-receipt.ts +1 -1
  13. package/src/core/context-usage.ts +1 -1
  14. package/src/core/conversation-compaction-render.ts +3 -3
  15. package/src/core/conversation-display-only.ts +86 -0
  16. package/src/core/conversation-event-navigation.ts +27 -0
  17. package/src/core/conversation-line-cache.ts +216 -447
  18. package/src/core/conversation-render-context.ts +20 -27
  19. package/src/core/conversation-rendering.ts +157 -575
  20. package/src/core/conversation-splash-state.ts +6 -1
  21. package/src/core/conversation-types.ts +35 -0
  22. package/src/core/conversation-usage.ts +12 -0
  23. package/src/core/conversation.ts +130 -131
  24. package/src/core/long-task-notifier.ts +100 -31
  25. package/src/core/notices.ts +75 -0
  26. package/src/core/pairing-tailscale-gateway.ts +1 -1
  27. package/src/core/process-output-log.ts +143 -0
  28. package/src/core/rewind-receipt.ts +1 -1
  29. package/src/core/session-focus.ts +190 -0
  30. package/src/core/session-resume-core.ts +23 -81
  31. package/src/core/stream-event-wiring.ts +31 -5
  32. package/src/core/system-message-noise.ts +2 -2
  33. package/src/core/system-message-router.ts +16 -18
  34. package/src/core/turn-event-wiring.ts +272 -33
  35. package/src/core/work-tree-focus.ts +290 -0
  36. package/src/core/work-tree-fold-store.ts +143 -0
  37. package/src/core/work-tree-model.ts +799 -0
  38. package/src/core/work-tree-render.ts +384 -0
  39. package/src/core/work-tree-sources.ts +184 -0
  40. package/src/core/work-tree-wiring.ts +176 -0
  41. package/src/core/workstream-notification.ts +36 -6
  42. package/src/core/wrfc-notice-titles.ts +37 -0
  43. package/src/input/agents-modal-text.ts +119 -0
  44. package/src/input/agents-modal.ts +699 -0
  45. package/src/input/bookmark-modal.ts +33 -9
  46. package/src/input/changes-git.ts +251 -0
  47. package/src/input/changes-modal.ts +629 -0
  48. package/src/input/changes-model.ts +125 -0
  49. package/src/input/command-palette-types.ts +41 -0
  50. package/src/input/command-palette.ts +272 -0
  51. package/src/input/command-reference.ts +2 -2
  52. package/src/input/command-registry.ts +77 -35
  53. package/src/input/commands/acp-runtime.ts +19 -9
  54. package/src/input/commands/channel-runtime.ts +2 -2
  55. package/src/input/commands/ci-runtime.ts +1 -1
  56. package/src/input/commands/codebase-runtime.ts +1 -1
  57. package/src/input/commands/config.ts +7 -1
  58. package/src/input/commands/context-window.ts +25 -19
  59. package/src/input/commands/control-room-runtime.ts +18 -18
  60. package/src/input/commands/conversation-runtime.ts +0 -1
  61. package/src/input/commands/cost-runtime.ts +29 -20
  62. package/src/input/commands/diff-runtime.ts +35 -181
  63. package/src/input/commands/eval.ts +1 -1
  64. package/src/input/commands/experience-runtime.ts +3 -7
  65. package/src/input/commands/fresh-conversation.ts +86 -0
  66. package/src/input/commands/git-runtime.ts +5 -22
  67. package/src/input/commands/graph-runtime.ts +1 -1
  68. package/src/input/commands/guidance-runtime.ts +1 -1
  69. package/src/input/commands/health-runtime.ts +8 -9
  70. package/src/input/commands/hooks-runtime.ts +2 -2
  71. package/src/input/commands/hosted-runtime.ts +3 -3
  72. package/src/input/commands/incident-runtime.ts +3 -3
  73. package/src/input/commands/intelligence-runtime.ts +6 -9
  74. package/src/input/commands/knowledge.ts +2 -2
  75. package/src/input/commands/legacy-panel-command.ts +57 -0
  76. package/src/input/commands/local-auth-runtime.ts +8 -9
  77. package/src/input/commands/local-provider-runtime.ts +7 -4
  78. package/src/input/commands/local-runtime.ts +12 -15
  79. package/src/input/commands/local-setup-review.ts +1 -1
  80. package/src/input/commands/local-setup.ts +13 -19
  81. package/src/input/commands/memory.ts +1 -1
  82. package/src/input/commands/notify-runtime.ts +9 -0
  83. package/src/input/commands/operator-runtime.ts +10 -12
  84. package/src/input/commands/permissions-provenance.ts +3 -3
  85. package/src/input/commands/planning-runtime.ts +7 -7
  86. package/src/input/commands/platform-sandbox-runtime.ts +2 -2
  87. package/src/input/commands/platform-services-runtime.ts +1 -1
  88. package/src/input/commands/policy-dispatch.ts +2 -2
  89. package/src/input/commands/policy.ts +3 -3
  90. package/src/input/commands/provider.ts +1 -1
  91. package/src/input/commands/remote-runtime.ts +1 -1
  92. package/src/input/commands/review-runtime.ts +39 -94
  93. package/src/input/commands/rewind-runtime.ts +81 -108
  94. package/src/input/commands/runtime-services.ts +15 -17
  95. package/src/input/commands/services-runtime.ts +2 -2
  96. package/src/input/commands/session-content.ts +21 -5
  97. package/src/input/commands/session-workflow.ts +13 -38
  98. package/src/input/commands/settings-sync-runtime.ts +2 -2
  99. package/src/input/commands/shell-core.ts +19 -4
  100. package/src/input/commands/skills-runtime.ts +2 -2
  101. package/src/input/commands/status-runtime.ts +13 -0
  102. package/src/input/commands/subscription-runtime.ts +1 -1
  103. package/src/input/commands/tasks-runtime.ts +2 -8
  104. package/src/input/commands/work-plan-runtime.ts +4 -4
  105. package/src/input/commands/workstream-attempts.ts +24 -47
  106. package/src/input/commands/workstream-runtime.ts +2 -2
  107. package/src/input/commands/worktree-runtime.ts +3 -3
  108. package/src/input/commands.ts +3 -1
  109. package/src/input/composer-editor.ts +44 -0
  110. package/src/input/concealed-input.ts +1 -1
  111. package/src/input/config-modal-types.ts +20 -8
  112. package/src/input/config-modal.ts +106 -105
  113. package/src/input/confirm-dialog-types.ts +28 -0
  114. package/src/input/confirm-dialog.ts +70 -0
  115. package/src/input/delete-key-policy.ts +3 -3
  116. package/src/input/feed-context-factory.ts +15 -16
  117. package/src/input/handler-command-route.ts +7 -42
  118. package/src/input/handler-content-actions.ts +16 -15
  119. package/src/input/handler-feed-routes.ts +26 -211
  120. package/src/input/handler-feed.ts +68 -95
  121. package/src/input/handler-interactions.ts +5 -3
  122. package/src/input/handler-modal-routes.ts +215 -216
  123. package/src/input/handler-modal-stack.ts +81 -11
  124. package/src/input/handler-modal-token-routes.ts +4 -0
  125. package/src/input/handler-onboarding.ts +0 -1
  126. package/src/input/handler-picker-routes.ts +65 -107
  127. package/src/input/handler-session-view-route.ts +149 -0
  128. package/src/input/handler-shortcuts.ts +16 -154
  129. package/src/input/handler-types.ts +4 -2
  130. package/src/input/handler-ui-state.ts +45 -15
  131. package/src/input/handler-work-tree-route.ts +123 -0
  132. package/src/input/handler.ts +25 -70
  133. package/src/input/keybindings.ts +16 -71
  134. package/src/input/masked-entry-modal.ts +117 -0
  135. package/src/input/mcp-workspace.ts +48 -17
  136. package/src/input/model-picker-filter.ts +8 -0
  137. package/src/input/model-picker-open.ts +99 -0
  138. package/src/input/model-picker-types.ts +1 -1
  139. package/src/input/model-picker.ts +92 -9
  140. package/src/input/notifications-modal.ts +123 -0
  141. package/src/input/overlay-filter.ts +26 -0
  142. package/src/input/profile-picker-modal.ts +37 -8
  143. package/src/input/search.ts +3 -3
  144. package/src/input/selection-modal-queue.ts +2 -0
  145. package/src/input/selection-modal.ts +28 -16
  146. package/src/input/session-picker-modal.ts +33 -8
  147. package/src/input/settings-modal-activation.ts +7 -2
  148. package/src/input/settings-modal-data.ts +11 -6
  149. package/src/input/settings-modal-types.ts +1 -1
  150. package/src/input/settings-modal.ts +20 -20
  151. package/src/input/submission-intent.ts +1 -1
  152. package/src/input/submission-router.ts +4 -9
  153. package/src/input/surface-modal-host.ts +110 -0
  154. package/src/input/theme-settings-actions.ts +82 -0
  155. package/src/input/usage-modal.ts +183 -0
  156. package/src/input/views.ts +97 -0
  157. package/src/main.ts +175 -165
  158. package/src/permissions/hunk-selection.ts +1 -1
  159. package/src/permissions/prompt-card.ts +511 -0
  160. package/src/permissions/prompt.ts +59 -622
  161. package/src/renderer/agents-modal.ts +310 -0
  162. package/src/renderer/autocomplete-overlay.ts +42 -220
  163. package/src/renderer/back-to-bottom.ts +80 -0
  164. package/src/renderer/block-actions-overlay.ts +30 -48
  165. package/src/renderer/bookmark-modal.ts +48 -79
  166. package/src/renderer/changes-modal.ts +325 -0
  167. package/src/renderer/code-block.ts +184 -106
  168. package/src/renderer/command-palette.ts +93 -0
  169. package/src/renderer/composer-fragments.ts +4 -4
  170. package/src/renderer/composer.ts +146 -0
  171. package/src/renderer/compositor.ts +26 -160
  172. package/src/renderer/config-modal.ts +185 -81
  173. package/src/renderer/confirm-dialog.ts +50 -0
  174. package/src/renderer/context-inspector.ts +116 -154
  175. package/src/renderer/context-status-hint.ts +4 -4
  176. package/src/renderer/conversation-layout.ts +20 -0
  177. package/src/renderer/conversation-overlays.ts +94 -84
  178. package/src/renderer/conversation-surface.ts +19 -38
  179. package/src/renderer/diff-tint.ts +98 -0
  180. package/src/renderer/file-picker-overlay.ts +63 -90
  181. package/src/renderer/footer-targets.ts +38 -0
  182. package/src/renderer/git-status.ts +3 -4
  183. package/src/renderer/header-line.ts +140 -117
  184. package/src/renderer/help-overlay.ts +133 -219
  185. package/src/renderer/history-search-overlay.ts +15 -12
  186. package/src/renderer/lane-graph/bead.ts +800 -0
  187. package/src/renderer/lane-graph/glyphs.ts +134 -0
  188. package/src/renderer/lane-graph/layout.ts +248 -0
  189. package/src/renderer/lane-graph/paint.ts +537 -0
  190. package/src/renderer/lane-graph/semantic-memo.ts +77 -0
  191. package/src/renderer/layout-engine.ts +2 -57
  192. package/src/renderer/layout.ts +7 -13
  193. package/src/renderer/markdown-inline.ts +2 -1
  194. package/src/renderer/markdown-table.ts +17 -12
  195. package/src/renderer/markdown.ts +92 -34
  196. package/src/renderer/masked-entry-modal.ts +78 -0
  197. package/src/renderer/mcp-workspace.ts +166 -203
  198. package/src/renderer/model-workspace.ts +381 -436
  199. package/src/renderer/notifications-modal.ts +116 -0
  200. package/src/renderer/onboarding/onboarding-wizard.ts +178 -588
  201. package/src/renderer/process-view.ts +192 -0
  202. package/src/renderer/profile-picker-modal.ts +58 -110
  203. package/src/renderer/search-overlay.ts +6 -3
  204. package/src/renderer/selection-modal-overlay.ts +87 -327
  205. package/src/renderer/semantic-diff.ts +2 -2
  206. package/src/renderer/session-chips.ts +102 -0
  207. package/src/renderer/session-picker-modal.ts +177 -297
  208. package/src/renderer/settings-modal-connections.ts +14 -23
  209. package/src/renderer/settings-modal-context.ts +367 -0
  210. package/src/renderer/settings-modal-helpers.ts +6 -11
  211. package/src/renderer/settings-modal.ts +322 -726
  212. package/src/renderer/shell-surface.ts +277 -175
  213. package/src/renderer/shortcuts-overlay.ts +217 -0
  214. package/src/renderer/status-line.ts +475 -0
  215. package/src/renderer/surface-compose.ts +174 -0
  216. package/src/renderer/surface-kit-extra.ts +303 -0
  217. package/src/renderer/surface-kit-list.ts +366 -0
  218. package/src/renderer/surface-kit-parts.ts +360 -0
  219. package/src/renderer/surface-kit.ts +568 -0
  220. package/src/renderer/syntax-highlighter.ts +280 -197
  221. package/src/renderer/syntax-theme.ts +51 -0
  222. package/src/renderer/system-message.ts +0 -1
  223. package/src/renderer/term-caps.ts +42 -1
  224. package/src/renderer/terminal-bg-probe.ts +116 -19
  225. package/src/renderer/terminal-palette-probe.ts +322 -0
  226. package/src/renderer/terminal-palette-reader.ts +183 -0
  227. package/src/renderer/terminal-palette.ts +58 -0
  228. package/src/renderer/theme-mode-config.ts +16 -1
  229. package/src/renderer/theme.ts +234 -207
  230. package/src/renderer/thinking.ts +0 -1
  231. package/src/renderer/throbber.ts +188 -0
  232. package/src/renderer/toast-center.ts +119 -0
  233. package/src/renderer/ui-factory.ts +39 -602
  234. package/src/renderer/ui-primitives.ts +8 -25
  235. package/src/renderer/usage-modal.ts +353 -0
  236. package/src/renderer/user-message.ts +58 -0
  237. package/src/renderer/voice-capture-chip.ts +53 -0
  238. package/src/runtime/bootstrap-command-context.ts +0 -5
  239. package/src/runtime/bootstrap-command-parts.ts +38 -89
  240. package/src/runtime/bootstrap-core.ts +13 -15
  241. package/src/runtime/bootstrap-hook-bridge.ts +12 -21
  242. package/src/runtime/bootstrap-notifier-sync.ts +17 -1
  243. package/src/runtime/bootstrap-shell.ts +16 -50
  244. package/src/runtime/bootstrap.ts +14 -14
  245. package/src/runtime/client/fleet-union.ts +5 -5
  246. package/src/runtime/client/hosted-exit.ts +2 -2
  247. package/src/runtime/client/hosted-sessions.ts +1 -1
  248. package/src/runtime/client/spine-adoption.ts +1 -1
  249. package/src/runtime/context-accounting-source.ts +5 -4
  250. package/src/runtime/index.ts +1 -0
  251. package/src/runtime/notification-dispatch.ts +102 -29
  252. package/src/runtime/recovery-offer-wiring.ts +4 -1
  253. package/src/runtime/recovery-prompt.ts +31 -15
  254. package/src/runtime/runtime-services-types.ts +10 -6
  255. package/src/runtime/services.ts +17 -12
  256. package/src/runtime/session-continuity-hints.ts +2 -5
  257. package/src/runtime/session-inbound-inputs.ts +1 -1
  258. package/src/runtime/session-resume-liveness-confirm.ts +14 -2
  259. package/src/runtime/startup-typeahead-gate.ts +103 -0
  260. package/src/runtime/store/domains/domain-read-matrix.ts +0 -1
  261. package/src/runtime/store/domains/index.ts +0 -8
  262. package/src/runtime/store/selectors/index.ts +0 -28
  263. package/src/runtime/store/state.ts +0 -8
  264. package/src/runtime/ui-services.ts +4 -6
  265. package/src/runtime/usage-tracker.ts +348 -0
  266. package/src/runtime/wrfc-persistence.ts +4 -4
  267. package/src/shell/blocking-input.ts +92 -2
  268. package/src/shell/recovery-input-helpers.ts +1 -1
  269. package/src/shell/session-views.ts +539 -0
  270. package/src/shell/status-report.ts +86 -0
  271. package/src/shell/transcript-scroll.ts +68 -0
  272. package/src/shell/ui-openers.ts +84 -172
  273. package/src/shell/view-openers.ts +205 -0
  274. package/src/tools/wrfc-agent-guard.ts +22 -2
  275. package/src/utils/format-duration.ts +4 -8
  276. package/src/utils/splash-lines.ts +9 -1
  277. package/src/utils/terminal-width.ts +56 -0
  278. package/src/verification/live-verifier.ts +0 -10
  279. package/src/version.ts +1 -1
  280. package/src/{panels → views}/agent-inspector-shared.ts +2 -2
  281. package/src/{panels → views}/builtin-modals.ts +22 -21
  282. package/src/views/builtin-views.ts +135 -0
  283. package/src/{panels → views}/confirm-state.ts +9 -9
  284. package/src/{panels → views}/diff-review-model.ts +10 -3
  285. package/src/{panels → views}/eval-registry.ts +1 -1
  286. package/src/{panels → views}/fleet-acts.ts +49 -85
  287. package/src/{panels/fleet-panel-format.ts → views/fleet-format.ts} +40 -40
  288. package/src/{panels → views}/fleet-gateway.ts +5 -5
  289. package/src/{panels → views}/fleet-observed-render.ts +16 -16
  290. package/src/{panels → views}/fleet-read-model.ts +9 -9
  291. package/src/{panels/fleet-tabs.ts → views/fleet-session-tabs.ts} +13 -13
  292. package/src/{panels → views}/fleet-spawn.ts +33 -49
  293. package/src/{panels → views}/fleet-steer.ts +12 -12
  294. package/src/{panels → views}/fleet-stop.ts +4 -4
  295. package/src/{panels → views}/fleet-transcript.ts +26 -27
  296. package/src/{panels/fleet-panel-worktree-detail.ts → views/fleet-worktree-detail.ts} +7 -7
  297. package/src/{panels → views}/hosted-session-feed.ts +6 -6
  298. package/src/views/modal-surface-registry.ts +41 -0
  299. package/src/{panels → views}/modals/devices-modal.ts +2 -2
  300. package/src/{panels → views}/modals/hooks-modal.ts +13 -13
  301. package/src/{panels → views}/modals/keybindings-modal.ts +19 -27
  302. package/src/{panels → views}/modals/knowledge-modal.ts +6 -5
  303. package/src/{panels → views}/modals/local-auth-modal.ts +22 -21
  304. package/src/{panels → views}/modals/marketplace-modal.ts +11 -11
  305. package/src/{panels → views}/modals/memory-modal.ts +8 -8
  306. package/src/{panels → views}/modals/modal-surface-helpers.ts +15 -5
  307. package/src/{panels → views}/modals/pairing-modal.ts +9 -9
  308. package/src/{panels → views}/modals/planning-modal.ts +15 -20
  309. package/src/{panels → views}/modals/plugins-modal.ts +6 -6
  310. package/src/{panels → views}/modals/policy-modal.ts +13 -5
  311. package/src/{panels → views}/modals/provider-health-modal.ts +4 -4
  312. package/src/{panels → views}/modals/remote-modal.ts +3 -3
  313. package/src/{panels → views}/modals/sandbox-modal.ts +4 -4
  314. package/src/{panels → views}/modals/security-modal.ts +22 -16
  315. package/src/{panels → views}/modals/services-modal.ts +3 -3
  316. package/src/{panels → views}/modals/settings-sync-modal.ts +4 -4
  317. package/src/{panels → views}/modals/skills-modal.ts +9 -9
  318. package/src/{panels → views}/modals/subscription-modal.ts +3 -3
  319. package/src/{panels → views}/modals/work-plan-modal.ts +10 -13
  320. package/src/views/notifications-feed.ts +314 -0
  321. package/src/{panels → views}/polish-core.ts +38 -36
  322. package/src/{panels → views}/polish-tables.ts +35 -26
  323. package/src/{panels → views}/polish.ts +101 -95
  324. package/src/{panels → views}/project-planning-answer-actions.ts +3 -3
  325. package/src/{panels → views}/provider-health-routes.ts +14 -14
  326. package/src/{panels → views}/search-focus.ts +8 -8
  327. package/src/{panels → views}/session-maintenance.ts +11 -11
  328. package/src/views/skills-discovery.ts +159 -0
  329. package/src/views/view-deps.ts +80 -0
  330. package/src/views/view-panel-adapter.ts +53 -0
  331. package/src/{panels → views}/workstream-graph-render.ts +1 -1
  332. package/src/core/conversation-fold.ts +0 -101
  333. package/src/core/conversation-turn-structure.ts +0 -464
  334. package/src/core/conversation-user-receipts.ts +0 -42
  335. package/src/input/commands/operator-panel-runtime.ts +0 -186
  336. package/src/input/panel-integration-actions.ts +0 -33
  337. package/src/input/panel-mouse-geometry.ts +0 -97
  338. package/src/input/panel-paste-flood-guard.ts +0 -86
  339. package/src/panels/base-panel.ts +0 -301
  340. package/src/panels/builtin/agent.ts +0 -27
  341. package/src/panels/builtin/development.ts +0 -92
  342. package/src/panels/builtin/knowledge.ts +0 -12
  343. package/src/panels/builtin/operations.ts +0 -177
  344. package/src/panels/builtin/session.ts +0 -81
  345. package/src/panels/builtin/shared.ts +0 -357
  346. package/src/panels/builtin-panels.ts +0 -28
  347. package/src/panels/cost-tracker-panel.ts +0 -746
  348. package/src/panels/diff-panel.ts +0 -797
  349. package/src/panels/diff-review-panel.ts +0 -395
  350. package/src/panels/expandable-list-panel.ts +0 -189
  351. package/src/panels/fleet-deep-link.ts +0 -31
  352. package/src/panels/fleet-panel.ts +0 -799
  353. package/src/panels/git-panel.ts +0 -800
  354. package/src/panels/hosted-session-panel.ts +0 -221
  355. package/src/panels/index.ts +0 -21
  356. package/src/panels/local-auth-panel.ts +0 -478
  357. package/src/panels/notifications-feed.ts +0 -127
  358. package/src/panels/notifications-panel.ts +0 -160
  359. package/src/panels/panel-confirm-overlay.ts +0 -72
  360. package/src/panels/panel-manager.ts +0 -791
  361. package/src/panels/plugins-panel.ts +0 -371
  362. package/src/panels/scrollable-list-panel.ts +0 -498
  363. package/src/panels/skills-panel.ts +0 -454
  364. package/src/panels/token-budget-panel.ts +0 -688
  365. package/src/panels/types.ts +0 -191
  366. package/src/panels/wrfc-panel-format.ts +0 -133
  367. package/src/renderer/diff-view.ts +0 -134
  368. package/src/renderer/fleet-tab-strip.ts +0 -56
  369. package/src/renderer/footer-tips.ts +0 -53
  370. package/src/renderer/fullscreen-primitives.ts +0 -146
  371. package/src/renderer/fullscreen-workspace.ts +0 -194
  372. package/src/renderer/hint-grammar.ts +0 -52
  373. package/src/renderer/modal-factory.ts +0 -480
  374. package/src/renderer/overlay-box.ts +0 -154
  375. package/src/renderer/overlay-viewport.ts +0 -104
  376. package/src/renderer/panel-composite.ts +0 -145
  377. package/src/renderer/panel-workspace-bar.ts +0 -54
  378. package/src/renderer/process-indicator.ts +0 -163
  379. package/src/renderer/tab-strip.ts +0 -222
  380. package/src/renderer/text-layout.ts +0 -31
  381. package/src/renderer/tool-call.ts +0 -276
  382. package/src/renderer/tool-result-expanded-lines.ts +0 -48
  383. package/src/renderer/tool-result-summary.ts +0 -219
  384. package/src/runtime/diagnostics/panels/index.ts +0 -21
  385. package/src/runtime/diagnostics/panels/ops.ts +0 -156
  386. package/src/runtime/perf/panel-contracts.ts +0 -32
  387. package/src/runtime/store/domains/panels.ts +0 -117
  388. package/src/verification/verification-ledger.ts +0 -707
  389. /package/src/{panels → views}/memory-consolidation-gateway.ts +0 -0
  390. /package/src/{panels → views}/modals/modal-theme.ts +0 -0
  391. /package/src/{panels → views}/provider-health-domains.ts +0 -0
@@ -4,10 +4,10 @@ import { getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
4
4
  import { getSurfaceContentRows, getTrackedVisibleWindow, getVisibleWindow, type VisibleWindow } from '../renderer/surface-layout.ts';
5
5
  import { GLYPHS } from '../renderer/ui-primitives.ts';
6
6
  import { type StatusState, STATE_GLYPHS } from '../renderer/status-glyphs.ts';
7
- import { buildPanelLine, buildStyledPanelLine, DEFAULT_PANEL_PALETTE } from './polish-core.ts';
8
- import type { PanelPalette, StyledPanelSegment } from './polish-core.ts';
7
+ import { buildViewLine, buildStyledViewLine, DEFAULT_VIEW_PALETTE } from './polish-core.ts';
8
+ import type { ViewPalette, StyledViewSegment } from './polish-core.ts';
9
9
 
10
- // The panel formatting toolkit is split across three modules to stay under the
10
+ // The view formatting toolkit is split across three modules to stay under the
11
11
  // architecture line-count cap; every symbol remains importable from './polish.ts':
12
12
  // - ./polish-core.ts palette + base line primitives (leaf)
13
13
  // - ./polish-tables.ts table / tree / badge / aligned-row primitives
@@ -32,9 +32,9 @@ export function buildGuidanceLine(
32
32
  width: number,
33
33
  command: string,
34
34
  summary: string,
35
- palette: PanelPalette,
35
+ palette: ViewPalette,
36
36
  ): Line {
37
- return buildPanelLine(width, [
37
+ return buildViewLine(width, [
38
38
  [` ${GLYPHS.status.info} `, palette.info],
39
39
  [command, palette.info],
40
40
  [' - ', palette.dim],
@@ -42,13 +42,14 @@ export function buildGuidanceLine(
42
42
  ]);
43
43
  }
44
44
 
45
- export function buildPanelTitle(
45
+ export function buildViewTitle(
46
46
  width: number,
47
47
  title: string,
48
- palette: PanelPalette,
48
+ palette: ViewPalette,
49
49
  ): Line {
50
- const titleText = fitDisplayText(` ${title}`, width);
51
- return buildStyledPanelLine(width, [
50
+ // Two columns between the fill edge and the title (the Measurements padding rule).
51
+ const titleText = fitDisplayText(` ${title}`, width);
52
+ return buildStyledViewLine(width, [
52
53
  { text: titleText, fg: palette.header ?? palette.accent ?? palette.value, bg: palette.headerBg, bold: true },
53
54
  ], { fillBg: palette.headerBg });
54
55
  }
@@ -56,21 +57,21 @@ export function buildPanelTitle(
56
57
  export function buildBodyText(
57
58
  width: number,
58
59
  text: string,
59
- palette: PanelPalette,
60
+ palette: ViewPalette,
60
61
  fg: string = palette.value,
61
62
  ): Line[] {
62
63
  const wrapped = wrapText(text, Math.max(10, width - 2));
63
- return wrapped.map((line) => buildStyledPanelLine(width, [{ text: ` ${line}`, fg, bg: palette.surfaceBg }], { fillBg: palette.surfaceBg }));
64
+ return wrapped.map((line) => buildStyledViewLine(width, [{ text: ` ${line}`, fg, bg: palette.surfaceBg }], { fillBg: palette.surfaceBg }));
64
65
  }
65
66
 
66
67
  export function buildSectionHeader(
67
68
  width: number,
68
69
  title: string,
69
- palette: PanelPalette,
70
+ palette: ViewPalette,
70
71
  ): Line {
71
72
  const prefix = `${GLYPHS.status.dualPane} ${title}`;
72
73
  const divider = GLYPHS.frame.horizontal.repeat(Math.max(0, width - getDisplayWidth(prefix) - 2));
73
- return buildStyledPanelLine(width, [
74
+ return buildStyledViewLine(width, [
74
75
  { text: ' ', fg: palette.label, bg: palette.sectionBg },
75
76
  { text: prefix, fg: palette.label, bg: palette.sectionBg, bold: true },
76
77
  { text: ' ', fg: palette.dim, bg: palette.sectionBg },
@@ -81,7 +82,7 @@ export function buildSectionHeader(
81
82
  export function buildKeyValueLine(
82
83
  width: number,
83
84
  entries: ReadonlyArray<{ label: string; value: string; valueColor?: string }>,
84
- palette: PanelPalette,
85
+ palette: ViewPalette,
85
86
  ): Line {
86
87
  const segments: Array<[string, string, string?]> = [];
87
88
  for (const entry of entries) {
@@ -90,16 +91,16 @@ export function buildKeyValueLine(
90
91
  segments.push([entry.value, entry.valueColor ?? palette.value]);
91
92
  segments.push([' ', palette.dim]);
92
93
  }
93
- return buildStyledPanelLine(width, segments.map(([text, fg, bg]) => ({ text, fg, bg: bg ?? palette.summaryBg })), { fillBg: palette.summaryBg });
94
+ return buildStyledViewLine(width, segments.map(([text, fg, bg]) => ({ text, fg, bg: bg ?? palette.summaryBg })), { fillBg: palette.summaryBg });
94
95
  }
95
96
 
96
97
  export function buildShortcutLine(
97
98
  width: number,
98
99
  keys: string,
99
100
  summary: string,
100
- palette: PanelPalette,
101
+ palette: ViewPalette,
101
102
  ): Line {
102
- return buildPanelLine(width, [
103
+ return buildViewLine(width, [
103
104
  [' ', palette.label],
104
105
  [keys, palette.info],
105
106
  [' ', palette.dim],
@@ -107,10 +108,10 @@ export function buildShortcutLine(
107
108
  ]);
108
109
  }
109
110
 
110
- export function buildPanelListRow(
111
+ export function buildViewListRow(
111
112
  width: number,
112
- segments: ReadonlyArray<StyledPanelSegment>,
113
- palette: PanelPalette,
113
+ segments: ReadonlyArray<StyledViewSegment>,
114
+ palette: ViewPalette,
114
115
  options: {
115
116
  readonly selected?: boolean;
116
117
  readonly selectedBg?: string;
@@ -124,7 +125,7 @@ export function buildPanelListRow(
124
125
  const fillBg = selected ? selectedBg : options.fillBg;
125
126
  const marker = selected ? `${options.marker ?? GLYPHS.navigation.selected} ` : ' ';
126
127
  const markerFg = selected ? (options.markerColor ?? palette.info) : palette.dim;
127
- return buildStyledPanelLine(width, [
128
+ return buildStyledViewLine(width, [
128
129
  { text: marker, fg: markerFg, bg: fillBg, bold: selected },
129
130
  ...segments.map((segment) => ({
130
131
  ...segment,
@@ -137,7 +138,7 @@ export function buildSearchInputLine(
137
138
  width: number,
138
139
  label: string,
139
140
  value: string,
140
- palette: PanelPalette,
141
+ palette: ViewPalette,
141
142
  options: { active?: boolean; bg?: string; emptyLabel?: string; valueColor?: string } = {},
142
143
  ): Line {
143
144
  const active = options.active ?? false;
@@ -152,33 +153,38 @@ export function buildSearchInputLine(
152
153
  : hasValue
153
154
  ? options.valueColor ?? palette.value
154
155
  : palette.dim;
155
- return buildStyledPanelLine(width, [
156
- { text: ' ', fg: palette.label, bg },
156
+ // Two columns of padding on both sides of the fill; a long draft keeps its
157
+ // end (where the cursor is) in view.
158
+ const room = Math.max(1, width - 4 - getDisplayWidth(label));
159
+ let shown = content;
160
+ while (shown.length > 0 && getDisplayWidth(shown) > room) shown = shown.slice(1);
161
+ return buildStyledViewLine(width, [
162
+ { text: ' ', fg: palette.label, bg },
157
163
  { text: `${label}`, fg: palette.label, bg },
158
- { text: content, fg, bg, bold: active },
164
+ { text: shown, fg, bg, bold: active },
159
165
  ], { fillBg: bg });
160
166
  }
161
167
 
162
168
  /**
163
- * Build a status pill segment (glyph + label) for use in buildPanelLine.
169
+ * Build a status pill segment (glyph + label) for use in buildViewLine.
164
170
  *
165
- * Returns StyledPanelSegment[], spread directly into a buildPanelLine segments
171
+ * Returns StyledViewSegment[], spread directly into a buildViewLine segments
166
172
  * array:
167
- * buildPanelLine(width, [[' count ', C.label], ...buildStatusPill('bad', '3')])
173
+ * buildViewLine(width, [[' count ', C.label], ...buildStatusPill('bad', '3')])
168
174
  *
169
175
  * Convention: raw hex colors may only live inside a palette constant declared at
170
- * the top of a panel file; buildStatusPill derives its color from the palette.
176
+ * the top of a view file; buildStatusPill derives its color from the palette.
171
177
  */
172
178
  export function buildStatusPill(
173
179
  state: StatusState,
174
180
  label: string,
175
181
  opts?: { glyph?: string; bg?: string; count?: number },
176
- ): StyledPanelSegment[] {
182
+ ): StyledViewSegment[] {
177
183
  const glyph = opts?.glyph ?? STATE_GLYPHS[state];
178
- const color = state === 'good' ? DEFAULT_PANEL_PALETTE.good
179
- : state === 'warn' ? DEFAULT_PANEL_PALETTE.warn
180
- : state === 'bad' ? DEFAULT_PANEL_PALETTE.bad
181
- : DEFAULT_PANEL_PALETTE.info;
184
+ const color = state === 'good' ? DEFAULT_VIEW_PALETTE.good
185
+ : state === 'warn' ? DEFAULT_VIEW_PALETTE.warn
186
+ : state === 'bad' ? DEFAULT_VIEW_PALETTE.bad
187
+ : DEFAULT_VIEW_PALETTE.info;
182
188
  const bg = opts?.bg;
183
189
  const text = opts?.count !== undefined ? `${glyph} ${label} (${opts.count})` : `${glyph} ${label}`;
184
190
  return [{ text, fg: color, bg }];
@@ -213,7 +219,7 @@ export function buildMeterLine(
213
219
  const normalizedFilledChar = options.filledChar ?? GLYPHS.meter.filled;
214
220
  const barWidth = Math.max(1, total);
215
221
  const clampedFilled = Math.max(0, Math.min(barWidth, filled));
216
- const segments: StyledPanelSegment[] = [{ text: prefix, fg: colors.label ?? colors.filled }];
222
+ const segments: StyledViewSegment[] = [{ text: prefix, fg: colors.label ?? colors.filled }];
217
223
  if (clampedFilled > 0) {
218
224
  segments.push({ text: normalizedFilledChar.repeat(clampedFilled), fg: colors.filled });
219
225
  }
@@ -221,7 +227,7 @@ export function buildMeterLine(
221
227
  segments.push({ text: emptyChar.repeat(barWidth - clampedFilled), fg: colors.empty });
222
228
  }
223
229
  segments.push({ text: suffix, fg: colors.label ?? colors.filled });
224
- return buildStyledPanelLine(width, segments);
230
+ return buildStyledViewLine(width, segments);
225
231
  }
226
232
 
227
233
  export function buildEmptyState(
@@ -229,13 +235,13 @@ export function buildEmptyState(
229
235
  title: string,
230
236
  body: string,
231
237
  actions: ReadonlyArray<{ command: string; summary: string }>,
232
- palette: PanelPalette,
238
+ palette: ViewPalette,
233
239
  ): Line[] {
234
240
  const lines: Line[] = [];
235
- lines.push(buildPanelLine(width, [[` ${title}`, palette.empty]]));
241
+ lines.push(buildViewLine(width, [[` ${title}`, palette.empty]]));
236
242
  lines.push(...buildBodyText(width, body, palette, palette.dim));
237
243
  if (actions.length > 0) {
238
- lines.push(buildPanelLine(width, [[' Suggested next steps', palette.label]]));
244
+ lines.push(buildViewLine(width, [[' Suggested next steps', palette.label]]));
239
245
  for (const action of actions) {
240
246
  lines.push(buildGuidanceLine(width, action.command, action.summary, palette));
241
247
  }
@@ -247,10 +253,10 @@ export function buildSummaryBlock(
247
253
  width: number,
248
254
  title: string,
249
255
  rows: readonly Line[],
250
- palette: PanelPalette,
256
+ palette: ViewPalette,
251
257
  ): Line[] {
252
258
  const lines: Line[] = [
253
- buildStyledPanelLine(width, [
259
+ buildStyledViewLine(width, [
254
260
  { text: ` ${GLYPHS.status.active} ${title}`, fg: palette.header ?? palette.value, bg: palette.summaryBg, bold: true },
255
261
  ], { fillBg: palette.summaryBg }),
256
262
  ];
@@ -262,10 +268,10 @@ export function buildDetailBlock(
262
268
  width: number,
263
269
  title: string,
264
270
  rows: readonly Line[],
265
- palette: PanelPalette,
271
+ palette: ViewPalette,
266
272
  ): Line[] {
267
273
  return [
268
- buildStyledPanelLine(width, [
274
+ buildStyledViewLine(width, [
269
275
  { text: ` ${GLYPHS.status.review} ${title}`, fg: palette.header ?? palette.value, bg: palette.sectionBg, bold: true },
270
276
  ], { fillBg: palette.sectionBg }),
271
277
  ...rows.map((row) => row.map((cell) => (
@@ -294,12 +300,12 @@ function fitDisplayText(text: string, width: number): string {
294
300
  return out;
295
301
  }
296
302
 
297
- export interface PanelWorkspaceSection {
303
+ export interface ViewWorkspaceSection {
298
304
  readonly title?: string;
299
305
  readonly lines: readonly Line[];
300
306
  }
301
307
 
302
- export interface PrimaryScrollablePanelSectionConfig {
308
+ export interface PrimaryScrollableViewSectionConfig {
303
309
  readonly title?: string;
304
310
  readonly fixedLines?: readonly Line[];
305
311
  readonly scrollableLines: readonly Line[];
@@ -313,7 +319,7 @@ export interface PrimaryScrollablePanelSectionConfig {
313
319
  };
314
320
  }
315
321
 
316
- export interface ScrollablePanelSectionConfig {
322
+ export interface ScrollableViewSectionConfig {
317
323
  readonly title?: string;
318
324
  readonly fixedLines?: readonly Line[];
319
325
  readonly scrollableLines: readonly Line[];
@@ -327,33 +333,33 @@ export interface ScrollablePanelSectionConfig {
327
333
  };
328
334
  }
329
335
 
330
- export interface StackedScrollablePanelSectionConfig extends ScrollablePanelSectionConfig {
336
+ export interface StackedScrollableViewSectionConfig extends ScrollableViewSectionConfig {
331
337
  readonly weight?: number;
332
338
  }
333
339
 
334
- export interface PanelWorkspaceConfig {
340
+ export interface ViewWorkspaceConfig {
335
341
  readonly title: string;
336
342
  readonly intro?: string;
337
- readonly sections: readonly PanelWorkspaceSection[];
343
+ readonly sections: readonly ViewWorkspaceSection[];
338
344
  readonly footerLines?: readonly Line[];
339
- readonly palette: PanelPalette;
345
+ readonly palette: ViewPalette;
340
346
  }
341
347
 
342
- function getPanelWorkspaceIntroRows(
348
+ function getViewWorkspaceIntroRows(
343
349
  width: number,
344
350
  intro: string | undefined,
345
- palette: PanelPalette,
351
+ palette: ViewPalette,
346
352
  ): number {
347
353
  return intro ? buildBodyText(width, intro, palette, palette.dim).length : 0;
348
354
  }
349
355
 
350
- export function getPanelWorkspaceContentBudget(
356
+ export function getViewWorkspaceContentBudget(
351
357
  width: number,
352
358
  height: number,
353
- config: Pick<PanelWorkspaceConfig, 'intro' | 'footerLines' | 'palette'>,
359
+ config: Pick<ViewWorkspaceConfig, 'intro' | 'footerLines' | 'palette'>,
354
360
  ): number {
355
361
  const footerLines = [...(config.footerLines ?? [])];
356
- const chromeRows = 1 + getPanelWorkspaceIntroRows(width, config.intro, config.palette) + footerLines.length;
362
+ const chromeRows = 1 + getViewWorkspaceIntroRows(width, config.intro, config.palette) + footerLines.length;
357
363
  return Math.max(
358
364
  1,
359
365
  getSurfaceContentRows({
@@ -368,27 +374,27 @@ export function getPanelWorkspaceContentBudget(
368
374
  );
369
375
  }
370
376
 
371
- export function getPanelWorkspaceSectionRows(section: PanelWorkspaceSection): number {
377
+ export function getViewWorkspaceSectionRows(section: ViewWorkspaceSection): number {
372
378
  return (section.title ? 1 : 0) + section.lines.length;
373
379
  }
374
380
 
375
- export function getPanelScrollableSectionBudget(
381
+ export function getViewScrollableSectionBudget(
376
382
  width: number,
377
383
  height: number,
378
384
  options: {
379
385
  readonly intro?: string;
380
386
  readonly footerLines?: readonly Line[];
381
- readonly palette: PanelPalette;
382
- readonly beforeSections?: readonly PanelWorkspaceSection[];
387
+ readonly palette: ViewPalette;
388
+ readonly beforeSections?: readonly ViewWorkspaceSection[];
383
389
  readonly currentSectionTitle?: string;
384
390
  readonly currentSectionFixedRows?: number;
385
- readonly afterSections?: readonly PanelWorkspaceSection[];
391
+ readonly afterSections?: readonly ViewWorkspaceSection[];
386
392
  readonly minRows?: number;
387
393
  },
388
394
  ): number {
389
- const contentBudget = getPanelWorkspaceContentBudget(width, height, options);
390
- const beforeRows = (options.beforeSections ?? []).reduce((sum, section) => sum + getPanelWorkspaceSectionRows(section), 0);
391
- const afterRows = (options.afterSections ?? []).reduce((sum, section) => sum + getPanelWorkspaceSectionRows(section), 0);
395
+ const contentBudget = getViewWorkspaceContentBudget(width, height, options);
396
+ const beforeRows = (options.beforeSections ?? []).reduce((sum, section) => sum + getViewWorkspaceSectionRows(section), 0);
397
+ const afterRows = (options.afterSections ?? []).reduce((sum, section) => sum + getViewWorkspaceSectionRows(section), 0);
392
398
  const currentHeaderRows = options.currentSectionTitle ? 1 : 0;
393
399
  const currentFixedRows = Math.max(0, options.currentSectionFixedRows ?? 0);
394
400
  return Math.max(options.minRows ?? 1, contentBudget - beforeRows - currentHeaderRows - currentFixedRows - afterRows);
@@ -400,17 +406,17 @@ export function resolvePrimaryScrollableSection(
400
406
  options: {
401
407
  readonly intro?: string;
402
408
  readonly footerLines?: readonly Line[];
403
- readonly palette: PanelPalette;
404
- readonly beforeSections?: readonly PanelWorkspaceSection[];
405
- readonly section: PrimaryScrollablePanelSectionConfig;
406
- readonly afterSections?: readonly PanelWorkspaceSection[];
409
+ readonly palette: ViewPalette;
410
+ readonly beforeSections?: readonly ViewWorkspaceSection[];
411
+ readonly section: PrimaryScrollableViewSectionConfig;
412
+ readonly afterSections?: readonly ViewWorkspaceSection[];
407
413
  },
408
414
  ): {
409
- readonly section: PanelWorkspaceSection;
415
+ readonly section: ViewWorkspaceSection;
410
416
  readonly scrollOffset: number;
411
417
  readonly window: VisibleWindow;
412
418
  } {
413
- return resolveScrollablePanelSection(width, height, {
419
+ return resolveScrollableViewSection(width, height, {
414
420
  intro: options.intro,
415
421
  footerLines: options.footerLines,
416
422
  palette: options.palette,
@@ -420,24 +426,24 @@ export function resolvePrimaryScrollableSection(
420
426
  });
421
427
  }
422
428
 
423
- export function resolveScrollablePanelSection(
429
+ export function resolveScrollableViewSection(
424
430
  width: number,
425
431
  height: number,
426
432
  options: {
427
433
  readonly intro?: string;
428
434
  readonly footerLines?: readonly Line[];
429
- readonly palette: PanelPalette;
430
- readonly beforeSections?: readonly PanelWorkspaceSection[];
431
- readonly section: ScrollablePanelSectionConfig;
432
- readonly afterSections?: readonly PanelWorkspaceSection[];
435
+ readonly palette: ViewPalette;
436
+ readonly beforeSections?: readonly ViewWorkspaceSection[];
437
+ readonly section: ScrollableViewSectionConfig;
438
+ readonly afterSections?: readonly ViewWorkspaceSection[];
433
439
  },
434
440
  ): {
435
- readonly section: PanelWorkspaceSection;
441
+ readonly section: ViewWorkspaceSection;
436
442
  readonly scrollOffset: number;
437
443
  readonly window: VisibleWindow;
438
444
  } {
439
445
  const fixedLines = [...(options.section.fixedLines ?? [])];
440
- const budget = getPanelScrollableSectionBudget(width, height, {
446
+ const budget = getViewScrollableSectionBudget(width, height, {
441
447
  intro: options.intro,
442
448
  footerLines: options.footerLines,
443
449
  palette: options.palette,
@@ -450,7 +456,7 @@ export function resolveScrollablePanelSection(
450
456
  // When a window-summary row will render (list longer than the budget can
451
457
  // show), it occupies one of the section's rows. Reserve that row up front so
452
458
  // the summary is accounted INSIDE the budget; otherwise the appended summary
453
- // pushes total output one line past the panel's exact-height contract and the
459
+ // pushes total output one line past the view's exact-height contract and the
454
460
  // tail line (typically the footer's keyboard-hints row) is silently dropped.
455
461
  const summaryReserved = options.section.appendWindowSummary
456
462
  && options.section.scrollableLines.length > budget
@@ -477,7 +483,7 @@ export function resolveScrollablePanelSection(
477
483
  if (options.section.appendWindowSummary && options.section.scrollableLines.length > window.count) {
478
484
  const summary = options.section.appendWindowSummary.formatter
479
485
  ? options.section.appendWindowSummary.formatter(window)
480
- : buildPanelLine(width, [[` showing ${window.start + 1}-${window.end} of ${window.total}`, options.section.appendWindowSummary.dimColor ?? options.palette.dim]]);
486
+ : buildViewLine(width, [[` showing ${window.start + 1}-${window.end} of ${window.total}`, options.section.appendWindowSummary.dimColor ?? options.palette.dim]]);
481
487
  lines.push(summary);
482
488
  }
483
489
  return {
@@ -496,20 +502,20 @@ export function resolveStackedScrollableSections(
496
502
  options: {
497
503
  readonly intro?: string;
498
504
  readonly footerLines?: readonly Line[];
499
- readonly palette: PanelPalette;
500
- readonly beforeSections?: readonly PanelWorkspaceSection[];
501
- readonly sections: readonly StackedScrollablePanelSectionConfig[];
502
- readonly afterSections?: readonly PanelWorkspaceSection[];
505
+ readonly palette: ViewPalette;
506
+ readonly beforeSections?: readonly ViewWorkspaceSection[];
507
+ readonly sections: readonly StackedScrollableViewSectionConfig[];
508
+ readonly afterSections?: readonly ViewWorkspaceSection[];
503
509
  },
504
510
  ): ReadonlyArray<{
505
- readonly section: PanelWorkspaceSection;
511
+ readonly section: ViewWorkspaceSection;
506
512
  readonly scrollOffset: number;
507
513
  readonly window: VisibleWindow;
508
514
  }> {
509
515
  if (options.sections.length === 0) return [];
510
- const contentBudget = getPanelWorkspaceContentBudget(width, height, options);
511
- const beforeRows = (options.beforeSections ?? []).reduce((sum, section) => sum + getPanelWorkspaceSectionRows(section), 0);
512
- const afterRows = (options.afterSections ?? []).reduce((sum, section) => sum + getPanelWorkspaceSectionRows(section), 0);
516
+ const contentBudget = getViewWorkspaceContentBudget(width, height, options);
517
+ const beforeRows = (options.beforeSections ?? []).reduce((sum, section) => sum + getViewWorkspaceSectionRows(section), 0);
518
+ const afterRows = (options.afterSections ?? []).reduce((sum, section) => sum + getViewWorkspaceSectionRows(section), 0);
513
519
  const fixedChrome = options.sections.reduce((sum, section) => (
514
520
  sum
515
521
  + (section.title ? 1 : 0)
@@ -539,7 +545,7 @@ export function resolveStackedScrollableSections(
539
545
 
540
546
  return options.sections.map((section, index) => {
541
547
  const fixedLines = [...(section.fixedLines ?? [])];
542
- // Same reservation as resolveScrollablePanelSection: a window-summary row
548
+ // Same reservation as resolveScrollableViewSection: a window-summary row
543
549
  // occupies one of this section's allocated rows, so shrink the visible
544
550
  // window rather than overflowing the stack's exact-height budget.
545
551
  const budget = budgets[index]!;
@@ -564,7 +570,7 @@ export function resolveStackedScrollableSections(
564
570
  if (section.appendWindowSummary && section.scrollableLines.length > window.count) {
565
571
  const summary = section.appendWindowSummary.formatter
566
572
  ? section.appendWindowSummary.formatter(window)
567
- : buildPanelLine(width, [[` showing ${window.start + 1}-${window.end} of ${window.total}`, section.appendWindowSummary.dimColor ?? options.palette.dim]]);
573
+ : buildViewLine(width, [[` showing ${window.start + 1}-${window.end} of ${window.total}`, section.appendWindowSummary.dimColor ?? options.palette.dim]]);
568
574
  lines.push(summary);
569
575
  }
570
576
  return {
@@ -579,13 +585,13 @@ export function resolveStackedScrollableSections(
579
585
  }
580
586
 
581
587
  /**
582
- * Standardized footer keyboard-hint row so every panel's hints look identical.
588
+ * Standardized footer keyboard-hint row so every view's hints look identical.
583
589
  * Each hint renders as `keys` (info color) + `label` (dim).
584
590
  */
585
591
  export function buildKeyboardHints(
586
592
  width: number,
587
593
  hints: ReadonlyArray<{ keys: string; label: string }>,
588
- palette: PanelPalette,
594
+ palette: ViewPalette,
589
595
  ): Line {
590
596
  const segments: Array<[string, string, string?]> = [];
591
597
  hints.forEach((hint, i) => {
@@ -595,21 +601,21 @@ export function buildKeyboardHints(
595
601
  segments.push([' ', palette.dim]);
596
602
  segments.push([hint.label, palette.dim]);
597
603
  });
598
- return buildPanelLine(width, segments);
604
+ return buildViewLine(width, segments);
599
605
  }
600
606
 
601
- export function buildPanelWorkspace(
607
+ export function buildViewWorkspace(
602
608
  width: number,
603
609
  height: number,
604
- config: PanelWorkspaceConfig,
610
+ config: ViewWorkspaceConfig,
605
611
  ): Line[] {
606
612
  const lines: Line[] = [];
607
- lines.push(buildPanelTitle(width, config.title, config.palette));
613
+ lines.push(buildViewTitle(width, config.title, config.palette));
608
614
  if (config.intro) {
609
615
  lines.push(...buildBodyText(width, config.intro, config.palette, config.palette.dim));
610
616
  }
611
617
  const footerLines = [...(config.footerLines ?? [])];
612
- const contentBudget = getPanelWorkspaceContentBudget(width, height, config);
618
+ const contentBudget = getViewWorkspaceContentBudget(width, height, config);
613
619
 
614
620
  let consumed = 0;
615
621
  for (let sectionIndex = 0; sectionIndex < config.sections.length; sectionIndex++) {
@@ -1,11 +1,11 @@
1
1
  import type { ProjectPlanningQuestion } from '@pellux/goodvibes-sdk/platform/knowledge';
2
2
 
3
3
  // ---------------------------------------------------------------------------
4
- // Answer-action helpers for the Project Planning panel.
4
+ // Answer-action helpers for the Project Planning view.
5
5
  //
6
- // Extracted from project-planning-panel.ts to keep that module under the
6
+ // Extracted from the project planning view to keep that module under the
7
7
  // architecture line-count cap. Leaf module (only the SDK question type);
8
- // the panel is their public import site.
8
+ // the project planning view is their public import site.
9
9
  // ---------------------------------------------------------------------------
10
10
 
11
11
  export interface PlanningAnswerAction {
@@ -2,19 +2,19 @@
2
2
  // provider-health-routes.ts
3
3
  //
4
4
  // Single-source auth-route posture for the provider console (merge of
5
- // the retired accounts panel into provider-health). All route data flows from
5
+ // the retired accounts view into provider-health). All route data flows from
6
6
  // ProviderRuntimeInspectionQuery.inspectAll() snapshots; this module only
7
7
  // normalizes descriptors (synthesizing them for providers that do not declare
8
8
  // routes) and derives the active/preferred route, freshness, issues, and
9
- // repair hints. It intentionally keeps the full descriptor list so the panel
10
- // can render per-route detail (absorbed from the accounts panel) instead of a
9
+ // repair hints. It intentionally keeps the full descriptor list so the provider-health modal
10
+ // can render per-route detail (absorbed from the accounts view) instead of a
11
11
  // lossy summary record.
12
12
  // ---------------------------------------------------------------------------
13
13
 
14
14
  import type { ProviderAuthRouteDescriptor } from '@pellux/goodvibes-sdk/platform/providers';
15
15
 
16
- export type ProviderPanelAuthRoute = ProviderAuthRouteDescriptor['route'] | 'unconfigured';
17
- export type ProviderPanelAuthFreshness = NonNullable<ProviderAuthRouteDescriptor['freshness']> | 'unconfigured';
16
+ export type ProviderHealthAuthRoute = ProviderAuthRouteDescriptor['route'] | 'unconfigured';
17
+ export type ProviderHealthAuthFreshness = NonNullable<ProviderAuthRouteDescriptor['freshness']> | 'unconfigured';
18
18
 
19
19
  /** Auth metadata shape carried by ProviderRuntimeInspectionQuery snapshots. */
20
20
  export interface ProviderRuntimeAuthMetadata {
@@ -42,10 +42,10 @@ export interface ProviderAccountPosture {
42
42
  readonly modelCount: number;
43
43
  /** Normalized route descriptors (declared or synthesized). */
44
44
  readonly routes: readonly ProviderAuthRouteDescriptor[];
45
- readonly activeRoute: ProviderPanelAuthRoute;
46
- readonly preferredRoute: ProviderPanelAuthRoute;
45
+ readonly activeRoute: ProviderHealthAuthRoute;
46
+ readonly preferredRoute: ProviderHealthAuthRoute;
47
47
  readonly activeRouteReason: string;
48
- readonly authFreshness: ProviderPanelAuthFreshness;
48
+ readonly authFreshness: ProviderHealthAuthFreshness;
49
49
  /** True when any route is expiring (or already expired/pending). */
50
50
  readonly expiringSoon: boolean;
51
51
  readonly issues: readonly string[];
@@ -53,7 +53,7 @@ export interface ProviderAccountPosture {
53
53
  readonly repairHints: readonly string[];
54
54
  }
55
55
 
56
- const AUTH_ROUTE_PRIORITY: readonly ProviderPanelAuthRoute[] = [
56
+ const AUTH_ROUTE_PRIORITY: readonly ProviderHealthAuthRoute[] = [
57
57
  'subscription-oauth',
58
58
  'service-oauth',
59
59
  'secret-ref',
@@ -63,7 +63,7 @@ const AUTH_ROUTE_PRIORITY: readonly ProviderPanelAuthRoute[] = [
63
63
  'unconfigured',
64
64
  ] as const;
65
65
 
66
- export function routePriority(route: ProviderPanelAuthRoute): number {
66
+ export function routePriority(route: ProviderHealthAuthRoute): number {
67
67
  const priority = AUTH_ROUTE_PRIORITY.indexOf(route);
68
68
  return priority >= 0 ? priority : AUTH_ROUTE_PRIORITY.length;
69
69
  }
@@ -137,7 +137,7 @@ function pickRoute(
137
137
  /**
138
138
  * Derive the console's account/auth posture for one inspectAll() snapshot.
139
139
  * This is the only route-posture derivation in the TUI (the retired accounts
140
- * panel's parallel snapshot model was deleted with).
140
+ * view's parallel snapshot model was deleted with).
141
141
  */
142
142
  export function buildAccountPosture(snapshot: ProviderRuntimeSnapshotLike): ProviderAccountPosture {
143
143
  const auth = snapshot.runtime.auth;
@@ -146,9 +146,9 @@ export function buildAccountPosture(snapshot: ProviderRuntimeSnapshotLike): Prov
146
146
  const usableRoutes = routes.filter(isRouteUsable);
147
147
  const preferredRoute = pickRoute(configuredRoutes.length > 0 ? configuredRoutes : routes);
148
148
  const activeRoute = pickRoute(usableRoutes.length > 0 ? usableRoutes : (preferredRoute ? [preferredRoute] : []));
149
- const activeRouteId: ProviderPanelAuthRoute = activeRoute?.route ?? 'unconfigured';
150
- const preferredRouteId: ProviderPanelAuthRoute = preferredRoute?.route ?? activeRouteId;
151
- const authFreshness: ProviderPanelAuthFreshness =
149
+ const activeRouteId: ProviderHealthAuthRoute = activeRoute?.route ?? 'unconfigured';
150
+ const preferredRouteId: ProviderHealthAuthRoute = preferredRoute?.route ?? activeRouteId;
151
+ const authFreshness: ProviderHealthAuthFreshness =
152
152
  activeRoute?.freshness ?? (activeRouteId === 'none' ? 'healthy' : 'unconfigured');
153
153
 
154
154
  const issueSet = new Set<string>();
@@ -1,11 +1,11 @@
1
1
  import { isTextBackspace } from '../input/delete-key-policy.ts';
2
2
 
3
- export type PanelSearchFocusTransition = 'focus-search' | 'focus-list' | null;
3
+ export type ViewSearchFocusTransition = 'focus-search' | 'focus-list' | null;
4
4
 
5
- export function getPanelSearchFocusTransition(
5
+ export function getViewSearchFocusTransition(
6
6
  key: string,
7
7
  options: { selectedIndex: number; itemCount: number; focusKeys?: ReadonlyArray<string> },
8
- ): PanelSearchFocusTransition {
8
+ ): ViewSearchFocusTransition {
9
9
  const focusKeys = options.focusKeys ?? ['/'];
10
10
  if (focusKeys.includes(key)) return 'focus-search';
11
11
  if (key === 'up' && options.selectedIndex <= 0) {
@@ -17,22 +17,22 @@ export function getPanelSearchFocusTransition(
17
17
  return null;
18
18
  }
19
19
 
20
- // Panel search filters are end-anchored (no moveable cursor).
20
+ // View search filters are end-anchored (no moveable cursor).
21
21
  // Per the delete-key policy (src/input/delete-key-policy.ts):
22
22
  // 'backspace' removes the last character.
23
23
  // 'delete' is a no-op, there is no cursor, so forward-delete is meaningless.
24
- export function isPanelSearchBackspace(key: string): boolean {
24
+ export function isViewSearchBackspace(key: string): boolean {
25
25
  return isTextBackspace(key);
26
26
  }
27
27
 
28
- export function isPanelSearchCancel(key: string): boolean {
28
+ export function isViewSearchCancel(key: string): boolean {
29
29
  return key === 'escape';
30
30
  }
31
31
 
32
- export function isPanelSearchCommit(key: string): boolean {
32
+ export function isViewSearchCommit(key: string): boolean {
33
33
  return key === 'return' || key === 'enter';
34
34
  }
35
35
 
36
- export function isPanelSearchPrintable(key: string): boolean {
36
+ export function isViewSearchPrintable(key: string): boolean {
37
37
  return key.length === 1 && key >= ' ';
38
38
  }