@aiwayds/dsh-opentui 0.9.9 → 0.10.0

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.
package/CHANGELOG.md CHANGED
@@ -249,14 +249,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
249
249
  - **Slash palette prefix shadowing on Enter** — a fully typed `/session` ran the longer `/sessions` prefix row and opened the Resume picker; `interceptSubmit` now resolves an exact-name match first, so highlighted-prefix rows no longer shadow the typed command.
250
250
  - **Plugins panel cache + double solid instance on boot warm** — the plugins panel no longer rebuilds its cache per open, and the boot-warm path no longer spawns a second solid instance.
251
251
 
252
- ## [Unreleased]
252
+ ## [0.10.0] - 2026-11-13
253
253
 
254
254
  ### Changed
255
255
 
256
+ - **`/agents` rides the same panel-kit modal and `PanelStack`.** The eight drill-down levels (table → fields / limits → editors → model and effort pickers → prompt viewer) are eight stack layers, so Esc always pops exactly one layer (inner-first) and the consumer no longer owns an Esc chain. The table paints true multi-column cells (NAME / MODEL / THINK / DEEP / LIMITS) through the kit's columns/cells and pages at 12 rows with cursor-following windows under PgUp/PgDn/Home/End. The letter hotkeys (`m`/`t`/`d`/`v`/`l`) stay on the app's own keymap layer and answer only while the manager's layer is `panels.top`, so composer typing or a kit confirm can never be read as a command; the paged-list keys are gated the same way and only when the list overflows. Partial writes are reported honestly: a model save that lands while the effort half fails keeps the change, names the half that failed, and the exit summary lists the agent instead of claiming "Agents unchanged."; the zero-agent corpus still lands on its single `limits` layer, where Esc closes the manager.
257
+
256
258
  - **PLUGIN MODE CUTOVER — batch C1 flips the dist-host build to the v2 view on the @opentui 0.8.2 node-paint stack.** `build-host.ts`'s v2 recipe (host-entry-v2.tsx, @opentui core/solid/keymap 0.8.2 + solid-js 1.9.17 externals, the 0.8.2-only node frame flush, tui-base's own solid plugin + the `#string-width` node-variant pin + the `./store` client-export route) is now the DEFAULT; `--v2` stays as a no-op alias and the frozen 0.4.3 recipe lives in git history. (1) F1c cold-boot attach stall landed in `host-session.ts`: `storedTranscript("")` now RESOLVES `[]` before touching persistence (cold boot has no session id; `persistence.open("")` rejects `session "" not found` and the v2 hydration loader's catch swallows rejections, so the loader never cleared) — pinned by two unit tests (empty id resolves without opening persistence; a real id still drains, `test/host-session.test.ts`). (2) The published-tarball root manifest (`packages/shell/package.json`) pins the 0.8.2 closure (`@opentui/core|solid|keymap` exact `0.8.2`, `solid-js` exact `1.9.17` — exact, not `^`, so a hoisting install can never drift past the `solid-js@1.9.17` patchedDependencies key), mirroring F1b's smoke workaround. (3) `scripts/solid-js-pin.mjs` generalized to 1.9.17: the patch is mechanically derived from the pristine registry package.json (hunk-context-exact — a hand-transcribed variant failed `ERR_PNPM_PATCH_FAILED`; pnpm's applier is stricter than `git apply`), and unlike the 1.9.12 patch it KEEPS a pinned `"./store"` entry (client store build) because the v2 view imports `solid-js/store` from the profile's copy; `SOLID_JS_EXPORTS` gains the same entry, `ensureSolidPatch` strips stale other-version `solid-js@` patch keys when registering, and `smoke-boot.mjs` imports the export set instead of its hand-copied old shape (which silently dropped `./store` and broke the boot with `ERR_PACKAGE_PATH_NOT_EXPORTED`). (4) Validation: `npm pack` → scratch profile via `install-profile.mjs` (`--dep file:`) — pnpm applies the patch, the direct re-pin reports "already" (patch is primary), hoisted closure `0.8.2 ×3 + solid-js@1.9.17`; `smoke-boot` PASS (real dsh boot, packed tarball renders, no loader hang); plugin-mode tmux 120x34: boot paints, `/model` opens, esc, `/new`, `/quit` clean. Gates ×3: shell 308 pass/3 skip/0 fail, tui-base 102/0, kit 22/0, runtime 5/0; `tsc --noEmit` ×3 — shell 0, kit 0, tui-base 58=58 budget. dist-host rebuilt (v2 entry, 0.8.2 manifest, dsh-llm symlink).
257
259
 
258
260
  ### Added
259
261
 
262
+ - **`packages/panel-kit` — one shared modal kit for interactive panels.** A new private workspace package (`@dsh-opentui/panel-kit`) that replaces the per-screen modal plumbing: `Panel` + `PanelStack` (layered routing, Esc pops exactly one layer), a shared-clock fade transition (enter/exit `FADE_MS`, driven by `onAnimationTick` so no timer runs once it settles, with a static-motion fallback), the controls `List` / `Button` / `Check` / `ConfirmDialog` / `Dropdown` / `InputRow`, true multi-column `columns`/`cells` row painting through wide-glyph-aware cell measuring, and page windows with cursor-following `first-last/total` indicators. Theme is injected once via `PanelKitContext`, and host keys go through `PanelKitProvider` so a panel sees keys only while its layer is `panels.top`. `/settings` and `/agents` are its first two consumers.
263
+
264
+ - **`/settings` opens as a panel-kit modal.** The inline block that ate ~23 transcript rows is gone: the screen is a `PanelStack` layer on the `xlarge` frame (116 cells, clamped to terminal width − 2), with a 160 ms one-shot fade in and out, no mouse path, and Esc walking editor → section → close one level per press. Seven sections: General (12 rows, web fields 1:1 — permission preset, language, appearance, working steps, session log and version are live; font size, link opening, developer tools, performance usage and the three working-step fields carry explicit N/A notes instead of dead controls), the TUI-only group, Host (the four whitelisted host rows, then every other namespace read-only), and the four command-jump sections (Models/Plugins/Agent presets/Account close the panel and dispatch `/model` `/plugins` `/preset` `/login`). Editing is draft-based: every change stages into a draft keyed by write target (so General 外观 and the TUI themeMode row share one staged value), `确定` / `Ctrl+S` commits them in one pass through the existing writers (host writes stay path-ops-only, each followed by a fresh describe with one conflict retry), a dirty Esc opens the kit's destructive discard confirm instead of dropping the buffer, and a failed commit rolls back only the rows it attempted — untouched drafts survive for a retry. Rows per page derive from the live terminal height (`rows − 15`, clamped 4–16): 120×40 shows all 12 General rows on the first screen, 80×24 pages with an `x-y/N` indicator, and PgUp/PgDn/Home/End are consumed only while the section overflows.
265
+
260
266
  - **Turn-end paint-corruption DETECTION infrastructure (Batch B mitigation for the confirmed OpenTUI 0.7.0 engine bug).** A long streaming turn corrupts the native diff-paint state — reply rows bleed into the input box and SIGWINCH does NOT heal it (only a renderer state reset does; 0.8.2 tried and reverted). `packages/shell/src/client/turn-heal.ts` lands the detection half only: `createTurnHeal` wraps the client entry's session surface (same Proxy pattern as `aggregateTurnContext`, real-target accessors), churn-tracks every turn (content deltas + streamed chars + streaming seconds) and schedules exactly ONE deferred heal per threshold trip at turn end (settle delay 1000ms; a newer `turn()` voids a pending heal — never bounce the terminal mid-turn; the settlement `finally` anchor also covers error endings without `onTurnEnd`, idempotent per turn seq). Thresholds `maxChars 2000 / maxDeltas 400 / maxSecs 120` are tuned from the deterministic tear repro (60-sentence weather prompt: ~299 torn frames over ~150s, ~2.7k streamed chars — trips all three; an ordinary short turn ~<500 chars, <30s trips none). The heal ACTION is a deliberate no-op stub via the `heal` factory seam: the cheapest API candidate, `renderer.suspend()` → `resume()` (native terminal transition cycle + forceFullRepaint on resume), was FALSIFIED by the live tear repro (2026-11-05) — the turn froze at end, screen static and torn from the turn-end frame onward, idle placeholder never returned, subsequent input dead (suspend halts the render loop and its native transition never completes in this configuration, so resume is impossible). DO NOT RETRY the suspend/resume bounce. The remaining mechanism, threshold-based renderer recreation at turn end, needs ShellHost state (input buffer, transcript, dock, focus) externalized first — a ShellHost edit would break the dist-host zero-diff gate, so it is out of this batch's scope; the seam makes recreation a one-line swap once that refactor lands. Tests: `test/turn-heal.test.ts` (10 tests — threshold trips per counter, one-heal-per-turn, newer-turn voiding, error-path settlement, heal-factory-null skip, proxy pass-through). 10 tests ride the shell suite (277 ran / 3 skip / 0 fail); dist-host rebuild verified byte-identical (client modules not bundled).
261
267
 
262
268
  - **e2e-sweep hardened to the 68-item gate + a `KNOWN_STALL` annotation.** The sweep's own false-PASS/false-FAIL classes are closed: the `/preset` probe now waits for the picker's real anchors (its dispatch is ASYNC via the host `listPresets` RPC — the old wait returned on a stale `/config` frame whose "minimal" text collided with the marker, then escaped at nothing and the late picker leaked into `/model`: a recorded false-PASS), and the pane settles (stable-frame poll) BEFORE the close esc fires so a late-opening picker is actually up; first-key-drop guards generalize — `submit()`'s verify/clean/retype (now RAW-verified; `flat()` strips the leading `/` and would pass the broken state) plus a new `typeVerified` for raw bursts (a dropped `/` turned `/login` into the plain prompt "login", a REAL turn); a vacuous `/search` anchor is dropped (`search:` matched the `/hotkeys` keybinding row under `flat()`, passing frames where the response row never painted); `settlePane` polls until two consecutive captures agree (digits stripped — the powerline clock ticks every second) instead of fixed sleeps; `ensureIdle` declines a pending ask overlay / disarms a stray stop-confirm before waiting; `cleanBuffer` verifies the idle row and re-sweeps once (full-load render stalls drop BACKSPACES too, leaking half-cleared buffers into the next command). The two render-paint stall items (`palette filter /lo`, `alt+enter newline` — both verified correct in isolation) print as `KNOWN-STALL` in the summary while still COUNTING as failures in the RESULT/exit gate. Validation run (batch D): 65 PASS / 2 KNOWN-STALL / 1 CHECK — the cleanest recorded sweep.
@@ -312,6 +318,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
312
318
 
313
319
  - **Seam: `/reload` never acts on a `booting` placeholder.** With cold-boot mutual exclusion in place (P1#3), the lifecycle lockfile can transiently be a booting claim naming the BOOTER's pid with port 0; `restartSamePortHost` now parses `booting` and refuses with a typed `HostRestartError` (`code: "host-booting"`) instead of SIGTERMing the booting client, and its stale-lock clear step never deletes a rival's placeholder. Tested in `test/remote-btw-restart.test.ts` (booter pid stays alive, placeholder untouched).
314
320
 
321
+ - **panel-kit List: the cursor can no longer leave the painted page window.** With `pageSize` set, up/down moved only `activeId` and never the page index, so the active row left the visible window while Enter still opened the invisible row (review P0-3 / P1-2). The window now follows the cursor: when `activeId` moves outside the current page — up/down, Home/End, a controlled `activeId` change, or a filter reshuffle — the page index and the `first-last/total` indicator move to that row's page. PgUp/PgDn still page, and after the jump the cursor is clamped into the new page (first row forward, last row back) so a page is never painted without a visible active row. Empty lists, single rows, exactly-one-page lists and an `activeId` filtered out by the query stay safe (no page past the data, no throw); keys are still consumed only while the list exceeds one page. Contract updated in `contracts.ts`, pinned by `test/list-cursor-page.test.tsx` (15 tests). No scroll container, no render-structure change, no new dependencies.
322
+
323
+ - **One `@opentui` engine copy per process.** The workspace declared three different `@opentui/core` versions (shell 0.8.2, tui-base/panel-kit 0.8.1, runtime 0.7.0) and two `solid-js` versions (1.9.17 and 1.9.12), so one process could load three engine runtimes and two reactive runtimes — shared registries and reactive roots then split silently. Every package is now pinned to `@opentui/core|solid` 0.8.1 (shell's `keymap` too) with `solid-js` 1.9.17, and `import.meta.resolve("@opentui/core")` from all four packages lands on the same `.pnpm/@opentui+core@0.8.1...` path. 0.8.2 was not used because tui-base's `skin code-block forms > streaming increments keep the wrapper stable` fails on it.
324
+
315
325
  ## [0.5.0] - 2026-11-04
316
326
 
317
327
  ### Added