Preface

The sidebar of DeepSeek Harness (DSH) typically manages sessions using a flat list. As sessions increase, they are appended arbitrarily, causing hierarchical relationships to be lost. The dsh-branch-workspace-folders plugin aims to solve this problem by constructing a tree structure, grouping forked sessions under their root sessions, and providing advanced features such as physical cascading purging.

Plugin Overview

This is a DSH Web sidebar plugin maintained by The-latest-one and released under the MIT license. It completely refactors the sidebar workspace, supporting a generic fork tree, dual-track indent decoupling, collapsed-state bubbling, and a physical disk deletion engine.

Core Features

The plugin provides the following core capabilities:

  1. Generic Fork Tree and Visual Hierarchy
    In workspace, workspace-tree, or flat mode, all forked sessions are clustered under root sessions based on persistent lineage. It supports dual-track indent decoupling, independently assigning --dsh-branch-indent: calc(depth * 16px) and --dsh-workspace-indent, completely resolving negative indentation issues in directory tree mode.

  2. Collapsed-State Bubbling
    When a session family containing active running tasks is collapsed, child states are bubbled up to the visible root node. It supports a four-state priority finite state machine (FSM), displaying warning, in-progress, completed, or idle status at the root node based on child states.

  3. Physical Cascade Purge Engine
    It provides real physical disk deletion, with .trash-sessions isolation and atomic rollback. It offers a complete REST API for health checks, archive queries, and purge operations:

   GET  /branch-workspace/api/health
   GET  /branch-workspace/api/archives
   POST /branch-workspace/api/purge
   POST /branch-workspace/api/restore
  1. Engine Reliability
    It uses a heap-allocated explicit stack algorithm to avoid the risk of stack overflow caused by recursion and has passed testing at a depth of 20,000. It supports strict view sorting, allowing only the manual and updated modes.

Installation and Enablement

Based on verified facts, no explicit CLI installation command has been found (such as dsh plugin add), only the install:dsh script exists. Installation via source or a package manager is recommended, followed by restarting the DSH process.

# Officially provided installation script (adjust according to the actual environment)
npm run install:dsh

Typical Usage

  • placeFork Native Clustering: Forked sessions are automatically reordered to sit adjacent to and above their parent session, instead of being appended to the end of the list.
  • Three-State Archive Filtering: Supports all (show all), hide-archived (hide archived sessions by default), and only-archived (show only archived sessions).
  • Official Slots Integration: Supports the two-level slot ecosystem in DSH v0.2.0-rc.2, including Leading 16px cell arbitration and Hover card injection.

Applicable Scenarios and Precautions

This plugin is suitable for DSH users who need to manage a large number of sessions in detail, care about session hierarchy, and require thorough cleanup of log files. The plugin runs with the permissions of the current DSH process. Be sure to review the source code and license before installation. It strictly limits view sorting to manual and updated.

Conclusion

The plugin improves the robustness and maintainability of the DSH sidebar through heap allocation algorithms and a physical deletion engine. More details can be found in the GitHub repository.