Skip to content

fix(client): adapt to the dsh-client-ui-primitives 0.1.7 API (icons, block labels) - #757

Closed
hengne wants to merge 1 commit into
omdsh-dev:mainfrom
hengne:fix/dsh-0.1.7-icon-names
Closed

hengne wants to merge 1 commit into
omdsh-dev:mainfrom
hengne:fix/dsh-0.1.7-icon-names

Conversation

@hengne

@hengne hengne commented Sep 23, 2026

Copy link
Copy Markdown

Problem

On DeepSeek Harness 0.1.7-alpha.2 most sidebar surfaces crash with React #130 as soon as they render an icon — opening a file in the editor pane, the file tree, git, side chat:

dsh-better-sidebar: Minified React error #130 (element type is undefined)

Upstream commit 4937343a5e ("unify the client visual language") renamed every size-suffixed icon in @deepseek-ai/dsh-client-ui-primitives: Icon…Outline14 / Icon…Outline16 became weight variants (…Regular / …Medium) with the size carried by the size prop. The sidebar imports 29 of the old names, all of which now resolve to undefined.

The same release also changed three component contracts the sidebar uses:

primitive change
TerminalBlockLabels new required noExitCode
DiffBlockLabels / ReadBlockLabels now extend CodeToolbarLabels (codeLabel / wrapLabel / unwrapLabel)
ConnectionIndicator reconnectLabel prop removed

Fix

  • src/client/**: the 29 primitives icons renamed to their …Regular variants (the core's own choice in that commit; explicit size props kept). Local icons (IconUploadOutline16, IconVscode16, …) are untouched.
  • SideChatView.tsx: noExitCode for the terminal block, the code-toolbar labels for diff/read blocks, reconnectLabel dropped.
  • Locales: four new keys (sideChatBlockNoExitCode, sideChatBlockCodeLabel, sideChatBlockWrap, sideChatBlockUnwrap) added to zh/en and every shipped third-language dictionary (the key-set parity test enforces this). Wording follows the core's terminal.noExitCode / codeBlock.* strings — please sanity-check the translations you care about.
  • package.json (dev only): dsh-client-ui-primitives → 0.1.7-alpha.2 so typecheck runs against the real API, plus the packages the 0.1.7 primitives bundle imports from the host (dsh-client-store, dsh-util-workspace-path, micromark/mdast, @shikijs/langs, simple-icons, zustand, immer) so vitest can load it — the published primitives declares no dependencies of its own. Versions copied from the harness lockfile. Peer ranges unchanged.
  • tests/browser-globals.ts: the node-env window stub gains no-op addEventListener / removeEventListener — primitives 0.1.7 installs pointer/keyboard listeners at module load.

Verification

  • pnpm typecheck, pnpm lint, pnpm check:consumer-types, pnpm test (127 files / 1346 tests) pass.
  • Built client loaded into a real 0.1.7-alpha.2 harness: editor pane, file tree and side chat render; no #130 in the console.

Independent of #755 (turnTail activation); both are needed for the plugin to work on 0.1.7.

🤖 Generated with Claude Code

DSH 0.1.7-alpha.2 (upstream commit 4937343a5e, "unify the client visual
language") renamed every size-suffixed icon in
@deepseek-ai/dsh-client-ui-primitives — Icon…Outline14 / Icon…Outline16
became weight variants (…Regular / …Medium) with the size carried by the
`size` prop — and changed three component contracts the sidebar uses:

- TerminalBlockLabels gained a required `noExitCode` label;
- DiffBlockLabels / ReadBlockLabels now extend CodeToolbarLabels
  (codeLabel / wrapLabel / unwrapLabel);
- ConnectionIndicator dropped the `reconnectLabel` prop.

On 0.1.7 the old icon names resolve to undefined, so any sidebar surface
rendering one of the 29 affected icons (editor pane, file tree, git,
side chat, …) throws React omdsh-dev#130. Rename the 29 imports to their …Regular
variants (explicit `size` props are kept), add the four new labels with
translations in every shipped dictionary, and drop reconnectLabel.

Dev dependencies: dsh-client-ui-primitives to 0.1.7-alpha.2 so typecheck
runs against the current API, plus the packages the 0.1.7 primitives
bundle imports from the host (dsh-client-store, dsh-util-workspace-path,
micromark/mdast, shiki langs, simple-icons, zustand, immer …) so vitest
can load it. The node-env window stub now accepts the module-level
pointer/keyboard listeners primitives 0.1.7 installs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hengne Li <Hengne.Li@cern.ch>
Copilot AI lite review requested due to automatic review settings September 23, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical Cordis peer mismatches and several moderate icon-size and test-coverage issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
What changed in this PR

Updates the client for the DSH 0.1.7 primitives API, preventing undefined-icon crashes and adding required side-chat labels.

Changes:

  • Migrates primitives icons to Regular variants.
  • Adds block-label translations and contract updates.
  • Updates browser stubs and development dependencies.
File Summary
tests/​browser-globals.ts Adds window listener stubs.
src/​client/​TreePanel.tsx Updates toolbar icons.
src/​client/​TextEditor.tsx Updates save icon.
src/​client/​TabBar.tsx Updates tab icons; moderate size-preservation issue remains.
src/​client/​SubagentView.tsx Updates refresh icons; moderate size-preservation issues remain.
src/​client/​SideChatView.tsx Updates block contracts; moderate test-coverage issue remains.
src/​client/​SideCardSection.tsx Updates card icons.
src/​client/​Sidebar.tsx Updates close icon; moderate size-preservation issue remains.
src/​client/​open-with-settings.tsx Updates remove icon.
src/​client/​mermaid.tsx Updates copy icon.
src/​client/​md-toc.tsx Updates table-of-contents icon.
src/​client/​locales.ts Adds base labels; nit translation issue remains.
src/​client/​locales-zh-TW.ts Adds labels; nit translation issue remains.
src/​client/​locales-zh-MO.ts Adds labels; nit translation issue remains.
src/​client/​locales-zh-HK.ts Adds labels; nit translation issue remains.
src/​client/​locales-vi.ts Adds Vietnamese labels.
src/​client/​locales-tr.ts Adds Turkish labels.
src/​client/​locales-th.ts Adds Thai labels.
src/​client/​locales-sv.ts Adds Swedish labels.
src/​client/​locales-ru.ts Adds Russian labels.
src/​client/​locales-pt.ts Adds Portuguese labels.
src/​client/​locales-pl.ts Adds Polish labels.
src/​client/​locales-nl.ts Adds Dutch labels.
src/​client/​locales-ko.ts Adds Korean labels.
src/​client/​locales-ja.ts Adds Japanese labels.
src/​client/​locales-it.ts Adds Italian labels.
src/​client/​locales-id.ts Adds Indonesian labels.
src/​client/​locales-hi.ts Adds Hindi labels.
src/​client/​locales-fr.ts Adds French labels.
src/​client/​locales-de.ts Adds German labels.
src/​client/​locales-ar.ts Adds Arabic labels.
src/​client/​intercept.tsx Updates produced-file icon.
src/​client/​FileTree.tsx Updates file-tree icons; moderate size-preservation issue remains.
src/​client/​EditorHost.tsx Updates editor controls.
src/​client/​DiffTab.tsx Updates refresh icon.
src/​client/​changes/​GitLens.tsx Updates Git icons.
src/​client/​changes/​DiffPane.tsx Updates diff controls.
src/​client/​builtins/​viewers.tsx Updates viewer icons.
src/​client/​builtins/​tabs.tsx Updates tab option icons.
src/​client/​BrowserView.tsx Updates browser controls; moderate size-preservation issues remain.
pnpm-lock.yaml Locks dependencies; critical Cordis peer mismatch remains.
package.json Updates dependencies; critical Cordis peer mismatch remains.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
Comment on lines +157 to +159
"@deepseek-ai/dsh-client-store": "0.1.7-rc.1",
"@deepseek-ai/dsh-client-ui-conversation": "0.1.5-rc.2",
"@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.2",
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-alpha.2",
Comment thread pnpm-lock.yaml
resolution: {integrity: sha512-134R/M4EBHDZ1TUCH1Czu3DrNsEZ4lJ2mW4Y73+AopxeGEp/JCq/xWMkf/XDuV1fgXb+zH8yDX/cWswKufj5YQ==}
peerDependencies:
'@deepseek-ai/cordis': ^4.0.2
'@deepseek-ai/cordis': ~4.0.4
@hengne

hengne commented Sep 24, 2026

Copy link
Copy Markdown
Author

Superseded by v0.21.1 (bd11bad, "feat: adapt to DSH 0.1.7-rc.1") — same icon renames, and the peer floor moved to 0.1.7-rc.1 with cordis/schemastery hoisted into devDependencies, which is the correct fix for the peer mismatch Copilot flagged here (I'd pinned 0.1.7-alpha.2 without touching the vendored-runtime peers). Closing.

@hengne hengne closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants