Preface

The DeepSeek Harness (DSH) Web GUI resets interface state after a restart, such as the sidebar automatically collapsing, the width being reset, and the conversation scroll position returning to the top. The dsh-ui-state plugin is responsible for persisting these states to the configuration file and automatically restoring them after a restart, thereby maintaining continuity of the user interface.

Plugin Positioning

This is a UI state persistence plugin for the DSH Web GUI, maintained by developer zink-ning-lkr. Its core function is to ensure that the open/close states and widths of the sidebar and detail panel are automatically restored after a restart.

Core Features

The plugin mainly provides the following capabilities:
1. Sidebar state restoration: Automatically saves the expanded/collapsed state of the sidebar and persists the width after dragging (within the official contractual range of 264–420px). After a restart, it restores the last width by simulating a drag-handle action.
2. Detail panel restoration: Automatically records and restores the open/close state of the right-side detail panel (only recorded when a session exists).
3. Conversation scroll position: Saves the reading position when the page is navigated away or hidden (based on anchor alignment). After the view reconnects, it is automatically restored, and appended messages do not cause misalignment.
4. Performance optimization: Uses an event-driven mechanism with no idle polling, merging changes into a single batch write.

Installation and Enablement

The installation process does not require manual configuration. You can use the official CLI command directly:

dsh plugin --profile web add @zink-ning-lkr/dsh-ui-state

If installed via npm, you need to add the dependency to dsh.profile.bundles in the profile’s package.json. You can also manually download dsh-ui-state-0.3.0.tgz and install it using the command above.

Compatibility and Cautions

  • Version requirements: Verified to be compatible with the DSH 0.1.x version line, with minimum support for 0.1.0-rc.8. The dependency range is set as >=0.1.0-rc.8 <0.2.0 || >=0.1.1-rc.0 to avoid SettingsConflictError caused by duplicate instances.
  • Mobile logic: When the viewport is smaller than 1024px, the official UI automatically collapses the sidebar. In this case, the plugin does not persist or restore this state, to avoid conflicting with the official automatic behavior.
  • Fault tolerance: If settings.yaml has been manually modified, written by an older version, or affected by another plugin, resulting in out-of-range values or type errors, the plugin downgrades the affected field to “unrecorded” and does not cause the entire namespace registration to fail.

Summary

This plugin solves the issue of DSH Web GUI state loss after a restart through an event-driven and batch write mechanism. It is suitable for developers who need to maintain a fixed workflow.