Commit Graph

63 Commits

Author SHA1 Message Date
Turtle
d5f88f1221 Merge remote-tracking branch 'origin/master' into feat/send-unify
# Conflicts:
#	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/pty/pty-local/tests/index.spec.ts
#	packages/session-query/session-query/tests/tracing.spec.ts
2026-07-23 22:41:45 +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
Turtle
a3ad5241ba Merge remote-tracking branch 'origin/master' into feat/send-unify
# Conflicts:
#	docs/persistence-catalog.md
#	examples/acp-agent/tests/snapshots/code-mode-workspace-context/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/context/time-context/tests/time-context.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
2026-07-23 20:54:48 +08:00
Tianyi Cui
ea019beae9 Merge branch 'master' into worktree/web-session-titles 2026-07-23 20:51:17 +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
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
imccyu
0f63666522 Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question 2026-07-23 20:09:11 +08:00
Tianyi Cui
41a6a07833 fix(web): reconcile title snapshots on recovery 2026-07-23 20:08:22 +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
imccyu
3f6158f2c6 Merge branch 'master' into worktree/web-carrier-chain 2026-07-23 19:46:13 +08:00
imccyu
afd7eb0dcf fix(gui): drop the impossible slots-undefined guard in the ui-question plugin
ClientContext types ctx.slots as always present (inject-declared service);
the unnecessary-condition lint rule rejects the dead guard and its
fail-loud test premise. Load-order failure still surfaces loud through
the undeclared-slot registration path, covered by the remaining case.
2026-07-23 19:45:02 +08:00
Yichen Jiang
d8051f82f6 test(client): cover Markdown fixture reply 2026-07-23 19:29:23 +08:00
Yichen Jiang
6f624c67c4 feat(web): render assistant Markdown 2026-07-23 19:18:05 +08:00
Turtle
44fd93fd06 feat(agent): unify send(target × wakeup), coalesce context/message into user/message
Replace send/steer/inject with one Agent.send primitive over the
(target × wakeup) matrix; followup/steer/inject become fixed-preset
alias methods on the now-abstract Agent class. Coalesce context/message
into user/message (injected context is a non-user source). Replace
agent/queued with agent/inbox/enqueue/dequeue/discard, add cancel
keepInbox, and add a FIFO-conservation invariant.
2026-07-23 19:15:45 +08:00
imccyu
34f0536cfe Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question 2026-07-23 18:56:20 +08:00
imccyu
2b06aa0102 Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question
Restack the ask-user domain layer onto the carrier-chain architecture
branch. Conflict policy: runtime and ui-conversation take the
carrier-chain side (master sessions shape, dual-kind PendingCard,
'internal' envelope shell tests); the 'cancelled' wire code and its
semantics tests stay in apiproxy + ui-question (domain layer); the
smoke fixture keeps the nine-bundle success pass with the resident
question round over the carrier-chain first-describe shape.
2026-07-23 18:50:30 +08:00
Tianyi Cui
d2dc618e3f Merge remote-tracking branch 'origin/master' into worktree/web-session-titles
# Conflicts:
#	.agents/notes/implemented/process/2026-07-20-gui-testing-system.i18n.yaml
#	packages/client/ui-conversation/tests/apply-inject.spec.tsx
#	packages/client/ui-conversation/tests/chat-stats-bash-sample.spec.tsx
#	packages/client/ui-conversation/tests/gate-branch-tails.spec.tsx
#	packages/client/ui-conversation/tests/selection-survival.spec.ts
#	packages/client/ui-conversation/tests/skeleton-branches.spec.tsx
#	packages/client/ui-conversation/tests/skeleton.spec.tsx
#	packages/client/ui-layout/tests/service.spec.ts
#	packages/client/ui-sidebar/tests/apply.spec.tsx
#	packages/client/ui-sidebar/tests/store.spec.ts
#	packages/client/ui-trajectory/tests/views.spec.tsx
#	packages/client/web/src/app.tsx
#	packages/client/web/tests/boot.spec.tsx
#	packages/host/runtime/README.md
#	packages/host/runtime/tests/host-runtime.spec.ts
2026-07-23 18:39:48 +08:00
imccyu
39a60c0215 style(gui): shorten the ConversationSlotProps doc line for the lint gate 2026-07-23 18:33:33 +08:00
imccyu
c18be97f17 refactor(gui): route the composer chain on PendingWait currency 2026-07-23 18:18:52 +08:00
imccyu
408cdf7436 refactor(gui): mint kind-agnostic PendingWait carriers for pending interactions 2026-07-23 18:11:21 +08:00
imccyu
3826b50b4a feat(gui): chain slot kind with select routing and renderSlotChain 2026-07-23 18:03:44 +08:00
imccyu
bbde18caff refactor(gui): dissolve the tool ring into per-view keyed slots
Four rounds of structural rework on the conversation surface, converging
on one registration model for the whole client:

- Review fixes: open() leaves the inject factory (SessionsService owns
  the semantic); ConversationService mounts via ctx.plugin(); the
  bespoke view registry retires into the 'conversation.view' list slot.
- Ring alignment: createChatView factory retired (components get
  everything through checkable shares at the register call site); the
  hand-rolled t/i18n threading is deleted wholesale — a future
  framework-level i18n will supply t as a standard prop keyed by slot
  name, so no interim manual channel.
- Toolview dissolution: ToolViewRegistry / ToolViewResolver /
  ToolViewOutlet / ctx.toolviews retire. Tool rows are entries of the
  'conversation.chat.toolview' keyed slot (scope: session) declared by
  the chat entry; ToolRowOwnerProps is the unified owner payload;
  GenericToolCard becomes the call-site fallback; registrants are plain
  plugins (inject ['slots','conversation'] as the load-order seam);
  session-dimension dispatch moves into components (useSessions reads
  parentId); trajectory/waterfall gain same-shape slots the day they
  render tool rows (RendersCheck rejects empty declarations). Slot
  names mirror the composition path (<domain>.<entry>.<hole>).
- Staging follows current: cell()/binding() are pure resolution
  (render-safe); the constructor subscribes to the list store and
  followCurrent opens the event window when the current session
  changes — staging IS the open signal, business verbs are the timing,
  React render/commit is decoupled from window lifecycle. A masked
  current (projection gap) keeps the stage untouched so deferred
  teardown semantics survive reconnects.

Agent Note: .agents/notes/implemented/architecture/
2026-07-23-toolview-dissolution.md (bilingual pair) records the
decision, the four rejected alternatives, and the accepted semantic
changes; the web client architecture note and packages/client/AGENTS.md
carry the current-state narrative.

Verified: typecheck 0, duplication 0 clones (478 files), full coverage
run 6190 passed with zero threshold errors, knip 0, doc-sync 24/24,
client aggregate tsc 0, render-count checks (one commit per chunk, zero
row re-renders under streaming) green.
2026-07-23 17:49:47 +08:00
imccyu
07bdfbce9b refactor(gui): route the composer chain on PendingWait currency 2026-07-23 17:23:17 +08:00
imccyu
de36006956 refactor(gui): mint kind-agnostic PendingWait carriers for pending interactions 2026-07-23 17:20:46 +08:00
imccyu
58cdc21431 feat(gui): chain slot kind with select routing and renderSlotChain 2026-07-23 17:19:59 +08:00
imccyu
62b62ac9d5 Merge remote-tracking branch 'origin/master' into codex/gui-context-polish
# Conflicts:
#	apps/web/tests/smoke-fixture.e2e.ts
2026-07-23 15:03:26 +08:00
Dudu-0223
0301b7fda8 feat(gui): add write tool row variant 2026-07-23 14:46:07 +08:00
Dudu-0223
aee859841b test(gui): cover edit tool row 2026-07-23 14:38:27 +08:00
Tianyi Cui
c5ebcef8af test(ui-sidebar): cover expanded search control 2026-07-23 14:30:43 +08:00
imccyu
1210735959 refactor(gui): rework ui-question to the terminal slot standard
Contract face moves to contract/slots.ts (PropsRuntime composition off the
conversation SlotMap entry, flat answer/cancel injected share); apply takes
the ui-sidebar terminal form (strict need() service reads, ctx.effect-wrapped
single register, framework-resolved sessionId); tests upgrade to the terminal
style (props-direct component specs with standard-kit stubs, real-registry
apply spec with children-declared slot, fiber-teardown case).
2026-07-23 14:23:10 +08:00
Dudu-0223
d7d8650600 fix(gui): expand thinking rows on click 2026-07-23 14:11:25 +08:00
Dudu-0223
691efb0025 feat(gui): add 'edit' variant for tool row, showing as 'Edit · path' like Read
- Add 'edit' to ToolRowVariant type and TOOL_VARIANTS mapping
- Add 'edit' title and summary key preference (path/file_path)
- Add IconEditOutline16 as the leading icon for edit variant
2026-07-23 14:11:25 +08:00
imccyu
61dc4b6b99 Merge remote-tracking branch 'origin/master' into worktree/web-ask-user-question 2026-07-23 14:05:08 +08:00
Tianyi Cui
c79b34bda5 Revert "chore: run primary CI before push" 2026-07-23 14:02:58 +08:00
imccyu
d430744dd8 Merge branch 'master' into worktree/fix-collapsed-sidebar-rail 2026-07-23 13:45:14 +08:00
imccyu
dd7d198c0d Revert "fix(gui): keep the label fade and pin the rail icons to one axis"
This reverts commit a4ae2f6c21c1eeed2495481a55a39762f4e64ccb.
2026-07-23 13:37:54 +08:00
imccyu
f062ba8fcd fix(gui): keep the label fade and pin the rail icons to one axis
Two polish defects from the headless verification pass:

- .newSessionLabel/.footLabel declared their own transition shorthand,
  which replaced .wide's opacity fade entirely (shorthands do not merge) —
  the labels vanished instantly while everything else faded. The fade is
  restated alongside max-width.
- The rail icons drifted off a common vertical axis: the 56px track holds
  a 55px content box (1px column border), and the capsule rows kept their
  1px border-width in the collapsed state, shaving their content to 23px
  and pushing the search icon 2px right. Collapsed capsules now zero the
  border-width (transitioning border, not border-color), the root gives
  back the border pixel via asymmetric padding, and every surviving row
  centers its icon — five glyphs on the track's 28px center.
2026-07-23 13:30:07 +08:00
imccyu
23e942029a Merge remote-tracking branch 'origin/master' into worktree/fix-collapsed-sidebar-rail 2026-07-23 13:16:48 +08:00
Tianyi Cui
00d5b69882 chore: run primary CI before push 2026-07-23 13:09:52 +08:00
imccyu
698f46b0c9 feat(gui): morph the sidebar collapse instead of swapping renders
The collapse read as a hard cut: only the track width animated while the
panel content swapped instantly and the rail icons bore no relation to the
expanded layout. Now the four control rows persist across the transition —
collapse toggle, new session, new workspace, search, the same top-down
order as their expanded rows — and morph their geometry (row heights,
paddings, margins, capsule borders) on the deepsuite curve, so each rail
icon is its expanded control converging onto the 56px axis. Wide-only
content (brand, labels, input, session tree) cross-fades over 200ms, stays
mounted while the collapse animates, and unmounts at the 300ms settle,
still dropping the sessions subscription. The search query moves up to the
root and survives the round trip; rail search focuses the surviving input
after expand instead of remount-autofocus.
2026-07-23 13:03:32 +08:00
imccyu
5da8e3b787 feat(gui): animate sidebar collapse and grow the rail control set
The collapsed rail becomes a 56px icon column (24px controls between 16px
paddings) carrying expand, new session, search, and new workspace — each
aligned with its expanded counterpart; rail search expands the sidebar and
focuses the search box. Collapse/expand now animates: the frame transitions
grid-template-columns (and the surviving handle its left) on the deepsuite
sider curve — --ds-ease-in-out over --ds-transition-duration-slow, supplied
by ui-theme's base sheet. Transitions pause during drags (data-dragging on
the frame, set for the whole gesture) and under prefers-reduced-motion.
2026-07-23 11:45:54 +08:00
imccyu
7e6f0128b5 fix(gui): keep sidebar controls when collapsed
A closed sidebar previously resolved to a zero-width grid track, clipping
the only toggle and the settings entry with no visible recovery; the closed
preference persisted across reloads, locking the sidebar shut.

- columns.ts maps the closed preference (width 0) to a fixed 60px
  SIDEBAR_COLLAPSED rail through every step of the concession solve;
  closed details still resolve to zero width.
- AppFrame derives data-sidebar-collapsed and the sidebar slot's collapsed
  owner prop from the persisted preference instead of the resolved track
  width, and drops the resize handle while collapsed.
- SidebarRoot reads the owner collapsed prop; the expanded-only body is a
  separate component that unmounts while collapsed (dropping its sessions
  subscription), leaving the expand toggle and Settings in the rail.
- The keyless web smoke gains the ui-sidebar bundle (six real bundles) and
  pins the 60px rail collapse/expand round through the assembled client.
2026-07-23 10:51:57 +08:00
imccyu
3785e10754 refactor(client-runtime): home the snapshot-store engine in contract/
The store migration (#538) parked the engine in a store/ sibling domain;
loader and sessions imported it directly, tripping verify-client-domain-graph
(cross-domain shared surface must route through contract/). The engine is
layer-0 shared infrastructure by definition, so it moves to contract/store.ts
verbatim; the four importers and the spec follow mechanically.
2026-07-23 10:37:15 +08:00
imccyu
59a2fc408b Merge remote-tracking branch 'origin/worktree-webslot2' into worktree/fix-collapsed-sidebar-rail
# Conflicts:
#	apps/web/tests/smoke-fixture.e2e.ts
#	packages/client/ui-layout/src/client/AppFrame.tsx
#	packages/client/ui-layout/src/client/columns.ts
#	packages/client/ui-layout/src/client/index.ts
#	packages/client/ui-layout/tests/app-frame.spec.tsx
#	packages/client/ui-layout/tests/columns.spec.ts
#	packages/client/ui-sidebar/README.md
#	packages/client/ui-sidebar/src/client/SidebarRoot.tsx
#	packages/client/ui-sidebar/src/client/contract/slots.ts
#	packages/client/ui-sidebar/src/client/index.ts
#	packages/client/ui-sidebar/tests/apply.spec.tsx
#	packages/client/ui-sidebar/tests/sidebar-root.spec.tsx
2026-07-23 04:25:01 +08:00
imccyu
19e6f7d907 refactor(tsconfig): single root solution graph over host/client aggregates
Root tsconfig.json becomes a pure solution (files:[] + two references);
the former root host aggregate moves verbatim to tsconfig.host.json.
New tsconfig.base.client.json carries the shared client compiler shape
(jsx/DOM lib/types:[]), and tsconfig.client.json plus the 12
packages/client tsconfigs extend it instead of restating the trio.
tsconfig.build.json is deleted: the solution covers the full emit graph,
absorbing the command-goal typecheck/build drift.

Consumers migrate to the single graph: typecheck/build scripts and the
lefthook pre-push hook run bare `tsc -b` (pre-push now covers the client
side); the run-gates build gate needs typecheck so two concurrent tsc -b
runs cannot race the same tsbuildinfo; ts-project.ts and the standalone
doc-typecheck mode seed tsconfig.host.json explicitly (never the root
solution — flattening host+client into one program collides the cordis
Context merges); verify-cordis-config BFS seeds the root solution alone.

Per missions/tsconfig-single-graph-migration.md §2–§3.
2026-07-23 03:59:05 +08:00
imccyu
9cf5a384e9 ci: fix jsdoc & coverage 2026-07-23 03:55:32 +08:00
imccyu
8b3d1ac943 refactor(gui): move the snapshot-store engine into the client runtime
The data layer no longer depends on the React glue package, and business
plugins no longer depend on web-react at all:

- The store engine (zustand vanilla + immer + persist + dev freeze),
  defineStore, and shallowEqual move to @deepseek-ai/dsh-client-runtime,
  exported from the ./client main entry — no ./store subpath survives on
  either package (the web-react one is deleted, none is opened on runtime).
- Store products are bare snapshot sources: useSelector leaves
  SnapshotStore/StoreInstance and Session; every hook is composed at the
  binding site in web-react's renderer (per-source cached uSES binding).
  The SlotRendererHost sessions face carries bare observables only.
- SessionProvider becomes a standard-kit seat: an entry whose children
  declare a session-scope slot receives the framework component as a prop,
  retiring the last value import of web-react from plugin packages.
  UseSession and the session-area types now live in ui-slots.
- web-react shrinks to the shell-only React glue (renderer, providers,
  uSES bridge); zustand/immer belong to runtime alone; the module-table
  seed and tsdown externals drop the web-react/store seat.
- NODE_ENV replacement is defined once in the shared tsdown client preset
  (browser bundles inline the engine and lost vite's define); the 3-line
  process.env typecheck shim moves to runtime with the engine.
- Stray tsc artifacts (.js/.d.ts/.d.ts.map beside sources under src/)
  swept repo-wide; they shadow real sources under vitest resolution.

Verified: both aggregate typecheck programs at zero; 604 client tests
green; repo-wide grep for web-react/store at zero; real-host playwright
run 7/7 including persist round-trip.

ci: fix test/docs
2026-07-23 03:30:06 +08:00
imccyu
004a988168 fix: slot 2026-07-23 03:25:11 +08:00
imccyu
1b0ea07bce refactor(gui): slot system standard — single register, four props shares, framework store seat
The definitive slot model for the web client, replacing the first-generation
define/register two-step, ScopedSlots whitelist faces, and binding handles:

- 'root' is the only a-priori slot (SlotsService built-in); the shell renders
  exactly ctx.slots.renderSlot('root', {}).
- register is the single API: children = slot declaration + render
  authorization + runtime spec in one options object; misconfiguration fails
  loud at load (duplicate declaration, undeclared contribution, one store
  handle under two scopes).
- Component props arrive in four auto-derived shares: PropsRuntime<K>
  (owner params + session/global standard kits via declare-merge),
  PropsRenderSlots<S>, PropsStore<H>, and the inject business face.
  sessionId is framework-supplied; hooks are framework-made only.
- Framework store seat: defineStore factories declare schema/actions/persist;
  read = useStore, write = baked actions only; store scope derives from the
  mounting entry; per-session persist keys and clearPersisted lifecycle.
- inject factories read the apply closure's own ctx (binding handles retired;
  root-ctx back door closed); SessionProvider is self-wired render-prop.
- Rendering sits behind the SlotRenderer install seam; runtime stays
  React-free; ownership ledger keyed to the single entry axis closes the
  stale-authority window (StaleAuthorizationError probes).

Docs: the slot type-chain note is refreshed in place as the slot system
standard RFC (bilingual pair re-recorded); the web client architecture RFC
defers its slot sections there; packages/client/AGENTS.md gains the slot and
props discipline; gui-testing/web-styling notes drop missions/ references.

Tests: suites rewritten to the standard (props fed directly, real store
engines via createXXXStore().create(), no render machinery); load-time
negative samples for declaration/authorization/store conflicts; verified by
real-host playwright run (three columns, empty state, collapse, keyed session
remount, cross-slot selection sharing).

docs(ui-sidebar): point contract reference at the committed slot standard RFC

missions/ is workspace-local and never committed; the README must not cite it.
2026-07-23 03:25:11 +08:00