dsh-plugin-pin-session
Manifest validAdds Pin/Unpin to the sidebar session-row menu and a collapsible Pinned Sessions group above the session list, with host-side persistence, hover quick-unpin, collapse memory, and live running-state do
dsh-plugin-pin-session
JSON API —
GET /pin-session/pins · POST /pin-session/pin · POST /pin-session/unpin
A DeepSeek Harness web plugin that pins sessions: a collapsible Pinned Sessions group above the sidebar session list, plus Pin / Unpin entries in every session row's
...menu. Pure client+host bundle — zero changes to DSH core, pin order stored host-side so it follows you across browsers and origins.
✨ Features
- 📌 Pin / Unpin in the row
...menu — one entry per row, label reflects current state. - 🗂️ Collapsible Pinned Sessions group directly above the session list:
- click a pinned row to open that session (
sessions.open); - hover reveals an
×quick-unpin; - header toggles collapse (persisted per browser via
localStorage); - sessions no longer present in the list render dimmed and are not clickable.
- click a pinned row to open that session (
- 💾 Host-side storage at
$DSH_HOME/storages/pin-session.json— pin order is oldest-first and consistent across browsers and origins. - 🧩 Zero core surgery — pinned sessions stay in the chronological list; the shipped WorkspaceBrowser is left untouched.
🚀 Install
dsh plugin --profile web add github:NattoCB/dsh-plugin-pin-session
Then add "dsh-plugin-pin-session" to dsh.profile.bundles in the profile's
package.json. A DSH restart is required — new client bundles join the boot
graph only at process start.
Local checkout instead?
dsh plugin --profile web add file:/absolute/path/to/dsh-plugin-pin-session
⚙️ How it works
| Half | Mechanism |
|---|---|
| Host | webServer.register({ kind: 'prefix', path: '/pin-session' }) JSON API over an atomic JSON file store |
| Row menu | The shipped session-row menu portals a role="menu" element to document.body; a MutationObserver matches each menu to its row via React fibers (props.node.id) and appends one Pin/Unpin item styled with the menu's own classes, closed by an outside pointerdown |
| Section | A React root planted before the [role="tree"] session list renders each pinned row's own real primitives.Menu, anchored at that row's ... button and wired to the same live callbacks (onRename(id, title) / onFork(id) / onArchive(id)) resolved from the row's fiber |
The shell freezes every vendor module it serves (Object.isFrozen(primitives) === true),
so shared components cannot be monkey-patched — but they can be called. The
section menu therefore opens at the pinned row (not wherever the original row
is scrolled) while rename/fork/archive stay single-sourced in the shipped
browser; the ... affordance hides while the real row is not rendered
(collapsed group / filtered list).
No pin icon ships in the primitives set, so the menu item embeds its own pushpin SVG.
✅ Verify after refresh
- Sidebar shows Pinned Sessions above the list once at least one session is pinned.
- Hover a session row →
...→ Rename / Fork / Archive + a pushpin-iconed Pin. - Click Pin → row appears under Pinned Sessions; menu flips to Unpin.
- The pinned row's own
...opens right at that row with the same actions. - Click a pinned row → that session opens; Unpin removes it.
- Collapse the group → reload page → collapsed state survives (
localStorage). cat ~/.dsh/storages/pin-session.jsonshows the id list.
🔌 API
GET /pin-session/pins -> { pins: [{ id, title?, pinnedAt }] }
POST /pin-session/pin {id, title?} -> { pins }
POST /pin-session/unpin {id} -> { pins }
🧪 Test
npm test # node --test — 11 cases across store + HTTP router
License
MIT — see LICENSE.
Comments
Loading…
Similar plugins
by fallow5
Pin and unpin sessions to the top of the Web sidebar with a dedicated pinned panel, archive section, and native three-dot menu integration.
★ 1
MIT
JavaScript
Sep 4, 2026
dsh plugin --profile web add @opendsh/dsh-plugin-pin-sessionsby NattoCB
Adds a Workspaces / Recent-sessions switcher above the sidebar list, with a pinned-sessions group, a per-row menu (pin/unpin, copy session id), title filtering, and browser-local pin storage with a on
★ 1
MIT
JavaScript
Sep 10, 2026
dsh plugin --profile web add dsh-plugin-sidebar-viewsby 121212165
dsh plugin: cross-session pinboard, pinned notes injected into every session system prompt (/pin /unpin /pins + pin_add)
★ 0
MIT
TypeScript
Sep 29, 2026
dsh plugin --profile web add dsh-plugin-pinboardby AndreyTepaykin
Pinned-sessions block for the DeepSeek Harness sidebar: a collapsible pinned panel above the Settings row, hover pin buttons on session rows and a session-header toggle. Pins live in the plugin's own settings namespace.
★ 0
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-sidebar-pinsby jackovibe
Codex 式会话置顶与归档风格的 DSH Web 插件(置顶=标记不是排序,宿主持久,零顺序改动)
★ 1
MIT
JavaScript
Sep 23, 2026
dsh plugin --profile web add dsh-codex-pinby 439436269-ctrl
DSH 插件:侧栏内联的「置顶」会话分组(原生度量 + 就地搜索)。A pinned-session group in the DeepSeek Harness sidebar.
★ 0
MIT
JavaScript
Oct 7, 2026
dsh plugin --profile web add @vfvrpq/dsh-pinned-sessions