dsh-plugin-sidebar-polish: Sidebar Styling and Layout Optimization

Introduction

The DeepSeek Harness (DSH) sidebar integrates brand identity, workspace list, and session tree. The official design has visual inconsistencies between the brand row, floating new-session button, and collapse behavior. dsh-plugin-sidebar-polish fixes these inconsistencies using pure CSS (plus a button hook), unifying row heights and alignment without requiring build tools.

Core Features

The plugin focuses on optimizing the sidebar’s visual experience:

  • Remove brand row: Hide the whale icon and “deepseek HARNESS” text at the top, letting the workspace and session lists extend directly to the top edge.
  • Redraw new-session button: Hide the original 38px standalone card and redraw it as a row style matching the panels below (32px height, pill shape).
  • Unify row heights: Standardize the row height for panel rows, workspace rows, session rows, and the new-session row to 32px.
  • Align pills and text: Adjust list item padding and gap so that icons, text, and right-side pill labels are vertically aligned.
  • Mark idle sessions: Add a gray dot to the left of session rows with an idle status (the official UI only shows colored dots for running/approval/completed states).
  • Pin collapse toggle: Fix the sidebar collapse toggle to the right of the traffic-light buttons in both expanded and collapsed states, preventing it from jumping around.
  • Add settings entry: Add a gear icon button below the workspace list that opens the settings panel directly on click.
  • Adjust layout details: Change the sidebar’s left/right padding from 12px to 8px, remove the sidebar’s gradient tint, and adjust fill colors based on dark/light mode.

Installation & Uninstallation

The plugin directory is this repository. Choose one installation method; do not enable two plugins with the same name simultaneously.

Installation

# Install from GitHub
dsh plugin --profile desktop add "github:daoyu1993-lab/dsh-plugin-sidebar-polish"

# Or use a local directory (after cloning)
dsh plugin --profile desktop add "link:$PWD"

After installation, the plugin will be added to the dependencies and dsh.profile.bundles in ~/.dsh/profiles/desktop/package.json, and a symlink will be created under node_modules/. Thanks to the symlink mechanism, modifying client.js allows DSH to hot-reload it in real time without rebuilding.

Uninstallation

dsh plugin --profile desktop remove dsh-plugin-sidebar-polish

The interface immediately reverts to its original state after uninstallation. Stylesheets are managed by ctx.effect, so no residue is left behind.

Implementation & Notes

Implementation Logic

The plugin contains only one stylesheet and a small amount of JS logic. Rather than taking over the entire sidebar component, it leverages DSH’s CSS Modules hash characteristics and overrides styles through stable anchors (such as [data-slot="sidebar"]).

  • Style overrides: Uses the :has() selector to hide the brand row and redraw the new-session button.
  • Component injection: Registers a real <button> element in the sidebar.footer.action slot to the right of the “settings row”, providing an independent click target and settings panel opening functionality.

Notes

  • Refresh required: After first installation or when modifying client.js, you need to refresh the page (desktop shortcut ⌘R) to see the effects.
  • Hot reload: The plugin supports hot reload without build tools; simply modify the source code directly.
  • Automatic cleanup: Stylesheets are automatically removed by ctx.effect upon uninstallation.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye