Files
deepseek-harness/packages/client/ui-settings
Yichen Jiang fb6fb1fa12 Merge origin/master into worktree/web-plugin-config, adapting to ctx.remote.$on
#2201 landed three moves this branch sits on top of. `bindSettingsScope` became
`ctx.settingsScope.bind` on the Settings surface, so the section injects that
service and the Remote face instead of importing a free function; the
`SettingsScope` types moved into the runtime contract module, which is where
this branch's `base`, `user`, and `unset` now live; and the client
`credentials/changed` event became the forwarded owner event
`credentials/updated`, which the web-search card subscribes to through
`ctx.remote.$on`.

The generated module graph crossed mermaid's 1000-edge render guard with this
branch's 14 new edges. The guard doubles again, exactly as it did at 500 — the
graph counts real package edges, and trimming them to fit a renderer default
would make the document lie about the dependency set.
2026-08-11 19:52:34 +08:00
..
2026-08-11 19:25:41 +08:00

@deepseek-ai/dsh-client-ui-settings

English | 中文

The settings domain's base layer, with two roles and no presentation of its own. It provides ctx.settingsScope, the Host transport every preference row binds its durable namespace section through, and it declares the settings slot types registrants fill: settings.trigger / settings.header / settings.close (chrome content), settings.action (ordered content-header actions), settings.section (one page per feature), and settings.onboarding (ordered feature-owned pages). It depends on no ui-* presentation package, so any feature that owns a preference can reach it; the settings SHELL — the sidebar.settings occupant, its navigation, and the chrome — lives in ui-settings-general, because a shell dependency on ui-sidebar would close a reference graph cycle through ui-layout and ui-theme. The shell's own contract types live beside the shell for the same reason.

The plugin injects nothing and waits for nothing: ctx.settingsScope.bind(spec) resolves the wire face through the CALLER's context at call time, so the bound scope's disposer belongs to the calling fiber, and the caller injects connection for the transport and remote for the invalidation. Listeners exist before the first background read starts, so a row's activation never blocks on the settings transport. A bound scope reloads on the forwarded settings/document-updated event for its own namespace and on connection/reset. Writes carry one field path and the last known namespace revision as expectedRevision; a rejected or failed write re-reads unless a newer write already superseded it, and a stale read never publishes over a newer one. Without a decode in the spec, a section that is not a plain object, fails its rehydrated schema, or carries a schema envelope this client cannot rehydrate publishes no value at all, so a row renders its own absent state instead of a half-decoded one.

Model Experience

None, as the settings domain base serves browser preference storage and slot declarations; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • Remote browsers get no durable settings — the settings RPCs are loopback-only, so a scope bound in a non-loopback browser starts unavailable and never crosses the wire; every row it backs is inert there.
  • One field per write — set sends a single set op, so a row that must move two fields together has no transaction and publishes two revisions.