dsh-tidy: Organize Workspaces and Sessions Not in Use with the Sidebar Storage Area

Introduction

When using DeepSeek Harness (DSH) for long periods with multiple workspaces and sessions, the sidebar can become cluttered: some directories are only opened occasionally, and some conversations have ended but you want to keep the records, yet they occupy list space every day. Deleting folders or clearing sessions frees up space, but that’s often not what you want—you simply want a cleaner interface.

dsh-tidy (maintained by JHyugou) is a client-side plugin in the community directory: it adds a collapsible stash area between the “Plugins” row and the “Workspaces” section in the sidebar. You can use drag-and-drop to stash workspaces (including all their sessions) or individual sessions that you don’t need temporarily, and restore them when needed. Stashing only affects the sidebar display; it does not modify workspace directories, session data, or host storage.

What is this

dsh-tidy can be summarized as: a Sidebar stash area for DeepSeek Harness.

The stash list is stored in the browser’s localStorage (key dsh-tidy.stash.v1, automatically migrated to v2 upon reading), persisting across restarts. It does not write to the host or modify workspace and session entities themselves.

Location of the Stash Area in the Sidebar

The stash area is inserted between the “Plugins” panel row and the “Workspaces” section header. The logical structure is roughly as follows (consistent with the README diagram):

[Brand / New Session]
[Plugins]                 ← Global panel row (ui-plugin-manager)
[Stash Area  N items  Restore All]  ← dsh-tidy (Collapsible before title)
     Individual session stashed (hides only this row, workspace remains)
     Workspace stashed (all sessions under it disappear from the list)
[Workspaces  Search  Settings  New]  ← ui-workspace section header
  ...

The empty state occupies only one line (approx. 28px); it expands into a title and list only when items are stashed. Clicking the collapse control before the title collapses the entire block to one line, and the collapse state is preserved across page refreshes.

Core Features

Drag-and-drop Stashing and Restoration

Action How to
Stash Workspace Drag the workspace title row (with folder icon) into the stash area → The workspace and all sessions under it disappear from the sidebar
Stash Individual Session Drag the session row into the stash area → Only hides that row; the workspace and other sessions remain unchanged
Collapse / Expand Click the collapse marker before the stash area title; state is persisted
Single Restore Click “Restore” on the right side of the row, or drag the stashed row back to the “Workspaces” list below
Bulk Restore Click “Restore All” on the right side of the title bar
Clean up Invalid Items Shows “No longer exists” if the workspace has been deleted; clicking “Remove Record” only clears the stash record

Supplementary behavior (noted in the README):

  • The “New Session” placeholder row cannot be stashed; a prompt will appear.
  • If a session is stashed and its workspace is also stashed, the row will be marked “With Workspace”; after restoring the workspace, the session remains stashed and must be restored individually.
  • Active workspaces or sessions can also be stashed; sessions will not be closed. They remain accessible via restoration, search, URL, or other entry points.

Implementation Details (Coupling with DSH)

The sidebar shell lacks an official slot “between the plugin row and the workspace section,” and sidebar.workspaces is a single-slot interface, making it impossible to simply replace ui-workspace. This plugin adopts a headless slot + DOM mount approach:

  1. Register a headless component in shell.overlay that produces no visible DOM, to utilize hooks like useWorkspaces;
  2. Use a React portal to mount the stash area at a precise position on [role="tree"], tracing up to just before the “Workspaces” title container;
  3. Use CSS attribute selectors to hide corresponding rows: workspace:<id> collapses the entire group, session:<id> hides a single row; a fallback exists for browsers not supporting :has().

The host side also provides a read-only diagnostic route /api/dsh-tidy.status. If dependencies (row data-row-key, drag-and-drop payload, anchor DOM, etc.) change, the stashing capability will degrade and log a [dsh-tidy] warning, without affecting other DSH functions.

Installation and Enablement

The installation method in the README uses a local directory link as an example (code changes take effect immediately). The commands for first-time installation and uninstallation are as follows—replace <local-dir-path> with the absolute path of the plugin directory after cloning or unzipping; do not guess commands like dsh plugin add github:... that are not in the documentation based on the plugin name.

# First-time installation (desktop profile)
dsh plugin --profile desktop add <local-dir-path>

# Uninstall
dsh plugin --profile desktop remove dsh-tidy

Once installed, the host will hot-load the client bundle (dsh-client-modules incrementally scans Loader entries), but already open DSH windows require a refresh (Ctrl+R) to pull the new browser bundle.

The community directory page may provide installation guides for general users; regardless of the installation channel, it is recommended to review the repository source code and the MIT license before installing, and ensure the plugin runs with the same DSH process privileges as yours.

Typical Usage

After the installation and refresh mentioned above, you can test it yourself in the following order:

  1. Find the stash area below the “Plugins” row in the sidebar (one line in the empty state).
  2. Drag a workspace title row that you don’t need temporarily into the stash area, and confirm that its sessions disappear from the list.
  3. Alternatively, drag a specific session row in individually, and confirm that only that row is hidden.
  4. When needed, click “Restore” or drag it back to the workspace list; you can also click “Restore All”.
  5. If a workspace has been deleted from the disk, use “Remove Record” in the stash area to clean up invalid items.

For troubleshooting, you can use the diagnostic API in the DSH window DevTools console (excerpt):

__dshTidy.state()        // Current stash list and collapse state
__dshTidy.anchor()       // Insertion point resolution result
__dshTidy.mounted()      // Whether the mount container is in place
__dshTidy.probe(id)      // Whether the id is identified as a workspace or a session
__dshTidy.unstashAll();  // Equivalent to Restore All

Verification commands in the repository (for maintainer self-testing, optional):

node --test                    # 43 unit tests
node tools/verify.mjs          # 5 host-side tests
node tools/browser-check.mjs   # 31 real browser tests (SKIP if no Chrome/Edge)

Use Cases and Caveats

Who it’s for: Developers who frequently work with multiple repositories or long sessions in parallel in DSH, want to keep the sidebar readable, but don’t want to delete data or close sessions.

Known Limitations (from the README):

  • Flat View (“Group by session”) and search results do not have workspace rows: You cannot drag workspaces into the stash from there, but items in the stash area can still be restored; sessions of stashed workspaces are also hidden in the flat view.
  • Stashing is about display, not data; the list is in localStorage, so it will be lost if you switch browsers or clear site data. The actual workspaces and sessions are unaffected.
  • In Privacy Mode, localStorage is unavailable: The list degrades to being valid only for the current session.

The DSH ecosystem emphasizes “everything is a plugin”; SkillHub and other community directories are independent sites and have no official affiliation with DeepSeek / Hithink RoyalFlush. Please review the code and permission boundaries yourself before installing third-party plugins.

Conclusion

dsh-tidy uses a collapsible sidebar stash area to move “temporarily unused” workspaces or sessions out of the list, allowing you to drag them back or restore them with one click when needed, without touching the underlying data. If you are organizing your DSH desktop sidebar, you can check the documentation and source code via the directory page or the GitHub repository:

  • Directory Page: https://www.skillhub.cn/plugins/JHyugou/dsh-tidy
  • GitHub: https://github.com/JHyugou/dsh-tidy
羽毛球分组比赛记分
小程序二维码

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

Xiaoye