pi-crew 0.11.0 → 0.11.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 (73) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +0 -1
  3. package/dist/index.mjs +29936 -29118
  4. package/package.json +1 -1
  5. package/schema.json +10 -0
  6. package/skills/real-test-pi-crew/REPORT-TEMPLATE.md +2 -0
  7. package/skills/real-test-pi-crew/SKILL.md +181 -1
  8. package/src/config/config-validation.ts +0 -2
  9. package/src/config/defaults.ts +0 -1
  10. package/src/config/types.ts +0 -5
  11. package/src/extension/crew-vibes/config.ts +0 -21
  12. package/src/extension/crew-vibes/index.ts +0 -2
  13. package/src/extension/crew-vibes/render.ts +1 -50
  14. package/src/extension/help.ts +0 -2
  15. package/src/extension/register.ts +7 -2
  16. package/src/extension/registration/commands/manage.ts +5 -4
  17. package/src/extension/registration/commands/shared.ts +0 -1
  18. package/src/extension/registration/subagent-tools.ts +16 -6
  19. package/src/extension/registration/team-tool.ts +10 -3
  20. package/src/extension/registration/terminal-status-wiring.ts +172 -0
  21. package/src/extension/registration/viewers.ts +6 -0
  22. package/src/extension/team-tool/handle-settings.ts +14 -2
  23. package/src/runtime/task-display.ts +1 -1
  24. package/src/schema/config-schema.ts +4 -0
  25. package/src/ui/adaptive-card.ts +65 -0
  26. package/src/ui/agents-jobs-browser.ts +70 -64
  27. package/src/ui/card-colors.ts +36 -7
  28. package/src/ui/dashboard-panes/agents-pane.ts +45 -13
  29. package/src/ui/dashboard-panes/cancellation-pane.ts +0 -42
  30. package/src/ui/dashboard-panes/health-pane.ts +7 -5
  31. package/src/ui/dashboard-panes/mailbox-pane.ts +22 -6
  32. package/src/ui/dashboard-panes/metrics-pane.ts +15 -7
  33. package/src/ui/dashboard-panes/pane-theme.ts +21 -0
  34. package/src/ui/dashboard-panes/plan-pane.ts +63 -30
  35. package/src/ui/dashboard-panes/progress-pane.ts +3 -2
  36. package/src/ui/dashboard-panes/schedules-pane.ts +44 -21
  37. package/src/ui/dashboard-panes/transcript-pane.ts +11 -5
  38. package/src/ui/dwf-phase-display.ts +3 -20
  39. package/src/ui/format-helpers.ts +22 -0
  40. package/src/ui/inline-panel/crew-editor.ts +13 -3
  41. package/src/ui/inline-panel/index.ts +60 -4
  42. package/src/ui/keybinding-map.ts +230 -32
  43. package/src/ui/live-conversation-overlay.ts +176 -46
  44. package/src/ui/live-run-sidebar.ts +134 -55
  45. package/src/ui/mascot.ts +32 -16
  46. package/src/ui/overlays/agent-picker-overlay.ts +81 -26
  47. package/src/ui/overlays/confirm-overlay.ts +55 -29
  48. package/src/ui/overlays/help-overlay.ts +108 -53
  49. package/src/ui/overlays/mailbox-compose-overlay.ts +89 -50
  50. package/src/ui/overlays/mailbox-detail-overlay.ts +137 -57
  51. package/src/ui/powerbar-publisher.ts +0 -1
  52. package/src/ui/rail.ts +333 -0
  53. package/src/ui/run-dashboard.ts +95 -74
  54. package/src/ui/settings-overlay.ts +81 -39
  55. package/src/ui/terminal-status.ts +7 -1
  56. package/src/ui/theme-adapter.ts +0 -45
  57. package/src/ui/theme-discovery.ts +12 -6
  58. package/src/ui/tool-progress-formatter.ts +126 -8
  59. package/src/ui/tool-renderers/brief-mode.ts +8 -66
  60. package/src/ui/tool-renderers/index.ts +372 -521
  61. package/src/ui/transcript-viewer.ts +30 -12
  62. package/src/ui/widget/index.ts +32 -52
  63. package/src/ui/widget/task-list.ts +64 -32
  64. package/src/ui/widget/widget-formatters.ts +3 -402
  65. package/src/ui/widget/widget-model.ts +28 -7
  66. package/src/ui/widget/widget-renderer.ts +201 -128
  67. package/src/ui/widget/widget-types.ts +0 -2
  68. package/src/utils/visual.ts +0 -4
  69. package/src/extension/crew-vibes/figures.ts +0 -22
  70. package/src/extension/crew-vibes/font-detect.ts +0 -71
  71. package/src/ui/dynamic-border.ts +0 -35
  72. package/src/ui/loaders.ts +0 -6
  73. package/src/ui/overlay-stack.ts +0 -148
package/CHANGELOG.md CHANGED
@@ -2,6 +2,122 @@
2
2
 
3
3
  > **Note:** `atomic-write-v2.ts` / `AtomicWriter` mentioned in historical entries below was consolidated into `atomic-write.ts` as of v0.9.42. This changelog is preserved as historical record — the migration was completed (the v2 class was never adopted; v1 won on simplicity + symlink-safety + link+unlink atomicity). See `docs/migration/atomic-write-v2-migration.md` for the decision rationale.
4
4
 
5
+ ## [0.11.1] — RAIL: one UI design language for every surface + UI-audit fixes (2026-09-16)
6
+
7
+ ### feat(ui): RAIL — a single visual language for the whole product
8
+
9
+ - **New shared design system.** `src/ui/rail.ts` owns every glyph and helper —
10
+ rail `┏ ┣ ┃ ┗`, the `NAME ▸ SUBJECT` canopy, dot leaders `······`, the
11
+ eighth-block gauge `▕████▎░░▏`, status slot/badge/icon maps, `overflowHint`,
12
+ `formatHint`/`keyToken`, `CURSOR`/`ACTIVE` — and `docs/UI-DESIGN-SYSTEM.md`
13
+ documents the grammar, the seven surface classes and the width contract.
14
+ `src/ui/tool-renderers/index.ts` now imports from it instead of declaring its
15
+ own copies.
16
+ - **Tool card (team + subagent) redesigned**: width-deferred through
17
+ `AdaptiveCard` (a frame built for 116 columns no longer tears at 100), one
18
+ unified identity canopy (`┏ CREW ▸ <team>`, `┏ AGENT ▸ <name>`,
19
+ `┏ LIST`), agent name surfaced while the run is still streaming, fail-visible
20
+ outcome on three levels, `done`/`succeeded` alias handling, merged
21
+ tally+gauge with the elapsed segment right-aligned, and `role/agent`
22
+ duplication collapsed (`verifier/verifier` → `verifier`).
23
+ - **Every other surface migrated**: crew widget (still exactly ONE row:
24
+ `┃ ⠧ CREW ▸ fast-fix · 2 running · 3/5 done · ⏰ 1 sched ···· ↓·enter`, idle row
25
+ `┃ CREW ▸ idle · …`, focused `❯` marker), plan/task list (`┏ PLAN ▸ <title>`),
26
+ live-run sidebar (`┏ LIVE ▸ <runId8>` + `┣ ACTIVE ▸ n`), team dashboard,
27
+ Agents & Jobs browser, settings overlay, transcript viewer, live-conversation
28
+ / help / confirm / mailbox-detail / mailbox-compose / agent-picker overlays,
29
+ dashboard panes and `/team-mascot`. The rounded box `╭─╮│╰─╯├┤` and the inline
30
+ `── label ──` rule are retired (sections are `┣ NAME ▸ x`).
31
+ - **One dialect per concept**: cursor `›`, active/section marker `▸`, overflow
32
+ `▲ n above` / `▼ m below` (was four dialects), hints `keys label · …` with the
33
+ close/cancel action last and canonical key spelling (`Esc`, `Enter`, `Tab`) —
34
+ including an `exactKeys` mode for the case-sensitive plan-approval keyspace
35
+ (`A` approve vs `n` deny).
36
+
37
+ ### fix(ui): bugs found by the audit, the cold-verify pass and live runs
38
+
39
+ - **`undefined — ↓·enter` in the widget after a run finished** — the zero-runs
40
+ branch built its row without checking `schedLine`; with no active runs and no
41
+ schedules it painted the literal `undefined`. It now renders nothing.
42
+ - **No `undefined` can reach a string**: every interpolated field on records read
43
+ from disk (`agents.json`, schedules, metrics) is guarded — role/agent/model
44
+ routing in the sidebar and agent picker, every persisted job field in the
45
+ schedules pane, metric label values, and the settings `Edit` title.
46
+ - `1 tools` → `1 tool` (one `formatCount` helper, five surfaces).
47
+ - Help cheatsheet no longer prints a raw TAB (`keyToken` missed `\t`).
48
+ - `role->agent` → `role▸agent` everywhere, including the producer
49
+ (`task-display.ts`) rather than only at one render boundary.
50
+ - Settings overlay: the edit submenu hint is built by `formatHint` and no longer
51
+ advertises a key that is not bound.
52
+
53
+ ### fix(ui): phantom affordances, schema drift and theme discovery (P0)
54
+
55
+ - **`/team-settings theme <name>` works again**: `theme-discovery.ts` used bare
56
+ `require("node:fs")` inside a module loaded by dynamic import, so discovery
57
+ could fail silently and only the builtin themes were selectable. Now a
58
+ top-level import, with a HOME-sandboxed test (13 themes discovered, active
59
+ theme read from `settings.json`, `setPiTheme()` writes).
60
+ - Removed the phantom `p` (progressToggle) binding/action/help entry, the no-op
61
+ `placement` option, and the non-existent `/team-cleanup` / `/team-health`
62
+ commands from help.
63
+ - Schema/docs drift: `ui.widgetRowStyle`, `ui.inlinePanel`,
64
+ `ui.autoCloseDashboardMs` added to `schema.json` + configuration schema so
65
+ editors stop flagging valid keys; brief-mode command description scoped to
66
+ what it really does; help overlay gained the Schedules and Plan key groups;
67
+ keyboard reference and command docs corrected.
68
+ - `LiveConversationOverlay` gained a real `handleInput` (scroll, auto-scroll
69
+ toggle, close) so its advertised footer keys are reachable.
70
+ - **Terminal status restored**: the documented tab-title + Ghostty `OSC 9;4`
71
+ progress integration is now wired (`installTerminalStatus`) instead of the
72
+ no-op dispose handler; best-effort, debounced, headless-safe.
73
+
74
+ ### chore: dead code removed
75
+
76
+ - Deleted `overlay-stack.ts`, `ui/loaders.ts`, `crew-vibes/figures.ts`,
77
+ `crew-vibes/font-detect.ts`, `dynamic-border.ts` and `boxLine()` plus their
78
+ tests (~1.7k lines net), together with the dead `compactAgentRow` chain.
79
+ - Removed the orphaned `ui.widgetRowStyle` config chain (default, type,
80
+ parser, TypeBox schema, `schema.json`, KNOWN_KEYS, `model.rowStyle` field,
81
+ `WidgetRowStyle` type): the M4 RAIL dock renders exactly one layout, so the
82
+ key had no reader left. The strict schema now rejects it as unknown;
83
+ schema-sync + settings tests pin the removal in both directions so it cannot
84
+ resurface.
85
+
86
+ ### fix(ui): defects found by rendering a REAL team run
87
+
88
+ Rendering the live run `team_20260916110100` through every surface (tool card,
89
+ widget dock, plan card, sidebar, dashboard, agents & jobs browser) exposed seven
90
+ defects the review passes had missed:
91
+
92
+ - **The dock spun forever.** `┃ ⠹ CREW ▸ fast-fix · 0 running · 3/3 done` — a
93
+ spinner with nothing to spin for, because the header always received a braille
94
+ frame. The leading glyph now reflects state (`⠋…` only while a worker is
95
+ running, otherwise `✓`/`✗`); zero counts (`0 running`) are no longer printed.
96
+ - **The dock lost its key hint on a narrow terminal.** At 50 columns the row
97
+ ended in `···· ↓…`; the leader budget now shrinks with the width so the left
98
+ segment is trimmed (with `…`) and `↓·enter` always survives.
99
+ - **The run dashboard truncated the status into `complete…`.** The narrow-width
100
+ fallback clipped `head · meta` as one string, cutting the very token the run
101
+ list exists to show. Meta now yields first, then the goal; the head (run id +
102
+ status) is only clipped if it cannot fit at all.
103
+ - **Sidebar printed an invented `· right default` string** — replaced with the
104
+ run's real `workspaceMode` (`single` / `worktree`).
105
+ - **`fast-fix/fast-fix`** in the sidebar and dashboard — one shared
106
+ `teamWorkflowLabel()` collapses the workflow half when it repeats the team.
107
+ - **Raw usage rows** (`input=2780, output=3715, cacheRead=57216, cost=0.000000,
108
+ turns=0`) — the sidebar now uses the compact `↑2.8k ↓3.7k` form the tool card
109
+ already had (the `key=value` form stays for CLI/status output).
110
+ - **`314.7s` instead of `5m44s`**, `1 runs` instead of `1 run`, `3 agents` /
111
+ `N runs` without pluralisation, and `┃ - none` for empty sections — all
112
+ normalised through `formatDuration` / `formatCount`.
113
+
114
+ ### verification
115
+
116
+ - `test:unit` full suite, `test:critical` (117/117), `test:bundle` (2/2), biome,
117
+ `format:check`, `tsc --noEmit` and bundle size/staleness gates all run on the
118
+ release tree; UI migration verified by an independent verifier rendering real
119
+ surfaces at 40/60/80/100/160 columns.
120
+
5
121
  ## [0.11.0] — Scheduled Jobs UI + Agents & Jobs browser + kitty CSI-u hardening (2026-09-15)
6
122
 
7
123
  ### feat(ui): Agents & Jobs browser — the crew widget's ↓+Enter popup
package/README.md CHANGED
@@ -699,7 +699,6 @@ the `goal` action's completion-guarantee loop to builtin workflows.
699
699
  | Key path | Type | Default | Description |
700
700
  |----------|------|---------|-------------|
701
701
  | `ui.widgetPlacement` | `aboveEditor \| belowEditor \| bottom` | `bottom` | Where the status widget renders. `bottom` docks inside the crew-vibes footer (very bottom of the screen), falling back to `belowEditor` when no footer sink exists. |
702
- | `ui.widgetRowStyle` | `compact \| detailed` | `compact` | Per-agent row layout in the widget (`compact` = one width-budgeted line per agent; `detailed` = two-line tree). |
703
702
  | `ui.inlinePanel` | `boolean` | `true` | Keyboard-navigable agent rows under the prompt (`↓` from an empty prompt). Yields to any extension that owns the editor component. |
704
703
  | `ui.refreshMs` | `number` | `1000` | Internal UI refresh cadence default (not a user-settable `ui.*` schema key — kept here for completeness). |
705
704
  | `ui.widgetDefaultFrameMs` | `number` | `1000` | Internal widget frame-budget default (not a user-settable `ui.*` schema key — kept here for completeness). |