Heap-allocated stack-safe fork tree with two-track indentation, title marquee, and physical cascade purge.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/The-latest-one/dsh-branch-workspace-folders/releases/download/v0.2.0/dsh-branch-workspace-folders-0.2.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:The-latest-one/dsh-branch-workspace-folders
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
🌐 English | 中文
DeepSeek Harness (DSH) full-featured ecosystem extension: strictly aligned with official UI/UX design contracts to deeply rearchitect the sidebar workspace and session tree. Delivers heap-allocated non-recursive stack-safe session trees,
placeForkintelligent fork clustering, two-track indentation decoupling, constant-speed title marquee with fade masking, official leading & hover slot compatibility, collapsed status bubbling, archived tri-state filtering, and a physical cascading purge transaction engine.
📸 Visual Preview
⚡ Quick Comparison: Native DSH vs. This Plugin
| Capability / Pain Point | Official Native DSH | Other Community Plugins | dsh-branch-workspace-folders |
|---|---|---|---|
| Forked Session Hierarchy | ❌ Flat list only, scattered by recency | ⚠️ Pop out standalone SVG panel | ✅ Native in-place collapsible tree with L-shaped guide rails |
| New Fork Positioning | ⚠️ Appended at arbitrary list ends | ❌ Unchanged | ✅ placeFork auto-clusters adjacent above parent session |
| Folded Status Bubbling | ❌ None (blindspot for running tasks) | ❌ None | ✅ 4-state priority FSM (approval warnings bubble to root) |
| Physical Disk Deletion | ❌ Soft archive only (.zstd logs persist) |
⚠️ Standalone trash button / no cascade | ✅ True cascading physical purge with rollback safety |
| Indentation Reliability | ❌ Negative indentation in directory trees | ❌ Overrides directory spacing | ✅ Two-track decoupled variables (--dsh-branch & --dsh-ws) |
| Engine Recursion Safety | ❌ N/A | ⚠️ Direct recursion (risk of stack overflow) | ✅ Heap-allocated explicit stacks (tested against 20,000 depth) |
| DSH v0.2.0-rc.2 Alignment | ⚠️ Shipped in native | ❌ Legacy 0.1.x baselines | ✅ 100% aligned (two-tier slots, 0.03px/ms marquee, FLIP keys) |
🌟 Key Features & Problems Solved
1. Universal Fork Tree & Visual Hierarchy
- Universal Grouping Coverage: In
workspace(grouped),workspace-tree(physical directory tree), orflat(single list) mode, all forked sessions cluster under their designated root session based on durable lineage. - Two-Track Indentation Decoupling: Independently allocates
--dsh-branch-indent: calc(depth * 16px)and--dsh-workspace-indent, completely resolving negative indentation and layout displacement under nested directory tree modes. - Official Slot Ecosystem Integration (Leading & Hover Slots): Fully supports DSH v0.2.0-rc.2 two-tier session row contracts:
- Leading 16px Cell Arbitration: Prioritizes warning/running state dots; when idle, unarchived, and non-blank, delegates to
sidebar.session.row.leadingfor native automation indicator anchors (e.g.dsh-scheduletask clock icon); - Hover Card Injection: Mounts
sidebar.session.row.hoverinSessionHoverContentfor external task inspection.
- Leading 16px Cell Arbitration: Prioritizes warning/running state dots; when idle, unarchived, and non-blank, delegates to
- Smooth Title Marquee (
useTitleMarquee): Replicates official 0.03px/ms constant-speed crawling with 12px double-edge linear gradient fade masks ([data-scrolled]&[data-clipped]), dynamic ellipsis cut-off (text-overflow: clip), and fullprefers-reduced-motioncompliance. - AnimatedRows Layout Contract: Injects semantic
data-row-keyattributes across sessions and workspaces to seamlessly integrate with official FLIP layout animations. - Typography Hierarchy:
- Root / Parent Sessions: Highlighted with
font-weight: 500(Medium) and primary text color; - Branch Child Sessions: Subdued to secondary text color (
var(--dsw-alias-label-secondary)), brightening dynamically on hover/selection; - L-shaped Guide Rails: Native
IconTreeCornerRegularcoupled with zero-DOM CSS background multi-level guide rails (.deepBranchfordepth >= 2).
- Root / Parent Sessions: Highlighted with
2. Sorting Engine & View Controls
placeForkNative Clustering: Re-orders forked sessions immediately adjacent to and above their parent session rather than dumping them at arbitrary list ends.- Strict View Order By: Strictly limits ordering to officially supported modes:
manual(drag-and-drop reordering) andupdated(recency sort). - Tri-State Archive Filtering: Supports
all(show all),hide-archived(default), andonly-archived(inspect archive history directly in the sidebar). - Collapsed Ancestor Pathfinding (
isCurrentCollapsedAncestor): When the active session is hidden beneath a folded branch, ancestor chevrons and badges highlight in business primary color (var(--dsw-alias-state-business-primary)). - Panel Activation Dimming (
usePanelInfo): Suppresses session selection backgrounds when full-screen settings or file panels are active to prevent dual-focus visual conflict.
3. Collapsed Status Bubbling
- Blindspot Self-Healing: When a session family with active runs is collapsed, descendant statuses bubble up to the visible root node.
- Strict Priority State Machine:
Warning(Highest): Bubble amber dot and replace trailing timestamp with explicit action label (e.g., "Waiting Approval", "Plan Review", "Waiting Answer");Ongoing(Secondary): Displays spinning loading indicator when descendant or subagents are running;Done(Silent reminder): Green dot when child work completes;Idle: Clean state when all family members are idle.
4. Physical Cascade Purge Transaction Engine
- True Physical Deletion: Complements official soft-archiving by providing genuine on-disk cascading physical deletion of
.jsonl.zstdlogs and workspace registry cleanup. .trash-sessionsIsolation & Rollback: Quarantine directory isolation -> atomic workspace state mutation (cleaningsessionOrder,archivedSessionIds,pinnedSessionIds) -> permanent commit. Automatically rolls back in reverse order upon filesystem errors.- Complete Host REST API:
GET /branch-workspace/api/health: Service health probe;GET /branch-workspace/api/archives: Tree-structured archived session catalog;POST /branch-workspace/api/purge: Single root family physical cascade purge;POST /branch-workspace/api/purge-batch: Batch root family physical cascade purge;POST /branch-workspace/api/restore: Single session activation;POST /branch-workspace/api/restore-batch: Batch session unarchival;POST /branch-workspace/api/restore-branch: Full branch topological restoration.
5. Engine Reliability & Security
- Heap-Allocated Explicit Stack Algorithms:
buildSessionTree,flattenSessionTree,findSessionAncestors,aggregateDescendantStatus,sortTreeByUpdatedAtall execute via heap-allocated stacks, proven safe against 20,000-level recursion depth. - In-Place Shadowing & ErrorBoundary: In-place replacement of
sidebar.workspaceswrapped in a ReactErrorBoundary. Crashes fall back to official vanilla renderers without white-screening the app. - Native V4 Zstandard Compatibility: Automatically prioritizes and parses
session.v4.jsonl.zstd, tolerating torn-tail frames. - Security & Network Isolation: Loopback authority verification (
isLoopbackHost), DNS rebinding defense, and browserSec-FetchCSRF prevention.
🏗 Technical Architecture
For detailed topological maps, complexity bounds, sequence diagrams, and formal invariants, see: 👉 Architecture & Core Mechanisms Whitepaper (docs/ARCHITECTURE.md)
📦 Installation & Integration
Method 1: DSH Plugin CLI (Recommended)
# Install directly from GitHub
dsh plugin --profile web add github:The-latest-one/dsh-branch-workspace-folders
# Or pin a specific released tag
dsh plugin --profile web add github:The-latest-one/dsh-branch-workspace-folders#v0.2.1
# Or via npm registry (once published)
dsh plugin --profile web add dsh-branch-workspace-folders
Method 2: Pre-built Offline Tarball (No Compile Rights Required)
Download dsh-branch-workspace-folders-0.2.1.tgz from the GitHub Releases page:
# Install pre-built asset without compile authorization
dsh plugin --profile web add ./dsh-branch-workspace-folders-0.2.1.tgz
Method 3: Local Profile Installation via Super-Injector
If your environment has dsh-super-injector installed:
# Formal installation into web profile (mounts without restart):
dev_install_package {"dir": "/path/to/dsh-branch-workspace-folders"}
Method 4: Runtime Hot Injection (Development Mode)
# 1. Hot inject into runtime memory (zero config pollution):
dev_inject_plugin {"dir": "/path/to/dsh-branch-workspace-folders"}
# 2. Deterministic hot reload after code edits:
dev_reload_package {"packageName": "dsh-branch-workspace-folders"}
Method 5: Manual Profile Configuration
In your profile's package.json (~/.dsh/profiles/web/package.json):
{
"dependencies": {
"dsh-branch-workspace-folders": "link:/path/to/dsh-branch-workspace-folders"
},
"dsh": {
"profile": {
"bundles": [
"dsh-branch-workspace-folders"
]
}
}
}
Run pnpm install inside the profile directory and restart DSH.
🛠 Development & Verification Workflow
This project enforces the Grounded Verification Gate. All changes must pass the following sequence:
# 1. Dual-stack TypeScript typecheck (Host + Client)
npm run typecheck
# 2. Compile Host types and bundle Client bundle via tsdown with inline CSS
npm run build
# 3. Execute automated test suite (must pass 45/45 tests including 20k-depth stress tests)
npm test
# 4. Trigger hot-reload in live DSH environment
dev_reload_package {"packageName": "dsh-branch-workspace-folders"}
🛡 Invariants & Guardrails
When contributing to this repository, the following core invariants must never be violated:
WorkspacePickFlowMust Never Be Conditionally Rendered: InWorkspaceBrowser.tsx,<WorkspacePickFlow>must reside permanently in the DOM tree, governed solely byopen={wsPickerOpen}. Unmounting onwsPickerOpen === falsebreaks picker callbacks and disables workspace creation.- Dual-Track Collapse State Synchronization:
Store initial state might be an empty object
{}(truthy in JS, short-circuiting nullish coalescing). Branch collapse state must be merged between local storage (dsh.branch.collapsed.v1) and local state viauseMemo. - Slot-Rendered Row Actions:
Never hardcode action menus in
Rows.tsx. Always userenderSlot('sidebar.workspaces.session.menu.item')andrenderSlot('sidebar.workspaces.session.row.action')to preserve third-party extensibility and official pin actions. - Subagent Session Isolation:
Always filter
origin === 'subagent'transient child sessions from the sidebar tree to prevent clutter.
📄 License & Contributing
- Distributed under the MIT License.
- Contribution guidelines and pull request instructions are detailed in CONTRIBUTING.md.
- Version history is documented in CHANGELOG.md.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10680
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10680
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8392
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7493
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5371
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1073
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.