dsh-sidebar-fold
Fold the DeepSeek Harness sidebar's global panel list into one collapsible row.
The sidebar stacks a block of global entries — Plugins, Plugin market, Schedules, Context insights, Free search, HyperFrames, More — between New session and the workspace tree. They are useful but rarely used, and they cost vertical space every day. This plugin puts a single fold row above that block:
- Expanded — the original panel rows, plus one lighter row above them.
- Folded — the whole block goes away; only a faint one-line toggle remains, and the workspace and session list move up.
- The fold state is stored in
localStorageunderdsh.sidebar.globalPanelsCollapsed, so it survives reloads, restarts and host upgrades. - The toggle takes its label from the block's own accessible name, so it follows the interface language.
Install
dsh plugin --profile web add github:zeng-x-ZX/dsh-sidebar-fold
Then refresh the window once (Ctrl+R). No restart needed.
To uninstall: remove dsh-sidebar-fold from the bundle list in the Plugins panel; the injected row and styles are removed with the client module.
How it works
The plugin never patches host files and never rebundles app.asar:
- The Client module watches the page with a
MutationObserver(rAF-throttled), finds the panel list (nav[class*="panelList"]), and inserts a toggle button in front of it. - Folding sets
display: noneon thatnav. The React node is not unmounted, so a host re-render keeps working, and the observer re-inserts the toggle and re-applies the state when the sidebar is rebuilt.
Known limit: if a host release renames the panel list container so its class no longer contains panelList, the toggle stops appearing. Nothing else breaks; the fix is the single findNav selector in client.js.
Compatibility
Built and verified on DeepSeek Harness 0.2.2-rc.5 (Web desktop, Windows). It relies only on the sidebar's public DOM shape and on the client module loader, so it carries no peerDependencies.
License
MIT.
还没有评论,来写第一条。