dsh-floating-sidebar
已验证dsh-floating-sidebar · v0.2.3 · MIT · Web 界面
DSH web plugin: an icon in the collapsed sidebar rail. Hover it and the real sidebar pushes out as a floating island card over the conversation, so sessions stay navigable while the sidebar is collapsed.
安装
dsh plugin add dsh-floating-sidebar 用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。
源码
发布到 npm 但没有公开仓库。安装前请检查包内容。
标签
说明文档
dsh-floating-sidebar
A DeepSeek Harness Web plugin: in the collapsed sidebar rail, the logo
(whose rail content is the brand mark) becomes the island trigger. Hover it
and the real sidebar pushes out to the right as a floating "island" card
above the conversation — session tree, search, workspaces and settings stay
fully navigable even while the sidebar is collapsed. Move the pointer away
(or press Escape) and it collapses back. Clicking the logo keeps its
official expand/collapse behavior.
Why "the real sidebar"? The island is not a copy. The plugin expands the actual sidebar column through dsh's official panel-action face (
ctx.layout.toggleSidebar()), then floats the column visually and pins the frame grid to the rail width — so no layout reflow, and navigation inside the island behaves exactly like the docked column.
Install
# local checkout (linked, live edits apply after rebuilding/restart)
dsh plugin --profile web add link:/abs/path/to/dsh-floating-sidebar
# or from npm once published
dsh plugin --profile web add dsh-floating-sidebar
Then restart the web surface for the new bundle row to join the running tree:
# restart your dsh web instance
dsh web
Usage
- Collapse the sidebar (the regular collapse toggle).
- Hover the logo at the top of the collapsed rail (~500 ms) — the sidebar floats out as a rounded, shadowed island card. The logo already morphs into the open-sidebar glyph on hover, doubling as the discoverability cue.
- Navigate sessions inside the island as usual.
- Move the pointer off the island (and off the logo) — it collapses after a
short grace delay.
Escapecollapses immediately.
Expanding it docked, not just floating
Click intent always wins — you never have to race the island:
- Click the logo in the rail — the press cancels the pending hover-open and the official action docks the sidebar expanded.
- Island already out and covering the logo? Click that same spot (the rail strip under the island's top edge) — the plugin reads it as the logo click you intended and docks the island in place; the wide toggle at the island's right end does the same.
If you collapse the column from inside the island (the official toggle), the plugin detects it and does not re-expand.
Disable
Target the bundle row in your profile or home cordis.patch.yml:
- id: floating-sidebar
disabled: true
or remove the package: dsh plugin --profile web remove dsh-floating-sidebar.
Releasing
Semantic versioning, one annotated tag per release:
- Bump the version in three places:
package.json, the debug-surfaceversionfield inlib/client.js, and a new## X.Y.Zsection at the top ofCHANGELOG.md. npm run check+bash scripts/check-consistency.sh(CI runs both).bash scripts/release.sh vX.Y.Z— verifies consistency and syntax, creates the annotated tag, and pushesmainplus the tag. The release workflow then publishes the GitHub Release from the tag.
Publishing to npm is a separate, deliberate step: the files whitelist
(lib, cordis.patch.yml, docs, license) is already in place, so
npm publish after the release tag is all it takes.
Architecture
| Piece | Role |
|---|---|
cordis.patch.yml |
Bundle patch: inserts the empty host row (dsh.client discovery anchor). |
lib/index.js |
Host half: empty apply — the row's only job is to exist. |
lib/client.js |
Browser half: classic script registering a factory via window.__ModuleLoader__.load; mounts headlessly through the sidebar.footer.action seat, hooks the rail logo as the hover trigger, and owns the island state machine. |
The browser half injects only the framework services slots, layout and
locale; its module dsh.client.inject lists the package rows that must
arrive first. No runtime npm dependencies in the browser (React arrives from
the platform seed). CSS is injected as a plugin-owned <style> tag using dsh
design tokens, so it follows the active theme.
Slot contract
- Registration:
sidebar.footer.action(list seat, declared bydsh-client-ui-sidebar) — mounted headlessly: it renders nothing and exists to receive the seat's owner share. - Owner share:
{ wide }— the logo hook attaches only whenwide === false(the 56 px collapsed rail); the wide flip suspends it. - Trigger hook: the rail logo row's expand toggle (its rail content IS the brand mark) — official DOM, hover-hooked with native listeners; clicks keep the shell's expand/collapse behavior.
- Expansion:
ctx.layout.toggleSidebar()— the same public face the official toggle uses.
License
MIT