The left-side conversation list sidebar in the DeepSeek Harness (DSH) Web UI has a hardcoded minimum drag limit by default, officially set to 264px. When screen space is limited or a more compact interface layout is needed, this restriction can be inconvenient. The dsh-sidebar-width plugin directly adjusts this value by patching the client bundle file when dsh web starts. It does not provide any new UI panels; it focuses solely on adjusting the sidebar sizing logic.

Plugin Positioning

This is a patching plugin maintained by garrisonz and released under the MIT License. Its core value is bypassing the hardcoded limitations in the official client bundle, allowing developers to freely control the drag range and default expanded width of the left sidebar according to actual screen size and preferences.

Core Functionality

This plugin only affects the width control of the left-side conversation list sidebar:

  1. Lower the minimum drag limit: Breaks through the official 264px limitation and allows a narrower sidebar.
  2. Customize the maximum drag limit: Prevents the sidebar from occupying too much screen space by setting a maximum drag width.
  3. Set the default expanded width: Changes the sidebar width when the page initially loads.
  4. Compatibility: Compatible with two generations of store structures (d.sidebar and d.layoutInfo.sidebar), with built-in regex-based fault tolerance.
  5. Idempotency: Supports repeated runs; after upgrading DSH and restarting, the patch can be automatically reapplied.

Installation and Activation

Install it using the officially recommended npm method:

dsh plugin --profile web add dsh-sidebar-width   # npm(推荐)

After installation, no manual action is required. When dsh web starts, the plugin automatically detects and patches the @deepseek-ai/dsh-client-ui-layout/lib/client.js file. On first run, it automatically generates a backup file (such as client.js.dsh-sidebar-width.bak).

Configuration Method

After installation, edit the ~/.dsh/profiles/web/cordis.patch.yml file and add the following configuration item:

- id: sidebar-width
  name: 'dsh-sidebar-width'
  config:
    min: 160          # 拖动下限,默认 180
    max: 420          # 拖动上限,默认保持 bundle 原值
    defaultWidth: 240 # 展开默认宽度,默认保持 bundle 原值

After modifying the configuration, restart dsh web to apply the changes.

Working Principle

Because the width clamping logic in the official client bundle (clampWidth(px, 264, 420)) and its default value (280px) are hardcoded in the @deepseek-ai/dsh-client-ui-layout/lib/client.js file, and no modifiable seam is exposed at runtime, this plugin implements its functionality through a patching approach:

  1. Patch on startup: When dsh web starts, the plugin reads the configuration and performs regex replacement on the served client.js file.
  2. Safe backup: On first run, it creates a .bak backup file.
  3. Structure compatibility: The plugin uses regex to fault-tolerantly match different store structures (older d.sidebar and newer d.layoutInfo.sidebar), ensuring it does not fail across different versions.
  4. Idempotent execution: Through a marker mechanism, repeated runs do not modify the file multiple times; if a major change occurs in the future bundle structure, the plugin safely refuses to patch.

Uninstallation and Rollback

Use the following command to remove the plugin:

dsh plugin --profile web remove dsh-sidebar-width

After the plugin is removed, the patched file is not automatically rolled back. If restoration is needed, manually rename the backup file (client.js.dsh-sidebar-width.bak) back to its original filename.

Summary

This plugin is suitable for developers who need fine-grained control over the DSH Web UI layout. It achieves full control of the sidebar size through a minimal configuration file, with a transparent mechanism (based on file patching). For more details, refer to: SkillHub Directory or the GitHub Repository.