Preface¶
In DeepSeek Harness (DSH), archiving is a user-triggered manual operation. After an unarchived session in a workspace is archived, the corresponding workspace row in the sidebar does not automatically disappear, resulting in a large number of empty workspaces lingering in the list and crowding out the workspaces that are actually in use.
The dsh-hide-empty-workspace plugin aims to solve this problem. It transforms “workspace becoming empty” into a passively triggered signal: when the number of unarchived sessions in a workspace drops from 1+ to 0, the corresponding sidebar row is automatically hidden. This plugin is only responsible for visual cleanup and does not touch any data layer.
Plugin Overview¶
- Name:
dsh-hide-empty-workspace - Maintainer:
d0ublecl1ck - Positioning: A DSH Web client plugin for automatically cleaning up empty workspaces in the sidebar.
- Core Logic: By listening to session archiving events and detecting when the count of unarchived sessions reaches zero, it hides rows solely by modifying the DOM
displayattribute.
Installation and Activation¶
Installing this plugin requires the DSH plugin management command.
dsh plugin --profile web add dsh-hide-empty-workspace
After installation, refresh the page to enable it. If you need to install from a GitHub source or debug locally, you can use the following commands:
# Install directly from GitHub
dsh plugin --profile web add https://github.com/d0ublecl1ck/dsh-hide-empty-workspace/tar.gz/refs/heads/main
# Install from a local path
dsh plugin --profile web add /absolute/path/dsh-hide-empty-workspace
Usage¶
The plugin provides multiple trigger and recovery mechanisms:
- Auto-hide: When the last unarchived session of a workspace is archived, the workspace row is automatically hidden.
- Manual hide: Hover over any workspace row, click “Hide Workspace” in the inline “…” menu, and it takes effect immediately.
- Restore hidden: Click the “N Hidden” button at the bottom of the sidebar to open the official restore dialog and restore workspaces one by one.
- Auto-restore: When a hidden workspace again has unarchived sessions, the plugin automatically removes its hidden state.
Security Boundaries¶
The plugin strictly adheres to security boundaries in both design and implementation, and does not perform any destructive operations:
- Data Safety: It does not archive, unarchive, or delete any session or workspace.
- Registration Safety: It does not rewrite workspace registrations, and does not touch the
workspacesservice orsettings.yaml. - Network Isolation: The plugin is offline and sends no requests.
- Write Scope: The only data write operation is recording the hidden set in the browser’s
localStorage(with the key namedsh-hide-empty-workspace.hidden.v1). Clearing this data restores default display. - UI Replacement: It does not replace the official UI. It only toggles the
displayattribute on already-rendered official rows, appends options to the workspace row menu, and uses the officialModalfor restore entry. If the official UI is redesigned and causes row marker mismatches, a hint will be displayed at the bottom of the sidebar.
Conclusion¶
dsh-hide-empty-workspace is a lightweight sidebar cleanup tool. Through the “hide when empty” rule, it helps developers keep the sidebar tidy while ensuring extremely high security and compatibility by only modifying the display attribute and limiting localStorage writes.
For more details, directory information, and source code, please refer to:
* GitHub Repository
* Plugin Directory Page