Commit Graph

1102 Commits

Author SHA1 Message Date
Tianyi Cui
3fc4142c04 fix(web): pluralize singular subagent counts
The localized catalog exposed one count.total and one count.running string for every cardinality. The English dictionary therefore rendered both the visible trigger and its accessibility label as 1 subagents, and the assembled Web golden had begun preserving that grammar error.

Split both count families into explicit one and other keys, following the existing client locale convention. SubagentCatalogAction selects the pair from the effective descendant count; English uses subagent for one and subagents otherwise, while Chinese keeps its unchanged classifier text under the same key domain.

Add a component regression proving a single running descendant selects both singular keys. Update the real Web E2E locator and keyless assembled aria golden from 1 subagents to 1 subagent. Both ui-subagent test files pass all 28 tests and the package TypeScript project builds cleanly.
2026-08-02 20:17:34 +08:00
Tianyi Cui
7b40fd5419 perf(web): trail only membership-invalidated catalogs
refreshSubagents previously treated every overlapping caller as proof that the in-flight response was stale. Selection, menu opening, and reconnect paths can legitimately request the same catalog concurrently without any host mutation, so those reads were coalesced and then followed by an unnecessary second RPC.

Restore ordinary in-flight coalescing at the public refresh boundary. The debounced host/session-added path now owns the membership-specific stale mark: if its timer fires during an older pull, it queues one trailing request; otherwise it starts the refresh directly. Parent removal keeps its separate explicit invalidation and trailing-refresh path.

Add a regression proving two overlapping reads share one Promise and issue one RPC. Rework the membership test to start from a restored selected parent, so only the host membership frame can request the trailing pull instead of the test priming the stale bit with an unrelated duplicate read.

Validated with both focused catalog cases, all 40 SessionManager tests, and the client runtime TypeScript project build.
2026-08-02 20:13:28 +08:00
Tianyi Cui
069f2644ff fix(web): preserve removal across stale catalog pulls
The earlier removal fix invalidated parentAvailable immediately and queued a trailing subagent.list request, but it still applied the already in-flight success verbatim. That stale success reopened the composer and became the trailing request baseline. If the trailing request failed, its error snapshot preserved parentAvailable:true indefinitely.

Record a false-only parent availability override on the exact in-flight catalog request when the owner removal frame arrives. Successful and failed responses now replay that request-local invalidation before publishing a snapshot, and addressed child Sessions receive the same effective value. The trailing request therefore starts from a false baseline and a later transport or business failure cannot resurrect the removed parent.

Strengthen the regression to assert the catalog and selected child remain read-only immediately after a stale parentAvailable:true success, then fail the trailing pull and assert the error snapshot remains unavailable. The complete SessionManager test file passes all 39 tests, and the client runtime TypeScript project builds cleanly.
2026-08-02 20:11:34 +08:00
Tianyi Cui
d004c694f1 test(web): narrow the stale-pull assertion to the root catalog's calls 2026-08-02 14:05:37 +08:00
Tianyi Cui
c8b2e70988 build(web): declare the locale dependency for ui-subagent
The client plugin now consumes `ctx.locale` (dictionary registration plus
the slot `t` seat), but the package graph did not know it: no
`dshClient.inject` entry, no peer/devDependency, no tsconfig project
reference. Mirror the ui-conversation convention so the dependency graph,
HMR/preflight metadata, and standalone packaging all recognize the
`@deepseek-ai/dsh-client-locale` seam.
2026-08-02 14:05:37 +08:00
Tianyi Cui
295e56b61e fix(web): keep removal-time availability invalidation across an in-flight pull
The `host/session-removed` invalidation flipped the owned catalog and
addressed children to `parentAvailable:false`, but a `subagent.list` pull
already in flight was requested before the removal and its ok-response
carries the pre-removal `parentAvailable:true` — the response then
overwrote both the catalog and every addressed child, resurrecting the
writable-editor-against-a-dead-continuation-owner bug the invalidation
closes, with no refresh scheduled to converge afterwards.

Mark the owner stale when a pull is in flight at removal time, so one
trailing refresh runs after the in-flight response settles and the
post-removal host truth lands. Adds a regression test: removal mid-pull,
stale ok response, trailing pull, final state stays unavailable on the
catalog and the addressed child.
2026-08-02 14:05:37 +08:00
Tianyi Cui
df01ed926a fix(subagent): type the schema-resolved reportDelivery shape
Config() applies the schemastery default at runtime, but its return type
keeps the input's optional field, so assert the resolved shape at the
seam — keeping the dead fallback branch gone.
2026-08-02 14:05:36 +08:00
Tianyi Cui
902b46b86b feat(web): localize the subagent catalog and read-only composer copy
The catalog action (diagnostics, relative times, loading/error/retry,
mode and activity labels, branch toggles, descendant counts, tree aria)
and the read-only composer were hardcoded to Simplified Chinese, so an
English-locale session rendered mixed-language UI. Register a `subagent`
locale namespace (zh source of truth + en dictionary), declare it on both
slot registrations, thread the locale `t` seat through the components, and
mount the locale service in the plugin specs.

The UI spec's zh assertions now run against the real dictionary through a
`t` stub that interpolates `{name}` params exactly like the locale
service.
2026-08-02 14:05:36 +08:00
Tianyi Cui
8431dbead3 fix(web): invalidate catalog availability when the owning parent is removed
A removed session can no longer be the delivery owner of its continuable
children, but the `host/session-removed` handler only reconciled the
removed row's own activity. `parentAvailable` was updated exclusively from
`refreshSubagents` success, and removal schedules no catalog refresh — so
after the parent's Activation detaches, an addressed child kept a writable
editor against a dead continuation owner until an unrelated refresh (or
forever, for a closed menu).

Flip `parentAvailable` to false on the owned catalog and push
`handleSubagentParentAvailable(false)` to every addressed child Session at
removal time, matching the refresh path's notification. New Session
instances already read `parentAvailable` from the catalog, so they inherit
the invalidated state.

Adds a regression test: removing the catalog's owning parent flips the
snapshot's `parentAvailable` and notifies the addressed child instance.
2026-08-02 14:05:36 +08:00
Tianyi Cui
b270b3ef9f fix(web): run a trailing catalog refresh for coalesced membership changes
`refreshSubagents` single-flights per catalog owner: a request arriving
while a pull is in flight returns the in-flight promise and is silently
coalesced into it. The in-flight response was requested before the
triggering change, so it can never contain that change — a debounced
membership refresh (50ms after `host/session-added`) firing during a slow
pull therefore lost the new child, and the catalog stayed stale until an
unrelated trigger (reselection, menu reopen, reconnect).

Mark the owner stale on coalescing and re-arm one trailing pull in the
settlement `finally`, so every membership change observed during a pull is
carried by a follow-up refresh exactly once. Bounded: the trailing pull
only runs when a refresh request was actually coalesced, and a new
coalescing during the trailing pull re-marks the same set.

Adds a fake-timer regression test: a `host/session-added` debounce firing
mid-pull yields exactly two `subagent.list` calls and the catalog
eventually contains the new child.
2026-08-02 14:05:36 +08:00
imccyu
23680e838b fix(web): synchronize subagent navigation state 2026-08-02 12:51:11 +08:00
imccyu
b94d2f9c1d fix(web): stabilize nested subagent navigation 2026-08-02 12:51:11 +08:00
imccyu
53ae9abea2 style(web): polish subagent and bash chrome 2026-08-02 12:51:11 +08:00
imccyu
ca1d838afc style(web): refine subagent navigation chrome 2026-08-02 12:51:11 +08:00
imccyu
42d34473af fix(web): allow follow-ups to running subagents 2026-08-02 12:51:11 +08:00
imccyu
130410bb98 fix(web): preserve subagent navigation and fork grouping 2026-08-02 12:51:11 +08:00
imccyu
8c9cd4c15d feat: optimize subagent list children query 2026-08-02 12:51:11 +08:00
imccyu
5d56019d22 feat: revert crumbs navigation for subagents 2026-08-02 12:51:11 +08:00
imccyu
6a02570e8f test(web): close rebased subagent coverage gaps 2026-08-02 12:51:09 +08:00
imccyu
5ef5feb01a fix(web): reconcile rebased subagent contracts 2026-08-02 12:51:09 +08:00
imccyu
5113b831e8 test(client): align card fixtures with subagent session state 2026-08-02 12:51:09 +08:00
Dudu-0223
8a518e353b feat(web): rewrite subagent conversations for FIFO activation 2026-08-02 12:51:09 +08:00
Dudu-0223
f0ab04273d fix(web): deduplicate subagent navigation 2026-08-02 12:51:09 +08:00
Dudu-0223
16ffd63115 feat(web): add nested subagent conversations 2026-08-02 12:51:09 +08:00
Dudu-0223
a27492507d feat(web): add subagent conversation transport 2026-08-02 12:51:09 +08:00
Tianyi Cui
d24879a413 Merge branch 'master' into codex/remove-scoped-bash 2026-08-01 19:38:11 +08:00
Tianyi Cui
c2171ef1f4 Merge branch 'master' into codex/goal-clear-single-flight 2026-08-01 19:33:21 +08:00
ZiyaZhang
8ce4f07f92 fix(web): defer math rendering while streaming 2026-08-01 00:58:50 -07:00
ZiyaZhang
1e334fa955 feat(web): render TeX math in Markdown 2026-08-01 00:05:23 -07:00
imccyu
3dfbfb4e72 Merge branch 'master' into fix/web-fork-interrupted-seq 2026-08-01 02:19:51 +08:00
kingwl
5e1c4b2b7b Merge remote-tracking branch 'origin/master' into codex/remove-scoped-bash
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-31 22:41:07 +08:00
Wenlu Wang
e3e6621e48 Merge branch 'master' into codex/goal-clear-single-flight 2026-07-31 21:54:14 +08:00
Wenlu Wang
9a3bdd599c Merge pull request #1099 from deepseek-harness/codex/hide-session-lineage-header
fix(web): hide session lineage in header
2026-07-31 21:51:56 +08:00
kingwl
7b826bf16c Merge remote-tracking branch 'origin/master' into codex/remove-scoped-bash
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-31 21:32:02 +08:00
kingwl
6879c0c9ca Merge remote-tracking branch 'origin/master' into codex/hide-session-lineage-header
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-31 21:31:04 +08:00
kingwl
aa85e0c6cd Merge remote-tracking branch 'origin/master' into codex/goal-clear-single-flight 2026-07-31 21:30:22 +08:00
kingwl
32972f1675 Merge remote-tracking branch 'origin/master' into codex/web-stop-preserve-queue 2026-07-31 21:30:19 +08:00
Ziya
3a01dc814e Merge pull request #1088 from deepseek-harness/agent/web-context-injection-auto-height
fix(web): let context injection cards fit content
2026-07-31 09:28:45 -04:00
kingwl
07b0efc49e fix(web): hide session lineage in header 2026-07-31 21:08:57 +08:00
kingwl
e73cdd6b7d fix(web): single-flight goal clear 2026-07-31 20:54:23 +08:00
kingwl
32a0e871b7 fix(web): preserve queue on stop 2026-07-31 20:51:05 +08:00
kingwl
ddda8be736 docs: record scoped bash translation pairs 2026-07-31 20:48:52 +08:00
07akioni
575e1217bb fix: remove scoped bash 2026-07-31 20:47:55 +08:00
ZiyaZhang
344ad0d6fb fix(client): floor the fork anchor to a real event seq
The fork button on a stopped assistant message was inert. Frozen
interrupted nodes carry a flow-ordering seq of turnEnd.seq - 0.9, and
session.fork takes a non-negative integer on the wire, so every such
request was rejected as invalid-params before reaching the host — where
an aborted turn's logged turn/end has always made it forkable.

SessionsService.fork floors atSeq at the wire boundary. Flooring stays
inside the anchor's own turn (every turn opens with turn/start), so the
host's first-turn/end-at-or-after cut still closes on that turn.
2026-07-31 05:41:45 -07:00
ZiyaZhang
5e68d812d1 fix(web): let context injection cards fit content 2026-07-31 05:20:54 -07:00
_Kerman
966add3305 Merge remote-tracking branch 'github/master' into xtr/trajectory-timeline-polish 2026-07-31 20:01:50 +08:00
_Kerman
dd98d15b1d Merge remote-tracking branch 'github/master' into xtr/trajectory-timeline-polish
# Conflicts:
#	packages/client/ui-trajectory/src/client/timeline.ts
#	packages/client/ui-trajectory/tests/views.spec.tsx
2026-07-31 20:01:16 +08:00
_Kerman
094f1976c4 fix(trajectory): lighten summary section headings 2026-07-31 19:53:55 +08:00
imccyu
23ee31efc0 Merge branch 'master' into fix/remove-badge 2026-07-31 19:47:55 +08:00
Tianyi Cui
d64b032311 Merge pull request #1082 from deepseek-harness/worktree/fix-web-duplicate-folder-names-20260731
fix(workspace): allow same-basename folders in Web
2026-07-31 19:37:38 +08:00