dsh-sidebar-rail: DSH Left Sidebar Dual-Track Parallel Layout

Preface

The left sidebar of the DeepSeek Harness (DSH) Web client defaults to stacking the navigation panel and the session list in the same column. With many panels, vertical space becomes tight as you have to switch plugin panels and find sessions. The community plugin dsh-sidebar-rail (maintainer boonelueng) does not modify the DSH installation package but performs DOM enhancement in the browser: a narrow vertical rail on the left holds functional area icons, while the native session and workspace list on the right is preserved, supporting custom entries and expand/collapse.

What is this

dsh-sidebar-rail is a DSH client-side plugin (platform: web) and, in terms of classification, an extension that modifies the interface layout. It does not register the sidebar slot (registering this slot would replace the entire column of navigation), but instead relies on the stable anchor points [data-slot="..."] output by the DSH slot renderer to construct a side-by-side dual column on the existing structure. Collapsed states and narrow screen drawer states automatically exit, fully reverting to the native layout.

The project is hosted on GitHub: boonelueng/dsh-sidebar-rail. Directory page: SkillHub Plugin Page. License is MIT, current package version 1.0.0.

Layout & Core Behavior

Once active, the left sidebar is visually divided into two vertical columns; the logo row, new session button, and the bottom foot area still span both columns, consistent with the README diagram.

The left narrow rail from top to bottom is:

  1. All panel icons registered by installed plugins on sidebar.panellist (newly installed plugins will appear automatically)
  2. A thin separator line
  3. Custom entries configured by you in settings
  4. Expand / Collapse button (» expand, « collapse)

The right side is the session / workspace list, inheriting DSH’s native ui-workspace (search, grouping, drag-and-drop capabilities remain unchanged), occupying the remaining width.

Expand and Collapse

  • Collapsed (default): Rail width is about 40px, icons only.
  • Expanded: Widen and display text labels next to each panel / entry; width adapts to the sidebar’s actual width, with an upper limit of 180px, and always reserves at least 150px for the session area.
  • State is saved in the localStorage key dsh-sidebar-rail.railExpanded.v1, persisting after refresh.

Drag and Drop Sorting

Panel icons and custom entries within the narrow rail can be reordered by mouse drag: dragging starts only after moving more than 4px to avoid accidental clicks. After releasing:

  • Panel icon order → dsh-sidebar-rail.navOrder.v1 in localStorage (recorded by aria-label)
  • Custom entries → reorder the array in dsh-sidebar-rail.custom.v1

The “More” menu button is fixed at the end and does not participate in sorting. Dragging is also available in the expanded state.

Custom Entries

The entry point is in the DSH Settings Page; there is no longer a gear on the sidebar: bottom-left avatar → “Settings” → the last section of the left navigation Sidebar Entries.

In the settings page, you can move up / move down / edit / delete entries, or add entries (max 2 characters for icon, name, action). There are four action types to choose from:

Type Behavior
prompt Fills the preset prompt into the current session input box (does not send automatically)
session Opens a new session and sends the prompt
panel Switches to a full-screen panel (e.g., plugins)
url Opens the link in a new tab

Supports export / import JSON, and reset to default (returns to the two built-in examples). Data is stored locally in the localStorage key dsh-sidebar-rail.custom.v1 and not uploaded.

Installation & Enablement

The plugin is developed and verified on DSH 0.2.1-rc.2; engines.dsh requires >=0.2.1-rc.1 <0.3.0-0, Node >=24.9.0.

Execute in the terminal:

dsh plugin --profile web add github:boonelueng/dsh-sidebar-rail

After installation, perform a hard refresh Ctrl+Shift+R in the browser.

Manual Installation (Optional)

  1. Put the plugin directory into ~/.dsh/profiles/web/dsh-sidebar-rail/
  2. Create a junction or symlink in ~/.dsh/profiles/web/node_modules/dsh-sidebar-rail pointing to this directory
  3. Append to the end of ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
    - id: dsh-sidebar-rail
      name: dsh-sidebar-rail
  1. Hard refresh Ctrl+Shift+R in the browser

DSH with @deepseek-ai/dsh-hmr listens to cordis.patch.yml: changing the file or disabling/enabling via the plugin manager will apply in real-time; changes to the host side index.mjs require a reload, and refreshing the client client.js page is sufficient.

Typical Usage

Configure Shortcut Actions: Add an entry in Settings → Sidebar Entries with action prompt, filling in common system prompts or templates; clicking the corresponding icon on the narrow rail will write the text into the input box, which you can then send manually.

Temporarily Disable Plugin Effect (retaining diagnostic capabilities only): Execute in the browser console:

localStorage['dsh-sidebar-rail:off'] = '1'

To restore:

localStorage.removeItem('dsh-sidebar-rail:off')

Then refresh the page.

Troubleshoot Layout Takeover Success: Execute __DSH_RAIL__ in the console; tagged: true indicates successful takeover; disabled being 'collapsed' | 'switch' | null explains why it is not currently taking over; a false value in anchors indicates that the corresponding DOM anchor was not found.

Implementation Details (For Troubleshooting)

The plugin uses the <div data-slot="..." style="display:contents"> wrapped by DSH for each slot as a stable addressing surface, locating [data-slot="sidebar.panellist"] and its parent <nav>, as well as the parent node of [data-slot="sidebar.workspaces"], and then uses absolute positioning and measured margins to make the session area yield. Because React may remount, the layout uses MutationObserver and requestAnimationFrame for continuous re-measurement instead of hardcoding grid row numbers.

Scenarios & Notes

Suitable For: Developers who use multiple panel plugins on DSH Web for a long time, want a clearer division between “switching panels” and “selecting sessions” on the left, and need local one-click custom actions (filling text, opening panels, opening links, etc.).

Boundaries & Permissions:

  • The total sidebar width is still restricted by DSH itself (264–420px); when the window is very narrow, you can collapse the sidebar and use the native form.
  • In the collapsed state (56px), the plugin does not take over, keeping the native icon bar.
  • If DSH significantly changes the sidebar DOM structure and the anchors fail, the plugin will automatically revert to the native layout; you can use __DSH_RAIL__.anchors and errors to locate the issue.
  • The plugin runs with the current DSH process and browser context; the logic is implemented in the client client.js. Before installing, it is recommended to check the source code and LICENSE, to ensure it meets your security and compliance requirements. SkillHub and others are community directories with no official affiliation with DeepSeek / Hypothesis.

Uninstalling: Delete the corresponding insert segment at the end of cordis.patch.yml, hard refresh to confirm the native layout is restored, and then remove the junction and plugin directory.

Conclusion

dsh-sidebar-rail splits the left sidebar into a “narrow rail function area + native session area” without modifying the DSH core, and adds sortable, persistent custom entries and expand/collapse labels. If you are using the DSH 0.2.1-rc series Web configuration, you can install according to the command above and configure entries in the settings page.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye