dsh-ui
Use when building, styling, or reviewing in-harness UI — the BotHarness client plugin inside the DeepSeek Harness Web Client. Trigger on new or changed components under `packages/client`, layout or padding alignment with native DSH, tokens/primitives or theme questions, slot and shadow wiring, and any "match the native shell" request.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 852
- Forks
- 63
01 前言 Front Matter
- name
- dsh-ui
- description
- Use when building, styling, or reviewing in-harness UI — the BotHarness client plugin inside the DeepSeek Harness Web Client. Trigger on new or changed components under `packages/client`, layout or padding alignment with native DSH, tokens/primitives or theme questions, slot and shadow wiring, and any "match the native shell" request.
02 资源文件 2
- 参考文档references/design-references.md2.7 KB
- 参考文档references/native-contract.md12.2 KB
03 SKILL.md 正文
DSH-native UI
The in-harness UI is part of the shell, not a standalone app (ADR-0028): style with --dsw-* tokens, compose with ui-primitives, and copy the native layout contract instead of inventing spacing. Measure the running shell; do not guess.
Before designing or reviewing a changed surface, apply the shared UI design standard and its review gate: layout, icons and interaction carry the task; prose supplies only necessary context.
Build order
- Slot wiring — register through the documented seams:
sidebar.footer.actionfor the persistent entry; shadowsidebar.workspacesandmain key=conversationonly while a mode is active, reconciling from one store and disposing on exit. Desktop Bot mode also shadows the wholesidebarslot at-1to draw the Bot mode sidebar (ADR-0203); a shadow cannot re-render the nativesidebar.*sub-slots, so it must provide its own way out of Bot mode. Keep one entry per concept. Done when the entry appears in the running shell and the shipped UI returns intact when the mode is off. - Tokens — every colour, font, and radius reads from
--dsw-*(static/alias/specific layers); dark arrives throughbody[data-ds-dark-theme]. Brand accents stay inside the ≤3-entry alias block. Done when thestyles-tokensguard passes and a dark pass shows no unreadable text. - Design system — build Bot-mode surfaces from
packages/client/src/client/ds/(ADR-0194):SettingsDialog,SettingsSection,SettingsRow,Select,NumberStepper,Note,EmptyState, styled with StyleX and the tokens inds/tokens.stylex.ts. Follow its content rules: one title and one control per row, with an optional short description only when it adds a needed fact; switches, choices and steppers apply on change; one text field saves on Enter or blur; at most one primary button; internal ids and revisions stay out of the default view. Visible text follows UI copy. Done when thedesign-system-tokensguard passes and no newbh-rule duplicates a component. - Composition — for a net-new surface or control, pick the closest precedent in
references/design-references.mdbefore choosing layout; borrow composition, hierarchy, and states, not styling. Done when the PR names the borrowed pattern and every deliberate deviation. - Layout — apply the native inset contract in
references/native-contract.md. Done when top-level content measures 16px from both sidebar edges and list-row backgrounds reach the scrollbar gutter. - Primitives & icons — use the exported set (
Input,Tag,Pill,StateDot,Tooltip, …) andIcon*Outline16glyphs where geometry matches; keep a custom icon only where the set has no analogue. Done when controls sit on the shell's grid; record every deliberate omission (for example the 36px capsuleButton) in the PR. - Verify & ship —
pnpm format && pnpm lint && pnpm typecheck && pnpm test && pnpm build; confirm the client bundle requires only react-family plus declared baseline modules; check theweb-devprofile in light and dark. Done when the bundle revision changed and both themes pass by eye.
Rules
-
Native lookups beat intuition: extract the shipped CSS from the installed packages before adding spacing or a control (
references/native-contract.mdhas the recipe). -
One authority per concept: one mode entry, one projection of state; a second entry point reads as a second feature.
-
Tokens over literals;
design-system-tokens.test.tsenforces it. StyleX styles and the plain CSS stylesheets (styles.ts,*-styles.ts, the Browser and Computer sheets) read spacing, type, radius, size, edge width and colour fromds/tokens.stylex.ts, interpolating the constants into CSS strings; no feature-local alias tables. The scale is small on purpose: three type sizes (12/16, 13/20, 14/20) at weights 400 and 500, radiixs/sm/md/lg/panelthat read--dsw-radius-*, edgeshairlineandfocus, and three edge colours (dividerinside a surface,borderfor outer edges and inputs,borderStrongfor hover and emphasis). Separate with spacing and background before reaching for a border. A value off the scale either snaps to it (≤2px) or gets a named allowlist entry with a reason in that test; content-fixed colours (video letterbox) live in a separate delimited block with rationale. -
Layers match mobile (
apps/mobile/DESIGN.md, "Layers and states"): Bot bubbles and cards arecolor.surfacewith no edge, a recessed area inside them (option lists, command previews) iscolor.well, and the Human's pick on a well iscolor.accentTint. A DM's Human bubble takes the Bot's primary colour throughhumanBubbleColors, the same rule as the mobilewithAccent. Action-card buttons are borderless pills: primary isfgwith abaselabel (bh-request-primary), secondary is the opaque--bh-surface-selected, and danger is--bh-on-surface-dangeron--bh-surface-danger; never a translucent role as a fill. -
Baseline externals only in the client bundle; adding one updates the bundle contract test in the same commit.
-
Modes unwind: shadows and listeners reconcile from a single store and dispose cleanly.
-
Pointer menus have one positioning owner: use
ds/PointerMenufor every application right-click menu. Pass unmodifiedclientX/clientY; never add feature-local offsets or construct a coordinate proxy anchor. See the coordinate contract inreferences/native-contract.md. Native anchored dropdowns continue to useMenu, except the measured compact Settings picker and sharedds/Selectunder whole-window zoom; its owning-Modal container contract is recorded in the native-contract reference.
Reference
references/native-contract.md— measured sidebar geometry, the shipped-CSS extraction recipe, and the headless measurement script.references/design-references.md— external precedents (coss.com/ui, Beautiful UI, shadcn/ui, Lucide): what to borrow and what stays out.docs/adr/0194-deepseekbot-design-system-is-stylex-tokens-over-dsh.mdrecords the design system, its content rules and why tokens aredefineConsts.docs/adr/0028-in-harness-ui-uses-dsh-design-system.mdanddocs/research/2026-09-18-dsh-design-tokens-vs-coss.mdhold the decision and the token inventory.
04 同仓库更多 Skills
slide-authoring
Technical reference for writing or editing open-slide pages — file contract, 1920×1080 canvas, type scale, layout, palette/visual direction, assets, speaker notes, stepped reveals, page transitions, and morph transitions. Consult this whenever you are about to write or modify any file under `slides/<id>/`, including from inside the `create-slide` or `apply-comments` workflows, or for any ad-hoc slide edit. Triggers on phrases like "edit slide", "tweak this page", "fix the layout", "change the palette", "reveal one by one", "add a transition", "morph transition", "write the speaker notes", "generate the script / talk track", "investigate the slide framework", "how do slides work here".
current-slide
Resolve which slide, page, and (optionally) selected element the user is currently viewing in the open-slide dev server. Consult this whenever the user references "this page", "this slide", "this element", "the slide I'm on", "the current page", or any deictic reference to slide content without naming it. Re-read `node_modules/.open-slide/current.json` at the start of every such turn — the user navigates between turns, so a value you read earlier in the conversation is almost certainly stale.
create-theme
Use this skill when the user wants to create, draft, author, or extract a slide theme in this open-slide repo. Triggers on phrases like "create a theme", "make a theme called X", "extract a theme from <slide>", "build a theme from these images". Produces two paired files under `themes/` — `<id>.md` (palette, typography, layout, fixed Title/Footer components, motion) and `<id>.demo.tsx` (a runnable demo slide that the dev-UI Themes panel previews). Do NOT use for editing real slides — only for authoring the theme bundle.
create-slide
Use this skill when the user wants to create, draft, author, or generate new slides / a presentation in this open-slide repo. Triggers on phrases like "make slides about X", "make a deck about X", "create a presentation", "draft slides for", "new slide", "a deck with speaker notes / a script", or when the user asks to add content under `slides/`. Do NOT use for editing the framework itself — only for authoring content inside `slides/<id>/`.
apply-comments
Apply pending @slide-comment markers written by the open-slide inspector tool. Use when the user asks to "apply comments", "process slide comments", "apply the inspector comments", or references markers left inside `slides/<id>/index.tsx`.
writing-shape
Writing, exploit: shape raw material into an article, paragraph by paragraph.