Introduction¶
When running multiple workspaces and sessions simultaneously in DeepSeek Harness (DSH), the left sidebar can quickly become a long list of names: some are running, some are waiting for your confirmation, some have finished but the completion alerts haven’t been viewed yet, and idle workspaces still occupy expanded space. The host sidebar has basic expansion logic, but it does not reorder items based on “who was recently busy” or systematically collapse idle groups.
Here, we introduce the community plugin dsh-sidebar-focus (Maintainer: wjingshan, Category: Client). It does only one thing: adjusts the order and expansion state of workspaces in the sidebar based on whether sessions are running, selected, or recently active. Each rule corresponds to a toggle switch that can be turned off individually, allowing the sidebar to revert to native behavior.
What is this¶
dsh-sidebar-focus is a pure Web client plugin (dsh.client.platform: web). It injects into @deepseek-ai/dsh-client-ui-workspace and does not occupy server-side logic. The current package version is 0.3.2, and the license is MIT.
GitHub: https://github.com/wjingshan/dsh-sidebar-focus
Community Directory: https://www.skillhub.cn/plugins/wjingshan/dsh-sidebar-focus
SkillHub and other community directories are not officially affiliated with DeepSeek or High-Flyer. Since capabilities in the DSH ecosystem are often mounted via plugins, it is recommended to review the source code and license before installation.
Core Features¶
The configuration entry is located on the Plugin Page → Open the details page for dsh-sidebar-focus (between the description and the line list). It contains six toggle switches and a counter for “Keep only the last N active workspaces expanded” (− / +, range 0–20, where 0 disables this rule).
| Setting | Default | Function |
|---|---|---|
| Pin Recently Active Workspaces | On | Workspaces with past session activity are moved to the front and sorted by most recent activity. They do not drop back to their original position upon completion; only newer activity pushes them down. This only affects display and does not rewrite your manual drag order. |
| Pin Workspace with Current Session | On | The workspace containing the currently selected session (including newly created blank sessions that haven’t started running yet) is moved to the front. |
| Auto-expand Running Workspaces | On | Workspaces containing sessions currently running or waiting for your action are automatically expanded. |
| Pin Active Sessions | On | Sessions that are running or waiting for your action are pinned to the top within their workspace. |
| Collapse Non-Running Workspaces | On | Workspaces without running sessions remain collapsed. Workspaces that just finished running stay expanded for about 2.5 seconds before collapsing. |
| Preserve Unread Completion Alerts | On | Workspaces containing “Completed but not viewed” status do not automatically collapse. |
| Keep Only Recent Active Workspaces Expanded | 2 | The top N workspaces with recent activity remain expanded; others become idle and are collapsed after a grace period. |
When any switch is turned off, the corresponding DOM markers are removed, CSS rules become invalid, and that specific behavior completely reverts to the host default, with no “half-on” state.
Intent Exemption and Exceptions¶
To avoid “collapsing immediately after you click to open,” the plugin respects manual actions within the current page session:
* Idle workspaces you manually expand remain expanded until that workspace becomes busy and then idle again.
* Busy workspaces you manually collapse likewise remain collapsed until the busy status changes.
* Rules resume taking effect after a page refresh.
Additionally: Ungrouped items never auto-collapse; the workspace containing the currently selected session remains expanded to prevent the session switch from landing on a collapsed group.
Implementation Details (for Troubleshooting)¶
- Workspace sorting uses flex
orderfor display only; it does not move DOM nodes or write toWorkspace.sessionIds. - To determine “is it running,” it reads the status dots on the line, plus the
useSessionStatussnapshot and theuseWorkspacesmember list to avoid missing newly started sessions when the group is collapsed. - Sub-workspaces (tree grouping) do not participate in workspace-level pinning (
orderis invalid within nested groups); session-level sorting still applies. - Auto-collapse is written to the view store via the host
ctx.get('uiWorkspace').view.setGroupExpanded(key, expanded). Workspaces that were auto-collapsed may remain collapsed after the plugin is unmounted; you may need to manually expand them or disable the plugin on the settings page and refresh.
Installation and Activation¶
When published to npm:
dsh plugin --profile web add dsh-sidebar-focus
If not yet on npm, use the GitHub source:
dsh plugin --profile web add github:wjingshan/dsh-sidebar-focus
After installation, refresh the Web page; the README states that the plugin’s host-side footprint is nearly empty, so restarting dsh web is not required.
The plugin runs on the browser side with the permissions of the current DSH process. Please review the repository source code and the MIT license terms before installing.
Typical Usage and Self-Check¶
- Install and refresh the page. Toggle the six rules and adjust “Keep last N expanded” on the plugin details page as needed.
- Open a workspace with a running session: it should auto-expand and float to the front of the list (when relevant toggles are on).
- Leave a workspace idle: it should collapse by default; if manually expanded, it should remain expanded during the current page session.
- After a session finishes: the workspace should not immediately drop back to the original order or instantly collapse (when grace period and unread alert rules are active).
- No errors starting with
[dsh-sidebar-focus]should appear in the browser console.
If a host UI structure upgrade causes a contract mismatch, the plugin might silently fail (markers have nowhere to mount). If setGroupExpanded is missing, the collapse function will turn off and show a warning on the details page.
Scenarios and Notes¶
Suitable for: DSH Web users who run agents in parallel across multiple workspaces daily, need “busy ones float to the top, idle ones collapse,” and do not want to modify host source code.
Notes:
- Status determination uses
ongoing(running) andwarning(waiting for you);erroris not involved in the busy determination. - Auto-collapse persists
groupExpansion; the collapsed state may remain after the plugin is uninstalled. - Relies on the built-in
dsh-client-ui-workspaceDOM and store contracts; attention to plugin updates is needed after major host version changes.
Conclusion¶
dsh-sidebar-focus hands over the sidebar order and expansion to “what is actually running” and “which session you are currently viewing.” The rules are split into reversible switches, reducing the need for manual dragging and clicking to collapse/expand during busy/idle transitions. For more information, see the community directory skillhub.cn/plugins/wjingshan/dsh-sidebar-focus and GitHub wjingshan/dsh-sidebar-focus.