dsh-pinned-sessions: Pin key sessions to the top of the DSH web sidebar

Preface

When running agents across multiple workspaces in DSH Web, the sidebar Session list grows as it groups by workspace. It is easy to miss or misidentify rows when running tasks, completed sessions you haven’t opened, and currently open sessions are mixed within their respective groups.

The community plugin dsh-pinned-sessions (maintained by TianYa-DAO) adds a Pinned area at the top of the sidebar workspace list. It automatically aggregates these sessions by status and supports global pinning via the “…” menu on sessions or workspaces. The following section covers its capabilities, installation methods, and usage notes.

What is this

dsh-pinned-sessions is a client-side DSH plugin (current version 0.2.1, MIT License). It does not modify server logic; instead, it inserts a fixed area above the workspace list in the Web client sidebar to centrally display sessions you “cannot afford to lose sight of” and optionally globally pinned workspaces.

Directory Page: SkillHub - dsh-pinned-sessions
Source Code & Docs: GitHub - TianYa-DAO/dsh-pinned-sessions

What appears in the sidebar

This area only appears when the sidebar is grouped by workspace (By workspace, Workspace tree). When switched to In one list, collapsed to the rail, or displaying search results, the entire Pinned block is hidden, and it does not conceal sessions in the list below.

The structure of the area (top to bottom; empty blocks are omitted; not rendered if all are empty) is roughly as follows:

sidebar
├─ Workspaces            ← Original area header (Search / View / Add workspace)
├─ Pinned                ← Inserted by this plugin
│   ├─ Pinned N          ← Sessions globally pinned from the Session "…" menu
│   ├─ Running N         ← Status derived: running === true (Blue pulse dot)
│   ├─ Unread N          ← completionUnread === true (Green dot)
│   ├─ Open now N        ← retainedBy.mainView > 0 (Hollow ring)
│   └─ Pinned workspaces ← Workspaces pinned from the workspace "…" menu
├─ Workspace group A
└─ Workspace group B

Key points:

  1. Globally Pinned Sessions remain in their corresponding workspace groups below; when the Pinned area is expanded, they do not appear redundantly in Running / Unread / Open now, and the status dots on the rows match their real status. If the Pinned sub-blocks are collapsed, these sessions reappear in their corresponding groups based on status, ensuring you don’t miss running or unread sessions after collapsing.
  2. Running / Unread / Open now are mutually exclusive, with priority: Running → Unread → Open now; each session falls into only one group.
  3. Globally Pinned Workspaces are displayed as collapsible groups in the Pinned area, allowing direct expansion to open sessions; while pinned, the original group of that workspace in the list below is hidden.
  4. Archived sessions and subagent child sessions do not appear; rows are sorted by last updated time; clicking a row opens that session.

Pinning and Unpinning

  1. Session: Use Pin globally / Unpin globally in the Session’s “…” menu (occupying the official slot sidebar.workspaces.session.menu.item, alongside rename, fork, archive, etc.).
  2. Workspace: The workspace “…” menu provides the same operations; DSH does not declare this menu slot, so the plugin injects it into the opened popup via a portal and locates the row based on data-row-key="workspace:<key>".
  3. Session rows and workspace headers in the Pinned area display an unpin control on hover (this is especially important for workspaces, as the original row is hidden after pinning).

Settings and Persistence

You can toggle the entire area in Settings → General → Pinned sessions. The toggle state, pinned sessions/workspaces, and which pinned workspaces are collapsed are saved in the client shared store under the localStorage key dsh.pinned-sessions.prefs.v1.

Installation and Activation

Host requirements (package declaration): DSH >=0.2.0-rc.2 <0.3.0. The README notes it was tested on 0.2.1-rc.1.

Install from npm:

dsh plugin add dsh-pinned-sessions

Install from release package:

dsh plugin add https://github.com/TianYa-DAO/dsh-pinned-sessions/releases/latest/download/dsh-pinned-sessions-0.2.1.tgz

Desktop versions can be installed via the Plugins page. The package declares dsh.bundle, mounts cordis.patch.yml, and the client loads ./client.js via the registry.

After installation, enable Pinned sessions in General, and keep the sidebar in the workspace group view to see the Pinned area.

Typical Usage

  1. When running long tasks, rely on the Running group and the blue pulse dot to see executing sessions at the top of the list.
  2. When tasks complete in the background and you haven’t opened them, the Unread group uses a green dot to mark sessions with completionUnread.
  3. Sessions retained in the main view appear in Open now (hollow ring).
  4. For sessions or entire workspaces you need to keep a close eye on: open the row’s “…” → Pin globally; use Unpin globally or hover over the Pinned area to unpin when no longer needed.

Implementation Highlights (For Troubleshooting)

Plugin is client-only: client.js is loaded via window.__ModuleLoader__.load and registered to shell.overlay; it inserts the host at the top of the scrolling container with the list class inside div[data-slot="sidebar.workspaces"] and removes it upon unmount. Data comes from useSessions, useSessionStatus, useWorkspaces; opening a session goes through ctx.get("uiWorkspace").openSession(id). Styles use dshps-* and --dsw-alias-* theme tokens.

Self-check provided by the maintainer:

npm test

Scenarios and Notes

Suitable for: Developers who frequently switch between multiple workspaces in DSH Web and need to see running, unread completed, and currently open sessions at a glance; those who want to pin a few sessions or entire workspaces at the top of the sidebar.

Notes:

  1. The plugin runs with the permissions of the current DSH client process. It is recommended to read the source code and MIT license before installation to ensure compliance with your security policy.
  2. The layout relies on official sidebar DOM and class names (such as listArea, projectRow, searchResultRow, rail, list); significant sidebar changes may require plugin selector updates.
  3. The workspace menu item is an injected implementation; changes in popup structure may require modifications to client.js.
  4. Client API renaming may cause registration or hook failures; if uiWorkspace is unavailable, it will warn, but follow-up may still be needed for DSH version upgrades.

Community directories like SkillHub are independent of DeepSeek / Higgsfield and are not official app stores; the DSH ecosystem emphasizes “everything is a plugin,” and this plugin is a client-side enhancement within it.

Conclusion

dsh-pinned-sessions aggregates Running, Unread, Open now, and manually pinned sessions/workspaces at the top of the sidebar in the workspace group view, reducing the chance of missing critical tasks in long lists. It can be installed from npm or release packages when needed, and enabled in General as Pinned sessions.

  • Directory Page: https://www.skillhub.cn/plugins/TianYa-DAO/dsh-pinned-sessions
  • GitHub: https://github.com/TianYa-DAO/dsh-pinned-sessions
  • Issue Feedback: https://github.com/TianYa-DAO/dsh-pinned-sessions/issues
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye