Chuyển đến nội dung chính

dsh-floating-sidebar

Đã xác minh

dsh-floating-sidebar · v0.2.3 · MIT · Giao diện 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.

Cài đặt

dsh plugin add dsh-floating-sidebar

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.

Thẻ

Readme

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

  1. Collapse the sidebar (the regular collapse toggle).
  2. 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.
  3. Navigate sessions inside the island as usual.
  4. Move the pointer off the island (and off the logo) — it collapses after a short grace delay. Escape collapses 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:

  1. Bump the version in three places: package.json, the debug-surface version field in lib/client.js, and a new ## X.Y.Z section at the top of CHANGELOG.md.
  2. npm run check + bash scripts/check-consistency.sh (CI runs both).
  3. bash scripts/release.sh vX.Y.Z — verifies consistency and syntax, creates the annotated tag, and pushes main plus 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 by dsh-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 when wide === 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