Preface¶
In the DSH Web client, the left sidebar becomes cluttered with panel entries registered by various plugins. With many panels, scrolling to find entries and squeezing the chat area on narrow screens are daily operational costs. The community previously used dsh-mobile-layout on the WSL side with drawers and FAB to alleviate small-screen layouts, but it didn’t always align with the new DSH DOM anchors.
dsh-sidebar-tidy (maintainer feiyu-whale-05, Category: Client) targets the DSH 0.2.2-rc.3 Web sidebar: stowing secondary panels into “More”, supporting drag-and-drop sorting, and merging mobile drawer layouts with close animations, while providing optional file logging. Below, it is explained by function, configuration, and precautions.
What is this¶
- Repository: feiyu-whale-05/dsh-sidebar-tidy
- Directory Page: SkillHub Plugin Page
- Version (recorded):
0.2.2-rc.3, consistent with current DSH version - License: MIT (
package.json); Mobile layout logic merged from MIT-licensed WSL plugindsh-mobile-layout, rewritten according to 0.2.2-rc.3 anchors
The plugin is injected on the client side with immediately: true, primarily modifying the Web left sidebar interaction and styles, and registering a log receiving route on the Host side.
Sidebar Tidying: More Menu and Drag-and-Drop¶
Embedded List and Top Fixed¶
The panel list in “More” is embedded within the sidebar, not a floating layer: expanding it naturally pushes down the workspace/session list below. When the sidebar is collapsed into a rail, behavior reverts to a floating layer.
When the sidebar scrolls, the “Plugins / Superagent / … / More” section stays sticky at the top; the brand row and new session remain outside the scroll area, and the bottom user/settings area remains fixed. The implementation acts directly on [data-sidebar-scrollport] > nav, not relying on JS-added classes, so React re-mounting nav won’t break it.
Drag and Drop and Icons¶
- Dragging sidebar buttons up and down = adjusts order; dragging below “More” = stows them in “More”.
- Dragging rows in “More” up and down = sorts; dragging back to sidebar = re-fixes them to the main bar.
Icons try to render the icon components registered in sidebar.panellist for each panel; third-party plugin panels can also display real icons; if rendering fails, it falls back to built-in icons and logs (see Interface Audit below).
Theme¶
Styles use --dsw-alias-* theme tokens uniformly for both light and dark modes; drag hints use tooltip semantic colors to avoid white-on-white in dark mode.
Mobile Drawer Layout¶
This plugin incorporates the drawer, FAB, and mask logic from the WSL side dsh-mobile-layout and rewrites it based on the stable anchors of 0.2.2-rc.3 (e.g., [data-shell-overlay], data-sidebar-toggle / data-sidebar-opener), avoiding hardcoding old version Chinese/English text.
Three-Mode Selection¶
A Mobile Layout dropdown is added in Settings → General; selection takes effect immediately and writes to localStorage. The menu is drawn with theme tokens, not a native <select>.
| Mode | Behavior |
|---|---|
always (default) |
Enabled at any width: chat area fills, bottom-left ☰ FAB, sidebar slides in from left as a 280px drawer with a mask |
auto |
Enabled when viewport <= 1023px; desktop width keeps official layout |
off |
Mobile layout not enabled |
Animations and Toggle Logic¶
- Open: 240ms slide-in.
- Close: Add
st-ml-closingfirst, slide out 180ms with mask fading out, remove node after animation ends to avoid sudden disappearance. - Close animation when
prefers-reduced-motion: reduceis on.
The official “Open Sidebar” in the top-left and the circular FAB share the same logic; in mobile mode, a replacement button fixed on the same line as the title bar is used (hiding the official opener to avoid Windows title bar shell.leading position jitter). When the drawer closes, the official sidebar closes synchronously to avoid the button disappearing or being retracted twice.
Keyboard: Esc can close the drawer (focus trap not implemented, consistent with original WSL plugin).
Canary Fail-safe¶
DSH major version upgrades may cause changes in the three-column DOM anchors. The mobile layout has a “arm after passing a health check” canary: counts nodes in the frame’s direct children with st-ml-col-1/2/3; only determines contract drift if counted as 0 for about 10 seconds (40 times × 250ms).
Upon triggering, only unload the mobile layout half (CSS, FAB, mask, related classes); the sidebar tidy from the main plugin still uses the official slot; failure direction is to revert to the official native layout. Events are logged as canary tripped via console.warn and file logs.
Logs (Optional)¶
The Host writes logs to the config directory; default example path (Windows):
D:\DSH-plugins\log\dsh-sidebar-tidy\dsh-sidebar-tidy-YYYY-MM-DD.log
Split by day; when a single file exceeds 4 MiB, it rolls over to *.log.1 (only keeping one backup). Line format example:
2026-11-14T14:40:00.123+08:00 | INFO | host | plugin.apply | dsh-sidebar-tidy host half activated | {"version":"0.2.2-rc.3",...}
2026-11-14T14:40:05.000+08:00 | INFO | client | more.open | 打开「更多」 | {"hidden":2,"rail":false} page={"id":"ab12cd34","path":"/","locale":"zh","dark":true}
The client reports via DSH Connection sharing the /api channel:
- Host:
ctx.connection.fetch.register({ path: '/api/dsh-sidebar-tidy/log', methods: ['POST'], fetch }) - Client:
ctx.connection.rpc.call('/api', 'dsh-sidebar-tidy/log', { records, page })
Authentication and envelope validation are done by the Connection layer; log failures only show a prompt in the console, not affecting sidebar functionality.
In config of cordis.patch.yml, you can change directory, level, max file size, etc.:
- insert:
- id: sidebar-tidy
name: dsh-sidebar-tidy
config:
logDir: 'D:/DSH-plugins/log/dsh-sidebar-tidy'
enabled: true
level: debug # debug | info | warn | error
maxFileBytes: 4194304 # 4 MiB
maxRecords: 200 # Single RPC max records received
Installation and Enablement¶
The installation entry in the documentation is on the SkillHub directory page: Send to DeepSeek Harness to Install. The wording instructs the host to install plugin feiyu-whale-05/dsh-sidebar-tidy and read the repository description first. Specific pull and enable steps depend on your current DSH version’s plugin manager capabilities; please refer to the directory page and GitHub README.
After enabling, the Web client will immediately load the sidebar modification; if using mobile layout, first select always / auto / off as needed in Settings → General → Mobile Layout.
Security Tip: The plugin runs with the current DSH process permissions. Please review the source code and MIT license yourself before installing, and confirm the source is the aforementioned GitHub repository.
Typical Usage¶
- Tidy Panels: Drag sidebar buttons you don’t use often to below “More”.
- Adjust Order: Drag up and down to sort in the main bar or inside “More”; drag back to the main bar to restore from “More”.
- Narrow Screen or “Mobile-style” Layout: Default
alwaysuses FAB + drawer at any width; if you only want it enabled on small screens, switch toauto. - Troubleshooting: To track “More” opening, icon fallbacks, or canary unloading, enable logs in
configand check the Host log directory; level can be set todebug.
Entries like “Browse More Plugins” or “Create Your Plugin” are automatically hidden if pluginNavigation, uiWorkspace services are missing, not affecting the main sidebar tidying functionality.
Suitable Scenarios and Known Limitations¶
Who is it for
- DSH Web users who have installed multiple sidebar panels and want to fix common entries while stowing the rest into “More”.
- Users who need a drawer layout on narrow screens or want a full-width chat area (especially when migrating from the WSL version
dsh-mobile-layoutto 0.2.2-rc.3).
Things to Note
- Panel order depends on modifying
entry.options.orderand jittering the locale revision; this is a compatible implementation of current DSH behavior, requiring regression verification after major version upgrades. - The mobile layout is a DOM/CSS overlay; it may fail if DSH updates change frame/sidebar structure; only warns once if frame cannot be found.
- Does not automatically delete historical logs; if optional entries like
pluginNavigationare missing, only the corresponding menu item is hidden. - The decorative separator for
[data-dsh-stats]in the Aqua theme has not been moved over (belongs to WSL profile third-party theme, not DSH core).
Closing¶
dsh-sidebar-tidy consolidates sidebar “More + Drag + Real Icons” with optional mobile drawer, close animations, canary fallback, and file logs into one client plugin, targeting DSH 0.2.2-rc.3. To install or see the latest instructions, visit the SkillHub Directory Page and GitHub Repository. SkillHub is a community plugin directory with no official affiliation to DeepSeek / Hypothesis; the DSH ecosystem advocates “Everything is a plugin”; whether to adopt this plugin is up to your local review.