Commit Graph

5457 Commits

Author SHA1 Message Date
_Kerman
0e05bb81a3 fix(ui-trajectory): offset recovered request boundaries 2026-08-03 15:31:36 +08:00
_Kerman
ad6858b6d3 fix(ui-trajectory): limit role tooltips to compact icons 2026-08-03 15:02:05 +08:00
_Kerman
a533cb6ce4 fix(ui-trajectory): distinguish overlapping request markers 2026-08-03 15:01:35 +08:00
Turtle
ef7637a5d8 Merge pull request #1093 from deepseek-harness/fix/tui-terminal-restore-on-boot-failure
fix(app-boot): restore the terminal when boot fails
2026-08-03 14:48:20 +08:00
Wenlu Wang
8e820bbbf5 Merge pull request #1159 from deepseek-harness/codex/subagent-token-duration
Fix subagent active duration tracking
2026-08-03 14:45:29 +08:00
Turtle
f503c92aff Merge branch 'master' into fix/tui-terminal-restore-on-boot-failure 2026-08-03 14:40:58 +08:00
imccyu
8527ce23ae Merge pull request #1169 from deepseek-harness/worktree/directory-picker-path-editor
fix(directory-picker-browse): advertise the path editor and walk the panes with the draft
2026-08-03 14:30:34 +08:00
Turtle
ad4aeacd19 fix(hmr,include): settle a failing boot instead of a silent exit 13
Master's transactional loader made the invalid-provider PTY case regress:
the HMR main watcher's initial scan refreshed the include mid-initial-apply,
the concurrent group updates stranded the include fiber, and once serialized
the failing apply's rollback deadlocked on HMR's refresh drain — dsh exited
13 with no diagnostic and the terminal stranded, the exact symptom this
branch fixes. Serialize every include child-tree mutation through one queue
and pass ignoreInitial to the HMR main watcher; the failing boot now settles
through boot()'s labelled rejection with the tree disposed and exit 1. The
PTY case asserts the settled diagnostic; the fail-loud release remains the
guard for rejections boot cannot see.
2026-08-03 14:14:20 +08:00
Turtle
b37c22bd0a Merge origin/master: combine boot-owned settlement with the fail-loud release
Conflicts: apps/cli/src/tui.ts (keep the release install over master's comment
rewording), packages/ui/app-boot/README* (master's new installFailLoud row
wording plus this branch's release and timeout rows).
2026-08-03 14:10:23 +08:00
_Kerman
5b17413108 docs(ui-trajectory): record composer overlay contract 2026-08-03 14:02:54 +08:00
_Kerman
5534431d42 fix(ui-trajectory): own composer overlay geometry 2026-08-03 14:02:40 +08:00
Yif
062a1507f1 feat(ui-trajectory): float the composer over the ledger like chat
The trajectory host kept the composer as a fixed flex sibling, so the
ledger never reached the viewport bottom. Anchor the composer seat
absolutely over the ledger (reusing chat's fade treatment) and have the
internal scroll panes reserve the composer's live height plus a 16px gap
so end rows and detail bodies scroll clear of the overlay.

(cherry picked from commit 0058a1f4b6e8c2e23bfde7c827a84838cc5ebffc)
2026-08-03 13:55:33 +08:00
_Kerman
44304a458c fix(ui-trajectory): separate consecutive request markers 2026-08-03 13:53:50 +08:00
_Kerman
68e79ed983 docs(ui-trajectory): record timeline interaction contract 2026-08-03 13:48:11 +08:00
_Kerman
74cd2e4bd9 feat(ui-trajectory): enrich timeline timing interactions 2026-08-03 13:48:03 +08:00
_Kerman
c8ece8325c fix(ui-trajectory): follow live ledger tail 2026-08-03 13:47:55 +08:00
_Kerman
a8478fc031 fix(ui-trajectory): animate responsive ledger layout 2026-08-03 13:47:51 +08:00
_Kerman
94dabcb7ed feat(ui-primitives): support delayed multiline tooltips 2026-08-03 13:47:37 +08:00
creatixchu
6c0ce22f59 fix(directory-picker-browse): light the whole bar, and move the view once per keystroke
The hover affordance framed only the strip right of the crumbs. The bar itself
now carries the outline and the padding in both modes, so hovering previews
exactly the field the click produces and nothing resizes when the two swap.

One keystroke moved the view twice: deleting a separator first narrowed the
pane the draft had just walked away from, then replaced it with its landing.
The tail now filters only the LAST pane — the one whose level the path names —
so a pane on its way out holds still until its landing arrives.

Also from the review round: the walk waits both legs out instead of taking the
submitted-navigation bound (a speculative scan has nothing waiting on it, and
a tail keystroke aborting a slow parent leg would otherwise strand the
two-pane view); a level keeps answering the directory text that produced it,
so `..` segments and Windows forward slashes filter and stop rescanning; the
release-on-miss rule counts displayable rows, so it survives `hidden` ever
meaning more than dot-prefixed; and the editor's 250ms rest joins the other
two constants on the remote-recalibration list.
2026-08-03 13:45:30 +08:00
creatixchu
2ceed380dd fix(directory-picker-browse): keep the typed level in the last pane
Skipping the draft-following scan whenever ANY pane happened to list the
directory was the cheaper rule and the wrong one: erasing a segment left the
level being typed on the LEFT, with its own child pane still standing to its
right, so the two panes stopped reading as "where I am, and where I came
from".

The pane arity is now the invariant the editor maintains — the last pane lists
the level the path names, its parent sits beside it, and only a display root
lists alone. Only that last pane's own tail costs no scan; every other
directory part re-lands.
2026-08-03 13:27:45 +08:00
kingwl
255cd90c6e compact long subagent durations 2026-08-03 13:23:40 +08:00
creatixchu
233ea50104 Merge remote-tracking branch 'origin/master' into worktree/directory-picker-path-editor 2026-08-03 13:14:27 +08:00
creatixchu
c58b07833e fix(directory-picker-browse): land the draft-following walk two-pane
The draft-following scan replaced the panes with one wide level, so typing a
path collapsed the dialog's Miller view — the thing the dialog is. It now
lands through the same selection-anchored landing every navigation uses:
target and parent legs as one frame, the target re-selected in its parent
level, its children on the right. Typing a path moves the Miller view exactly
as a crumb jump does.

One landing shape, two callers: `land(path, {closeEditor, announce})` is what
`navigate` and the draft-following scan share. A submitted path closes the
editor and announces failures; the speculative scan keeps both to itself and
re-parks the focus its swap dropped.

A level a pane already lists still needs no scan at all — the filter alone
answers the draft — so erasing back into the parent's own path keeps both
panes and only moves the filter.
2026-08-03 13:08:31 +08:00
creatixchu
30f442d42e review(directory-picker-browse): re-arm the draft-following wait per keystroke
ds-review-bot round one. Keying the debounce on the directory part the draft
named left two states with no recovery until the operator crossed a separator:
a keystroke that superseded an in-flight scan never re-armed one, and an edit
after a rejected submission released the hold with no timer left to release.
The wait is now keyed on the draft itself and decides its target when it
fires, reading the panes through a ref so a landing cannot re-arm it (a host
answering with a differently spelled path would otherwise scan forever).

A landed scan that unmounts the row a keyboard operator Tabbed onto re-parks
focus on the still-open editor; the Modal has no focus trap. That a walked-to
level survives closing the editor is now stated in the README, the Agent Note,
and the module contract. The new e2e stages its own beta directory so running
it alone sees the tree its assertions describe.
2026-08-03 12:11:11 +08:00
kingwl
c183fae6f9 clarify timing projection schema cast 2026-08-03 12:04:44 +08:00
kingwl
ad42057586 merge latest master into subagent duration fix 2026-08-03 12:02:47 +08:00
kingwl
fdf83f2c3e document projection-cut duration bound 2026-08-03 11:44:11 +08:00
kingwl
0b0de64769 bound inactive subagent timing to projection cut 2026-08-03 11:40:33 +08:00
creatixchu
79072e356c fix(directory-picker-browse): advertise the path editor and walk the panes with the draft
The Select Workspace Directory dialog hid its one route into typing a path
behind an invisible click target, and once the editor opened the panes stayed
on whatever level was listed when it opened — so the typed text and the list
under it disagreed for the whole edit.

The edit zone now carries a pencil glyph at the bar's right edge and lights in
the editor's own footprint on hover/focus (the bar keeps one height across the
swap). While editing, the panes follow the draft: a directory part no pane
lists is scanned after a 250ms rest and lands in place, so typing deeper
descends and erasing segments steps back up without leaving the editor, and a
final segment nobody matches releases the prefix filter instead of emptying
the pane it is being spelled into. The draft-following scan is speculative and
silent on failure; Enter still owns the view from submission until landing and
remains the only path that surfaces an error.
2026-08-03 11:24:35 +08:00
creatixchu
3f34a72b66 review(ui-primitives): stop the size doc from enumerating native sizes
The parenthetical listed 14/16 and this branch added 20, but the set never
held to it: IconRightUpOutline14 defaults to 8, IconTreeCorner8x10 to 10,
and IconWarningOutline16 to 14. Drop the list rather than maintain one that
drifts, and retitle the icons test that carried the same generalization.
2026-08-03 10:42:34 +08:00
creatixchu
b85c0a1851 fix(ui-workspace): draw Archive session with the archive-box glyph
The session row menu's Archive action carried ic_ds_download_outline_16, a
download tray that reads as "save to disk" rather than "put away". Swap it
for the design's archive glyph — a lidded box with a label slot — added to
the ic_ds_* set as IconArchiveOutline20.

The glyph is native 20, the first of that size in the set, so the menu's
16px icon slot asks for it explicitly. The figma export's 0.11px stroke ring
around the box contour is dropped: it restates the same contour in the same
ink, which currentColor already carries.
2026-08-03 10:30:32 +08:00
kingwl
c831c99981 keep subagent duration fix focused 2026-08-03 01:08:32 +08:00
kingwl
3a920be9c5 stack subagent token and duration metrics 2026-08-03 00:22:01 +08:00
kingwl
6b6acbe0c5 Merge master into subagent usage branch
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.md
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.zh.md
#	apps/web/tests/snapshots/subagent-conversation/tree.expected.md
#	apps/web/tests/subagent-conversation.e2e.ts
#	packages/client/ui-subagent/src/client/SubagentCatalogAction.tsx
2026-08-02 23:37:17 +08:00
kingwl
b30686d634 show subagent usage and active duration 2026-08-02 23:31:24 +08:00
Tianyi Cui
1ea72962eb Merge master into fix/subagent-stack-end-result 2026-08-02 23:13:00 +08:00
Ziya
45a59ffa26 Merge pull request #1156 from deepseek-harness/fix/goal-complete-wrapup
fix(tool-goal): deliver a user-facing wrap-up message after goal-round complete/blocked
2026-08-02 11:03:22 -04:00
ZiyaZhang
e72978ba98 fix(tool-goal): scope the wrap-up no-more-tools clause to the current run
The injected instruction persists as a durable user message, so an
unscoped 'Do not call any more tools.' stays in every later request's
history. Scope it: '...in this run; further work waits for the user's
next instruction.' A/B probes on deepseek-v4-pro show the scoped wording
is non-inferior in-turn (4/4 zero tool calls, closing quality unchanged)
and next-turn tool use is unaffected under both wordings; the scoped
form states the instruction's actual lifetime.
2026-08-02 07:29:18 -07:00
ZiyaZhang
820a5a97f1 review(tool-goal,llm-replay): address ds-review-bot round one
- fromRequest placeholder: the last two braces of a consecutive } run now
  terminate the placeholder, so patterns may end with a brace quantifier
  (bot warning; the truncated pattern could even silently mis-match since
  an unclosed { is literal in JS regexes)
- document that derived JSONL entries pass through the same resolution
- widen ToolRunContext/deferContext seam docs beyond composite-only usage
  (source JSDoc, README pair, core-data-structures type-equiv blocks)
- pin direct-human blocked as uninstructed, completing the
  goal-round/direct-human x complete/blocked test quadrant
2026-08-02 07:19:26 -07:00
Tianyi Cui
711a33ea8d fix(web): keep known subagent chooser visible 2026-08-02 21:22:39 +08:00
ZiyaZhang
8f77ab467f test(web): harden live thinking tail observation 2026-08-02 06:12:13 -07:00
ZiyaZhang
666ef95f81 fix(tool-goal): let the model deliver a wrap-up message after a goal-round complete/blocked
A goal round reporting complete or blocked used to conclude the turn at
the tool result, so the model never spoke after the call and sessions
ended on a bare update_goal card. The terminal update now defers one
plugin-sourced <goal_complete>/<goal_blocked> instruction onto its
result asking for a grounded closing message without further tool
calls; the turn then ends through the ordinary no-tool-calls stop.
Direct-human mutations stay uninstructed. Wording chosen by A/B
sampling on deepseek-v4-pro; one extra request per goal lifecycle.

New keyless ACP snapshot goal-wrapup drives the shipped app through
create -> round one -> autonomous complete and pins the injection, the
same-turn closing message, and the completed turn end.
2026-08-02 05:58:45 -07:00
ZiyaZhang
04d43e3b19 feat(llm-replay): resolve {{fromRequest:...}} placeholders against the live request
A scripted sidecar cannot know values minted at run time, so terminal
goal updates (which must echo the random goal id) were previously
un-scriptable. Placeholders in scripted entries now resolve against the
request corpus at stream time: last match wins, capture group 1 or the
whole match substitutes, and unmatched/invalid/unterminated patterns
fail loud.
2026-08-02 05:58:31 -07:00
ZiyaZhang
975b57b54a feat(web): follow live reasoning tail while collapsed 2026-08-02 05:29:25 -07:00
Tianyi Cui
e4663cb10b test(web): share the subagent locale translator
The localized catalog spec introduced two package-local translation stubs: one manually looped over interpolation parameters and the other indexed the Chinese dictionary directly. That duplicates framework test plumbing and can drift from the shared lookup, fallback, and placeholder semantics used by the rest of the client suites.

Use makeTranslate from dsh-client-test-runtime as the single Chinese translator for both catalog and read-only composer assertions. Record the test-only workspace dependency in the ui-subagent manifest and lockfile; no production dependency or runtime bundle edge is added.

This removes twelve lines of local translation behavior while preserving the same Chinese assertions and exercising the shared interpolation path. Both ui-subagent test files pass with all 28 tests, the package TypeScript project checks cleanly, and the staged diff passes formatting, lint, and whitespace hooks.
2026-08-02 20:28:23 +08:00
Tianyi Cui
a24f9b06e7 refactor(subagent): drop speculative effect rollback
The PR moved child scope-effect registration into the contribution-installation try/catch solely to cover a hypothetical throw, while documenting that Context.effect cannot reject for the live unpublished scope passed to apply. The change therefore added control-flow and rollback implications for a failure mode the API does not expose, without changing observable behavior.

Keep the rollback boundary focused on contribution installers, which are the operations that can actually fail and leave recorded installations to unwind. Register the child-scope cleanup effect immediately after that boundary, as before; its disposer still converges with contribution removal through the registry idempotence rules.

This is a behavior-preserving removal of unnecessary code. The focused activation-setup-registry suite passes all 11 tests, the subagent TypeScript project checks cleanly, and the staged diff passes whitespace validation.
2026-08-02 20:25:39 +08:00
Tianyi Cui
f91b4b2cdc docs(subagent): correct cold-resume parent contract
The descriptor module claimed that no parent exists during cold resume, using that as the reason maxTokens cannot be inherited. Continuable follow-up actually requires and authorizes the exact live direct parent before it loads the descriptor and materializes the child, so the stated lifecycle fact was false.

Keep the real persistence decision explicit: per-activation budgets are not durable descriptor composition. Cold resume reconstructs child options only from the curated durable fields, so it deliberately neither restores the establishing budget nor inherits the live parent current transient budget; the resumed provider and model route defaults apply.

This is a contract-only correction with no runtime change. The exported JSDoc gate remains clean.
2026-08-02 20:18:31 +08:00
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
ac88b6e4c7 fix(acp): retain nested teardown diagnostics
ACP waits for every owned Agent disposal and throws one AggregateError when any Session teardown fails. The aggregate message embedded each rejected value with String(failure) because the connection-close logger itself renders only the outer error message. String preserves only an Error name and message, so causes and AggregateError members disappeared from the operational warning.

Render each per-session rejection with the existing errorChain diagnostic helper before joining it into the outer message. The original rejected values remain in AggregateError.errors for programmatic inspection, while the message now carries cause chains and nested aggregate members through the String-based logger.

Exercise a disposal failure containing both AggregateError members and a nested cause, while retaining the existing barrier that proves the second Session finishes disposal before any warning is emitted. All 10 ACP disposal tests pass and the ACP TypeScript project builds cleanly.
2026-08-02 20:14:46 +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