Commit Graph

1058 Commits

Author SHA1 Message Date
Yichen Jiang
bb43ff4f37 feat(ui): make a session that cannot send refuse to accept one
A default naming a route the Models page has since removed left the
composer saying 选择模型 while the input still accepted a message, which
then failed inside the adapter mid-turn.

`session.prompt` now refuses with `model-unavailable` before opening a
turn. That is the enforcement boundary: the method stays callable no
matter what a client disables. `session.models` reports the same fact as
`routable`, and ui-model pushes a block through the new
`ctx.conversation.blocks` registry so the bar renders the disabled
textarea it already renders without a workspace, carrying the blocker's
own reason. The push direction is forced — ui-model already depends on
ui-conversation, so ui-conversation cannot read it back.

The gate is `routable`, not "matches no advertised group": catalog
membership is advisory, so a route serving a model it stopped advertising
is missing from the groups yet perfectly usable, and `null` before the
first load never blocks so a slow Host cannot lock a working composer.

The scaffold gains a route-only adapter for fixture-less keyless
scenarios. Registering zero providers is a test artifact — every product
composition mounts one — and the goldens that froze the seat's fallback
label now show the model those scenarios actually route to.
2026-08-07 15:26:42 +08:00
Yichen Jiang
72618f29b5 fix(ui-models): stop the create card pinning a reference on a blank key
Master's credential-lifecycle work taught the editor card that a pi-ai
profile names `apiKeyEnv` only when a key is actually stored, so a route
left blank keeps its provider-native auth path. The create card kept
writing the derived reference unconditionally, so a route declared for a
credential chain or ADC was born pointing at a reference nothing sets —
and now rendered a red missing-key dot for it.

Both cards apply one rule. The obsolete assertion moves with the behavior
(the with-key case is covered by the neighbouring test), and the merged
Models e2e golden shows the declared route unmarked rather than flagged.
2026-08-07 13:57:52 +08:00
Yichen Jiang
d63c70bcf1 Merge remote-tracking branch 'origin/master' into worktree/default-model-persistence
# Conflicts:
#	apps/web/tests/models-settings.e2e.ts
#	packages/client/ui-models/README.i18n.yaml
#	packages/client/ui-models/README.md
#	packages/client/ui-models/README.zh.md
#	packages/client/ui-models/src/client/ModelsSection.module.css
#	packages/client/ui-models/src/client/ModelsSection.tsx
2026-08-07 13:54:15 +08:00
Yichen Jiang
9679597204 feat(ui-models): tag the provider rows this deployment declared
A row's stored profile could not tell a hand-declared gateway from a
shipped provider whose models someone narrowed — both look identical from
outside the adapter — so the Models page had no way to mark the routes a
deployment added itself.

The directory entry now carries `declared`, answered by the owning adapter
against its own installed catalog, and the page renders a Custom tag from
it. Absence stays "this adapter draws no such distinction" rather than
"shipped", so a route no adapter claims is labelled neither way.

Also records the default-route work's Agent Note and the e2e evidence for
all three changes: the composer switch writing the section, and the Models
page declaring a route with its own reasoning effort.
2026-08-07 13:49:47 +08:00
fz
1f853d85cd Attribute reader scroll input through the observed-top ledger
ChatView's bottom-follow recognized only wheel gestures as reader input,
so touch panning, scrollbar dragging, and keyboard paging could not leave
the bottom of a streaming transcript. Replace the wheel listener with
device-agnostic attribution: a scroll position deviating from the
observed-top ledger of the last delivered or written scrollTop is reader
input. Adds keyboard-paging and touch-style fling e2e scenarios (red under
the old implementation) and the bilingual Agent Note triplet.
2026-08-07 13:44:49 +08:00
Yichen Jiang
ddacc8de45 Merge pull request #1735 from deepseek-harness/worktree/provider-credential-lifecycle
fix(web): recover provider credential lifecycle
2026-08-07 13:27:18 +08:00
creatixchu
666e691327 test(web): make Goal replay platform-independent 2026-08-07 12:20:24 +08:00
creatixchu
aa831f4f5e Merge remote-tracking branch 'origin/master' into worktree/turn-tail-actions
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-08-07 11:55:53 +08:00
creatixchu
3c6188fb99 test(web): cover Goal actions across turns 2026-08-07 11:51:18 +08:00
Yichen Jiang
abd2e2973b Merge branch 'master' into worktree/provider-credential-lifecycle 2026-08-07 11:37:41 +08:00
Yichen Jiang
6edd98e2b2 Merge branch 'master' into worktree/provider-credential-lifecycle 2026-08-07 11:28:22 +08:00
Chinesezjc
0567727410 Merge remote-tracking branch 'origin/master' into feat/todo-multi-in-progress
# Conflicts:
#	apps/cli/config/base.cordis.yml
#	packages/client/ui-conversation/README.i18n.yaml
2026-08-07 11:27:24 +08:00
creatixchu
fb8f5f5eb4 Merge master into fix/conversation-column-one-axis-scroll 2026-08-07 10:51:29 +08:00
creatixchu
600ee462d5 Merge remote-tracking branch 'origin/master' into worktree/turn-tail-actions 2026-08-07 10:50:49 +08:00
Yichen Jiang
fe8a88c96a Merge pull request #1803 from deepseek-harness/worktree/align-core-web-rl-prompt
fix(web): align core profile with RL prompt
2026-08-06 21:57:28 +08:00
imccyu
8d4164452a fix(ui): drop stale react-dom deps and address onboarding review
knip: ui-settings no longer imports react-dom (the portal moved into
OnboardingSurface), so the react-dom peer/dev dependencies and
@types/react-dom go away with the usage.

Review follow-ups: the Agent Note's Testing section now records the
held-join reload regression scenario this PR adds (both languages,
pairing re-recorded); the e2e hold gates EVERY settings.describe issued
before release instead of only the first, so a future boot-time join
consumer cannot silently collapse the widened window; the sampler's
persistence across later navigations is documented and the vacuity
wording softened to what the hold actually buys (timing independence).
2026-08-06 21:08:20 +08:00
imccyu
63b80956f2 fix(ui): move the onboarding takeover chrome into the step
The settings shell painted the onboarding overlay (opaque stage, mask,
#root inert) the moment a step was registered and not locally completed,
while every step still had to load its private join before deciding
whether to show — rendering null could not suppress the shell-owned
chrome. Every reload on the hero therefore flashed a full-screen opaque
layer (white in the light palette) for one settings/credential RPC
round-trip after the session list turned ready.

The chrome now belongs to the step: a new zero-cordis OnboardingSurface
primitive (ui-primitives) renders the body-portaled overlay/mask/stage
verbatim from the former SettingsRoot stylesheet and holds #root inert
for exactly its own lifetime. WelcomeNotice and DeepSeekOnboardingDialog
wrap only their visible branch in it, so their existing null branches
paint and block nothing by construction. SettingsRoot keeps the
coordinator unchanged but renders the elected step bare, and the
settings.onboarding contract now names the surface wrap as the
registrant's obligation.

The onboarding e2e gains a held-join reload scenario pinning that a
configured world never mounts the takeover chrome or inerts the app.
2026-08-06 20:44:31 +08:00
Yichen Jiang
266629f1c3 test(web): cover core profile request header 2026-08-06 20:41:19 +08:00
Yichen Jiang
b5600e9376 Merge remote-tracking branch 'origin/master' into worktree/align-core-web-rl-prompt
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
#	apps/cli/reference/README.md
#	apps/cli/reference/README.zh.md
#	apps/cli/src/app-cli-entry.ts
#	apps/cli/src/dump-config.ts
#	apps/cli/src/web.ts
#	apps/cli/tests/built-bin.e2e.ts
#	apps/cli/tests/web-prompt-context.spec.ts
#	apps/web/tests/scaffold.ts
2026-08-06 20:34:57 +08:00
Yichen Jiang
50c46be948 fix(cli): isolate Web runtime context from headless 2026-08-06 20:11:44 +08:00
Turtle
a51b88d2aa Merge remote-tracking branch 'origin/master' into feat/profile-plugin-management
# Conflicts:
#	apps/cli/src/headless.ts
#	docs/event-producer-consumer.md
#	packages/host/apiproxy/README.i18n.yaml
2026-08-06 20:03:22 +08:00
Yichen Jiang
0cf1ba7f87 fix(web): align core profile with RL prompt 2026-08-06 19:52:16 +08:00
creatixchu
59c1b9c5ac Merge master into fix/conversation-column-one-axis-scroll 2026-08-06 19:49:11 +08:00
creatixchu
7c338cc3b9 Merge remote-tracking branch 'origin/master' into worktree/turn-tail-actions 2026-08-06 19:47:08 +08:00
Turtle
4d241d37e4 Merge pull request #1599 from deepseek-harness/codex/web-slash-fuzzy-search
feat(web): add fuzzy slash command discovery
2026-08-06 19:21:47 +08:00
creatixchu
e116b34d08 Merge remote-tracking branch 'origin/master' into worktree/turn-tail-actions
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-08-06 18:11:05 +08:00
imccyu
f9f72e2f09 fix(ui): preserve Hero tree when selecting a Workspace 2026-08-06 18:01:11 +08:00
creatixchu
84a6bae1c7 fix(web): drop the branch action from user and steering bubbles
The branch control on user and consumed-steering bubbles could enable
only when a completed turn ended with no node after the message at all,
so readers saw a permanently unavailable control whose tooltip promised
a state it could not reach. An enabled one would mislead anyway: a fork
at a message seq cuts at the containing turn/end and takes the answer
along, the opposite of the branch-to-re-ask reading a control on one's
own bubble suggests.

MessageItem loses its fork props, PendingSteeringBubble loses the
showBranch special case, and messageBranchSeqs narrows to
assistantBranchSeqs: only a completed turn's transcript tail that is
the turn's own content-text assistant may fork. A steered turn keeps
its fork point under the settled answer, because fork is a log-prefix
cut and the steer is model-visible history the child inherits.

Web aria goldens drop the user-bubble disabled-branch row and its
hidden explanation text; the nested-subagent golden also loses the one
enabled user-tail fork handle, a loss the decision note accepts.
2026-08-06 17:46:18 +08:00
Turtle
ef30572e63 fix: retire leftovers of the removed $DSH_HOME/config.yaml personal overlay
The profile rework left references to the old entry modes behind. Renames
the user patch-layer API and its spec file (watchPersonalPatches ->
watchUserPatches, personal-config.spec.ts -> user-patches.spec.ts) and
retargets the prose that still named `config.yaml`, `--config`, raw-config
mode, and surface overlays: repository-plugin and mcp-memory READMEs, the
credentials-local anchor into app-boot, vendor manifest items 12-13, the
vendored include/hmr comments, and install.sh.

Restores the boot-failure guard the rework dropped with raw mode: the
built-bin case now boots `--profile web --patch <invalid>` and asserts the
settled diagnostic and exit 1, so the HMR initial-scan deadlock stays
covered; its orphaned raw fixture is renamed and the unused one deleted.
The superseded personal-config Agent Note and its superseding profile note
are now cross-linked.
2026-08-06 17:28:58 +08:00
Turtle
62d0f26fd6 refactor(cli)!: namespace the profile and bundle manifests under dsh.profile and dsh.bundle
A profile manifest and a bundle manifest are different kinds and shared one
flat `dsh` section: `dsh.plugins` listed bundles (not plugins) and `dsh.patch`
declared a bundle's layer. Each kind now names its role — a bundle declares
`dsh.bundle.patch`, a profile declares `dsh.profile.bundles` — so a
package.json states which role it plays and the list name matches its contents.

`DEFAULT_PROFILE_PLUGINS` becomes `DEFAULT_PROFILE_BUNDLES`, and
`DshManifestSection` splits into `DshBundleManifest`/`DshProfileManifest`.
Pre-release: no compatibility shim; turtle-ui moved with it (bd5ff10).
2026-08-06 17:28:30 +08:00
Yichen Jiang
66b136e6e3 Merge remote-tracking branch 'origin/master' into worktree/provider-credential-lifecycle
# Conflicts:
#	packages/client/ui-models/README.i18n.yaml
#	packages/client/ui-models/README.md
#	packages/client/ui-models/README.zh.md
#	packages/client/ui-models/src/client/ModelsSection.tsx
#	packages/client/ui-models/src/client/ProviderEditor.tsx
2026-08-06 16:54:33 +08:00
Yichen Jiang
f2050bfd1e fix(web): surface provider credential status 2026-08-06 16:44:04 +08:00
creatixchu
6902b51fea fix(web): address review on the turn-tail actions gate
Correct the Agent Note's consequence: a running turn withholds the footer
below its own trigger bubble, while every earlier completed turn keeps its
seat — which the package test already asserts.

Give the running-phase barrier an explicit budget: it is armed before the
park and awaited after the stop click, so the 30s replay default left no
headroom for the marker poll, the UI polls, and two aria captures.

Number the running-turn test's boundary seqs like the log does, with each
turn/end strictly after its own nodes.
2026-08-06 16:42:41 +08:00
creatixchu
53e210348d fix(web): grant turn-tail IconActions only after the turn ends
`assistantActionsSeqs` picked the last content-text assistant of each turn
from the finalized transcript alone. That quantity is stable only once the
turn closes: while a turn is still producing steps, the narration written
before a tool call is the last content assistant so far, so copy, branch,
and the clock appeared under an intermediate sentence for as long as the
tool ran and then moved down to the next step's text.

Pass `ConversationSnapshot.turnEnds` into the derivation and grant the row
only inside a turn that has a durable `turn/end`. This is the same
completion fact the branch control and the `Ran for` label already read, so
the three parts of one row now agree; mid-turn narration owns nothing, and
the seat appears once under the settled answer.

`hasContentText` moves to chat-flow.ts so the ownership gate and
AssistantMarkdown's mount gate cannot drift apart.

apps/web/tests/turn-tail-actions.e2e.ts pins both states through the
assembled application: a hang sidecar on the second model call parks a turn
whose first step narrated before calling bash, and the two goldens hold the
parked flow and the flow after stopping.
2026-08-06 16:42:41 +08:00
creatixchu
12e5fe0330 Merge master into fix/conversation-column-one-axis-scroll 2026-08-06 16:39:59 +08:00
imccyu
90f738a4c7 build(web): react-free vendor list for the incremental markdown pipeline, npmPackageOf scoped guard, chunk audit script 2026-08-06 16:38:25 +08:00
imccyu
021074c0ee build(web): split the shell dist into index and vendor chunks with langs/ and fonts/ dirs 2026-08-06 16:38:25 +08:00
Yichen Jiang
8eebf7dd40 test(web): pin the remaining markdown fixture's event times
Master stabilized two of the three hand-built markdown fixtures by spacing
their event times, so the stats line's LLM segment stops depending on how fast
the replay ran. `markdown-images` was left on the old shape and kept failing
for exactly that reason — a different test each run, always the same one-line
difference.

Pin it the same way and record the segment its golden now always shows. This
supersedes the normalizer that dropped those segments outright, reverted here:
pinning the fixture keeps a real part of the page in the goldens instead of
hiding it from every one of them, and master's two goldens already record it.
2026-08-06 16:24:20 +08:00
Yichen Jiang
5e5fd977c5 Merge branch 'claude/pi-ai-model-discovery' into claude/web-pi-ai-provider-form 2026-08-06 16:18:57 +08:00
Yichen Jiang
3e1c63b2ea test(web): stop the stats line's wall-clock segments from deciding a golden
`StatsLine` renders its LLM, tool-call, and throughput segments only while the
matching measurement exceeds zero, and all three are wall clock taken during
the replay. A machine that finishes a step inside one millisecond drops the
segment a slower one keeps, so a golden recorded what the recording machine's
speed was rather than what the page shows. Goldens across this suite already
disagreed about the LLM segment for that reason, and CI failed on whichever
test landed on a slow enough runner — a different test each run, always the
same one-line difference.

Tokenizing the values was never enough, because presence is what moves. The
normalizer now drops those segments outright, each taking one adjacent
separator so nothing is left holding a dangling separator or a doubled space,
and the recorded goldens are normalized the same way. `TTFT avg` stays: it
gates on a step count the fixture determines.
2026-08-06 15:47:42 +08:00
Turtle
e24ed27f5f test: stabilize markdown web snapshots 2026-08-06 15:37:40 +08:00
Yichen Jiang
44484ec5f6 feat(web): declare a provider and its models from the Models page
The Models page could name a provider's key and little else. Adding an
OpenAI-compatible gateway meant opening $DSH_HOME/settings.yaml and
knowing the profile shape; correcting a stale context window meant the
same. This layer puts both on the page: a card that declares a route
pi-ai does not ship — id, endpoint, protocol, key, models — and a model
list on the pi-ai editor that can ask the provider what it serves and
adopt the answer.

It follows the DeepSeek catalog editor that landed in #1050 rather than
inventing a second look for the same job. Both editors now share the
section shell and heading, the danger-tinted delete, the add-model
button, the empty state, the per-row validator that names a bad row by
its position, and one K/M capacity vocabulary — 256K and 1M are read and
spelled back, while settings.yaml still stores plain token counts. The
row type is structurally open like that editor's, so a profile field
this card does not edit survives an edit here.

Three of that editor's decisions replaced weaker ones this branch had
made. Inheritance now reads the composition base rather than the
effective value, which would echo an override back the moment a reset
dropped it. Validation names the offending row instead of stating a
blanket problem. And emptying the list is no longer conflated with
handing the catalog back to the adapter — those are separate acts, with
separate affordances.

The create write carries the revision the card opened at, so a route
another tab declared meanwhile is a conflict rather than a silent
overwrite of its profile.
2026-08-06 15:18:17 +08:00
Turtle
5f84e6dbc6 Merge remote-tracking branch 'origin/master' into codex/web-slash-fuzzy-search 2026-08-06 15:05:58 +08:00
imccyu
a8822494d2 fix: test 2026-08-06 14:50:55 +08:00
Turtle
2711764e0e Merge remote-tracking branch 'origin/master' into codex/web-slash-fuzzy-search
# Conflicts:
#	packages/client/ui-command/README.i18n.yaml
2026-08-06 14:48:35 +08:00
imccyu
3c09b86a34 fix: test 2026-08-06 14:39:13 +08:00
Ziya
71e8132e76 Merge branch 'master' into feat/web-preview-badge 2026-08-05 23:29:04 -07:00
Chinesezjc
60153324ce fix(web): align the plan summary's usable-content rule with the tool
planSummary treated whitespace-only content as nameable, so a rejected call
whose args survive verbatim rendered a blank active clause beside a live +N.
The tool's own rule is trimmed non-empty; the row now uses it.

Also hoists the duplicated DSH_SNAPSHOT refresh flag out of the two assembled
snapshot files into their shared assembled-boot scaffolding.
2026-08-06 13:31:40 +08:00
Chinesezjc
5663c9f507 test(web): refresh two stale markdown aria goldens
ea2fc29530 gave the assistant footer separators flanking spaces, so the
accessible text reads `{{clock}} Ran for {{duration}}`. The CJK-strong and
inline-code-link goldens were recorded on a base that predates it and merged
without a re-record; master's push runs skip the snapshot lane, so nothing
caught the drift until a branch merged both. Every other golden already
carries the space.
2026-08-06 13:28:40 +08:00
Chinesezjc
b6a6e820f6 Merge remote-tracking branch 'origin/master' into feat/todo-multi-in-progress 2026-08-06 13:18:20 +08:00