Commit Graph

2979 Commits

Author SHA1 Message Date
imccyu
6512e57047 feat(gui): dsh-client-hmr reload driver and the dshClient-discovered watch-build script
client-hmr is a normal plugin package composed into dev graphs only. It
listens on /plugins/events and reloads one plugin per rebuilt frame,
serialized: invalidate, prefetch (fresh factory registers while the old
fiber still serves), registry.delete before touching the fiber, drain
disposers, drop owned style tags, entry.refresh(), fiber.await() loud.
Dependency cascade costs zero client code — fiber activation epochs
re-load dependents through cordis itself. Reload is coarse by design;
no rollback in v1; self-reload works with a frame gap the next rebuild
heals.

scripts/dev-web.ts (pnpm run dev:web) is the convenience watch-build:
it discovers its package list by scanning packages/*/*/package.json for
dshClient platform "web" at startup — no hardcoded roster — and talks
no protocol to the host. Gate bookkeeping rides along: knip entries for
the new packages, README model-experience allowlist rows.
2026-07-24 02:09:42 +08:00
imccyu
fb47f61a83 refactor(gui): host graph from dshClient discovery; webserver self-watches bundles for HMR
The registry scans mounted Loader entries' dshClient declarations and
composes __DSH_BOOT__ {rev, entries} — inject edges and the immediately
mark come from manifests, never hand-copied; malformed fields fail loud
at load. The composing app owns one flat roster plus the --dev switch
(hmr row and bundle watching are dev-graph decisions).

The rebuild signal is the webserver's own observation: in dev mode the
registry stat-polls each scanned bundle (fs.watchFile; polling because
network mounts deliver no inotify), re-hashes on change, and broadcasts
a rebuilt frame on the /plugins/events SSE channel only when the rev
actually changed. Watch membership follows the table across rescans;
dispose drops all watches; a torn read self-heals on the next tick.
The POST /plugins/rebuilt endpoint is gone — builders and the host
share zero protocol. dsh web --dev logs the watched bundle list and
each rebuilt id with its rev transition.
2026-07-24 02:09:42 +08:00
imccyu
c2e0c16d6a refactor(gui): one plugin-package shape — dshClient manifests, clientBundle preset, purity gate over all nine
Every client plugin package carries dshClient ({platform, inject,
immediately?}) and emits lib/client.js through the shared clientBundle
preset; exports["./client"] points at the bundle. The infrastructure
tier (connection, runtime, ui-theme, i18n, hmr) declares immediately: true
in its manifest — absent means lazy. The bundle purity gate covers all
nine packages: platform modules stay external, INLINE_SAFE wire layers
inline, any other cross-plugin value import is a build error. Migrations
that rule forced: scopeOf became a SessionsService method and
transportError moved into dsh-host-apiproxy's wire layer; the store
engine stays in runtime under a documented temporary exemption
(TODO(webload/store-rehome)).
2026-07-24 02:09:42 +08:00
imccyu
b58f0989f9 refactor(gui): rebuild the client loading kernel as dsh-client-modules with a two-phase boot
The module system moves out of dsh-client-runtime (./loader retired) into
its own package: a lazy CJS table where executing a bundle only registers
its factory and materialization happens at first require, memoized, with
recursive requires self-ordering. ClientModuleSystem is a class; index.ts
keeps the types and a thin factory. Boot is two-phase: phase one prefetches
the immediately tier in parallel (registration only, failures deferred to
phase two's loud import); phase two mounts the vendored Loader with the
module system as internal, creates one entry per graph row plus the
app-shell pseudo-row the kernel appends itself, and settles on an
all-ACTIVE sweep. The shell kernel is self-sufficient: hand-rolled
loader-status stores, no plugin value imports, platform seed list single-
sourced in platform.ts.
2026-07-24 02:09:42 +08:00
imccyu
75d37654cb fix(gui): address review — stale smoke case, tooltip trigger overlap, collapse contract docs
- The real-browser collapse smoke tracked the old chrome: visible HARNESS
  text (the wordmark svg is aria-hidden now), an 'Expand sidebar' label
  (renamed 'Open sidebar'), a 300px settle (default is 280), and an
  immediate focus assert (rail search defers focus past the slide). The
  case now tracks the brand span, polls the deferred focus, and uses the
  current labels and width.
- Tooltip treated hover and focus as one trigger: leaving with the mouse
  dropped the bubble of a still-focused anchor (and vice versa). The two
  triggers are tracked independently; the bubble hides only after both
  clear. Spec pins both orders.
- The ui-sidebar README and the bilingual collapse note still described
  the retired geometry morph; both now state the slide + crossfade
  contract, the fixed-width (never-conceding) sidebar, and the rail's
  whale-mark/tooltip chrome.
2026-07-24 01:30:01 +08:00
imccyu
9dbe11d647 Merge remote-tracking branch 'origin/master' into worktree/fix-ui-polish 2026-07-24 01:12:29 +08:00
Tianyi Cui
f27f8f6162 Merge commit 'refs/codex-unblock/20260723/pr570-master-initial' into worktree/pr570-merge-master-20260723
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-18-shared-persistence-write-coordinator.md
#	docs/core-data-structures/persistence.md
#	packages/session-persistence/session-persistence/README.md
2026-07-23 23:21:08 +08:00
Tianyi Cui
7a09ca8cd2 Merge remote-tracking branch 'origin/master' into worktree/pr540-merge-master-20260723 2026-07-23 22:34:49 +08:00
Tianyi Cui
9fdbae66e7 Merge remote-tracking branch 'origin/master' into worktree/pr576-merge-master-20260723 2026-07-23 22:18:30 +08:00
Tianyi Cui
c688aa486c Merge remote-tracking branch 'origin/master' into worktree/remove-expose-internals 2026-07-23 22:08:44 +08:00
Tianyi Cui
ce232f8e28 Merge remote-tracking branch 'origin/master' into worktree/web-session-titles 2026-07-23 22:07:31 +08:00
Tianyi Cui
85335acd10 Merge remote-tracking branch 'origin/master' into worktree/web-session-titles 2026-07-23 22:00:59 +08:00
Tianyi Cui
404da65595 Merge branch 'master' into worktree/web-session-titles
# Conflicts:
#	apps/web/tests/smoke-real.e2e.ts
#	packages/client/connection/tests/fixture.spec.ts
#	packages/host/runtime/README.md
#	packages/host/runtime/src/api-proxy.ts
2026-07-23 22:00:17 +08:00
Hypatia May
00191e75dd Merge remote-tracking branch 'origin/master' into session-query-search 2026-07-23 21:55:59 +08:00
Tianyi Cui
64eebc1b35 Merge branch 'master' into codex/plan-mode-active-exit 2026-07-23 21:52:23 +08:00
Hypatia May
712c84f06f fix(session-query): validate before service registration 2026-07-23 21:48:12 +08:00
fz
5e8943fd1c fix(plan): make direct exit discoverable 2026-07-23 21:34:40 +08:00
Hypatia May
72fdf57c00 Merge remote-tracking branch 'origin/session-query-search' into session-query-search 2026-07-23 21:34:23 +08:00
Hypatia May
9482affc48 fix(session-query): make persisted observation non-mutating 2026-07-23 21:33:28 +08:00
_Kerman
c596dddfe1 fix: return stored metadata from live loads 2026-07-23 21:28:52 +08:00
Tianyi Cui
f9120a944c Merge master into session-query-search 2026-07-23 21:18:05 +08:00
Hypatia May
c1fa985c20 Merge remote-tracking branch 'origin/master' into session-query-search
# Conflicts:
#	docs/architecture.i18n.yaml
#	packages/client/ui-sidebar/tests/sidebar-root.spec.tsx
#	packages/session-persistence/session-persistence-jsonl/src/index.ts
#	packages/session-persistence/session-persistence/README.md
2026-07-23 21:13:29 +08:00
Tianyi Cui
bd04f759a0 Merge master into worktree/pty-review-fixes 2026-07-23 21:09:10 +08:00
fz
8e4f666238 feat(plan): add direct plan exit command 2026-07-23 21:06:03 +08:00
Tianyi Cui
b7ae34b67c test(tool-tasks): cover bounded output rendering 2026-07-23 21:04:26 +08:00
_Kerman
4e5166828b fix: reserve cold loads across repair 2026-07-23 20:58:20 +08:00
Tianyi Cui
0fb6a2540c Merge commit 'fc123040d824069a679a52bac84b2e3554589436' into worktree/pty-review-fixes 2026-07-23 20:52:05 +08:00
Tianyi Cui
ea019beae9 Merge branch 'master' into worktree/web-session-titles 2026-07-23 20:51:17 +08:00
Tianyi Cui
26bfd37da0 Merge commit 'refs/codex-unblock/20260723/master' into worktree/pty-review-fixes
# Conflicts:
#	.agents/notes/implemented/feature/2026-06-30-interception-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/tools/README.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/src/schema.ts
#	packages/core/tools/tests/tools.spec.ts
#	packages/pty/tool-pty/README.md
#	packages/pty/tool-pty/src/index.ts
#	packages/pty/tool-pty/src/render.ts
#	packages/tasks/tool-tasks/README.md
#	packages/tasks/tool-tasks/src/index.ts
2026-07-23 20:50:45 +08:00
Tianyi Cui
d1f9230384 Merge branch 'master' into worktree/remove-expose-internals 2026-07-23 20:50:38 +08:00
Hypatia May
d24a875c5d fix(session-query): protect live reconciliation 2026-07-23 20:50:29 +08:00
imccyu
8f54ccae7f Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question 2026-07-23 20:36:20 +08:00
Tianyi Cui
eb0cc4eb18 refactor: drop obsolete expose-internals flag 2026-07-23 20:35:09 +08:00
Hypatia May
1c6d26c44d fix(session-query): fail mount when index open fails 2026-07-23 20:32:51 +08:00
_Kerman
816907ba2d Merge remote-tracking branch 'origin/master' into refactor/eager-session-persistence
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-18-shared-persistence-write-coordinator.md
#	packages/session-persistence/session-persistence-jsonl/README.md
#	packages/session-persistence/session-persistence/src/coordinator.ts
#	packages/session-persistence/session-persistence/tests/persistence.spec.ts
2026-07-23 20:32:19 +08:00
imccyu
850cbe912d fix(gui): cap the question card height and scroll the option list
The composer seat lives in a fixed-height conversation column with
overflow hidden, so a long question batch pushed the footer actions out
of reach (review r3635427112). The card now flexes with a viewport-
relative max-height, the option list is the scrollable region (ChatView
list pattern: min-height 0 + overflow-y auto), and header/footer are
flex-shrink 0 so progress, navigation, skip, submit, and cancel stay
reachable.

Verified in headless chromium against this sheet (900x600 viewport,
30-option batch): card capped at 360px (60vh), the option list scrolls
(scrollHeight > clientHeight), and the footer submit/skip buttons stay
inside the viewport. jsdom cannot assert layout; the playwright smoke
follow-up tracks composer scrolling with the existing debt.
2026-07-23 20:29:23 +08:00
imccyu
6e94810973 feat(gui): carry the question detail field over the wire and render it
AskUserQuestionItem.detail is part of the user-interaction seam contract
but the web frame schema dropped it and the composer never rendered it
(review r3635427108). askUserQuestionItemSchema now forwards detail, the
composer renders it under the title in the description text style, and
the fixture's multi-select question carries one.
2026-07-23 20:26:48 +08:00
_Kerman
d0e5987c4a fix: serialize persistence ownership selection 2026-07-23 20:24:27 +08:00
imccyu
38af17a2f5 fix(apiproxy): reject empty question batches at the wire boundary
ask() already fails EMPTY_QUESTIONS before a request exists, so a
question/requested frame with zero items is host breakage; muxFrameSchema
now refuses it instead of letting an undefined first question reach the
composer (review r3635427102).
2026-07-23 20:23:54 +08:00
Tianyi Cui
6cb0372d86 Merge remote-tracking branch 'origin/master' into worktree/web-session-titles 2026-07-23 20:19:50 +08:00
imccyu
8930b4f5fb Merge branch 'master' into worktree/web-carrier-chain 2026-07-23 20:19:20 +08:00
Hypatia May
1e457b22e0 refactor(session-query): unify query service 2026-07-23 20:18:05 +08:00
Tianyi Cui
d7c4822f95 Merge origin/master into worktree/web-session-titles
# Conflicts:
#	packages/client/connection/src/client/fixture.ts
2026-07-23 20:12:40 +08:00
Tianyi Cui
a5cb16cc0e Merge master into codex/jsonl-storage-identity 2026-07-23 20:12:26 +08:00
imccyu
0f63666522 Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question 2026-07-23 20:09:11 +08:00
Tianyi Cui
29f293675a fix(host): opt in to model titles from web 2026-07-23 20:08:33 +08:00
Tianyi Cui
41a6a07833 fix(web): reconcile title snapshots on recovery 2026-07-23 20:08:22 +08:00
imccyu
31c2198a98 Merge branch 'master' into worktree/web-carrier-chain 2026-07-23 20:04:03 +08:00
imccyu
a8c6dcb180 fix(gui): contain selector failures and key the chain boundary by entry
Two hardenings on the chain outlet branch:

A throwing chain selector runs before its entry's SlotErrorBoundary
exists, so uncontained it blacked out the whole owner region and skipped
the remaining chain. It now degrades to a decline: reported via
console.error with the registrant identity, later entries still tried,
all-null/all-throw passes land on the owner fallback.

The elected entry's boundary is now keyed by entry identity: an unkeyed
boundary that failed on entry A survived a re-election and kept a
healthy entry B blacked out until the outlet unmounted. The key remounts
the boundary fresh whenever the election changes.
2026-07-23 20:01:04 +08:00
_Kerman
e5d16d5e58 fix: close eager persistence races 2026-07-23 19:55:52 +08:00