Files
deepseek-harness/packages/client/ui-sidebar
creatixchu e5563ae433 fix(locale): gate browser detection on window and tolerate a missing languages list
Node >= 21 exposes a global `navigator` reporting the machine's own language,
so gating detection on `navigator` let a non-browser boot of the client tree
resolve to `en` instead of the documented fallback; `window` is the browser
test. `navigator.languages` is spec-required but absent on some embedders and
older WebViews, where spreading it would throw at boot, so the walk tolerates
its absence and `navigator.language` covers that host.

The per-spec pin boilerplate collapses into one suite-level
`usePinnedBrowserLanguages('zh-CN')`, which owns the rationale in
dsh-client-test-runtime, and the English-browser e2e scenario now clears the
console warnings channel too — its page has no closing inventory spec.
2026-07-31 15:49:59 +08:00
..

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

English | 中文

Sidebar plugin: real Host Workspaces in stable Host order, each containing its sessionIds in Workspace order with parentId nesting; Sessions outside every Workspace appear in a trailing Ungrouped section. Search, state dots, and collapse into the layout-owned 56px rail are presentation-local. Contract: the slot system standard.

New Session starts the runtime's page-local frontend Session Intent; a real Workspace's "+" starts one targeted to that Workspace. The Workspace header "+" opens ui-workspace's shared picker, whose selection also targets a frontend Session. A Workspace Intent does not appear in the sidebar.

SidebarRootComponentProps composes the layout owner share, the global useSessions and useWorkspaces hooks, the declared sidebar.workspace and sidebar.settings child slots, and injected startSession, open, and sidebar-toggle callbacks. There is no plugin store: deriveGroups consumes object-layer snapshots and component-local expansion/search state.

The foot is the sidebar.settings seat: the sidebar renders only the bottom-pinned layout slot and shares its column state (wide); ui-settings registers the trigger row and settings panel there.

The /client export surface is the plugin body (apply/inject) plus the contract types only — SidebarRoot, the row components, and the tree derivation are internal (the slot registration closes over them; tests import src paths directly).

Model Experience

None, as the sidebar renders the browser session list; nothing here reaches a model request.

KV Cache effect

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

Known Limitations and Deferred Work

  • State dots have two live data states (running/none) — the done/error/amber sources arrive with P-II approvals and notifications; the four-color primitive is already wired.
  • Group-by menu ships by-workspace only — Update/Status grouping strategies are drawn without specs and deferred.
  • "New task completed" unread marking is local viewing state — completion-time > last-seen never reaches the host.