dsh-branch-workspace-folders
Branch Workspace Folders
DSH Web 侧边栏插件:在左侧工作区中将分叉会话归组到其根会话下。
插件会安装到这里;不确定时保持 web。
npx -y @deepseek-ai/dsh plugin --profile web add github:JIaDE-YX/dsh-branch-workspace-folders#3291f7351e2e47ff3e34c77d1f7d2458d3996fe0

dsh-branch-workspace-folders
DSH Web 侧边栏插件:在左侧工作区中将分叉会话归组到其根会话下。
插件会安装到这里;不确定时保持 web。
npx -y @deepseek-ai/dsh plugin --profile web add github:JIaDE-YX/dsh-branch-workspace-folders#3291f7351e2e47ff3e34c77d1f7d2458d3996fe0

Branch Workspace Folders 以 dsh-branch-workspace-folders 发布,当前版本为 0.2.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。
🌐 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.
Sidebar Branch Tree Overview Branch Hierarchy & Guide Rails
workspace (grouped), workspace-tree (physical directory tree), or flat (single list) mode, all forked sessions cluster under their designated root session based on durable lineage.--dsh-branch-indent: calc(depth * 16px) and --dsh-workspace-indent, completely resolving negative indentation and layout displacement under nested directory tree modes.sidebar.session.row.leading for native automation indicator anchors (e.g. dsh-schedule task clock icon);sidebar.session.row.hover in SessionHoverContent for external task inspection.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 full prefers-reduced-motion compliance.data-row-key attributes across sessions and workspaces to seamlessly integrate with official FLIP layout animations.font-weight: 500 (Medium) and primary text color;var(--dsw-alias-label-secondary)), brightening dynamically on hover/selection;IconTreeCornerRegular coupled with zero-DOM CSS background multi-level guide rails (.deepBranch for depth >= 2).placeFork Native Clustering: Re-orders forked sessions immediately adjacent to and above their parent session rather than dumping them at arbitrary list ends.manual (drag-and-drop reordering) and updated (recency sort).all (show all), hide-archived (default), and only-archived (inspect archive history directly in the sidebar).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)).usePanelInfo): Suppresses session selection backgrounds when full-screen settings or file panels are active to prevent dual-focus visual conflict.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..jsonl.zstd logs and workspace registry cleanup..trash-sessions Isolation & Rollback: Quarantine directory isolation -> atomic workspace state mutation (cleaning sessionOrder, archivedSessionIds, pinnedSessionIds) -> permanent commit. Automatically rolls back in reverse order upon filesystem errors.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.buildSessionTree, flattenSessionTree, findSessionAncestors, aggregateDescendantStatus, sortTreeByUpdatedAt all execute via heap-allocated stacks, proven safe against 20,000-level recursion depth.sidebar.workspaces wrapped in a React ErrorBoundary. Crashes fall back to official vanilla renderers without white-screening the app.session.v4.jsonl.zstd, tolerating torn-tail frames.isLoopbackHost), DNS rebinding defense, and browser Sec-Fetch CSRF prevention.For detailed topological maps, complexity bounds, sequence diagrams, and formal invariants, see: 👉 Architecture & Core Mechanisms Whitepaper (docs/ARCHITECTURE.md)
# Install directly from GitHub
dsh plugin --profile web add github:JIaDE-YX/dsh-branch-workspace-folders
# Or pin a specific released tag
dsh plugin --profile web add github:JIaDE-YX/dsh-branch-workspace-folders#v0.2.0
# Or via npm registry (once published)
dsh plugin --profile web add dsh-branch-workspace-folders
Download dsh-branch-workspace-folders-0.2.0.tgz from the GitHub Releases page:
# Install pre-built asset without compile authorization
dsh plugin --profile web add ./dsh-branch-workspace-folders-0.2.0.tgz
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"}
# 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"}
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.
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"}
When contributing to this repository, the following core invariants must never be violated:
WorkspacePickFlow Must Never Be Conditionally Rendered:
In WorkspaceBrowser.tsx, <WorkspacePickFlow> must reside permanently in the DOM tree, governed solely by open={wsPickerOpen}. Unmounting on wsPickerOpen === false breaks picker callbacks and disables workspace creation.{} (truthy in JS, short-circuiting nullish coalescing). Branch collapse state must be merged between local storage (dsh.branch.collapsed.v1) and local state via useMemo.Rows.tsx. Always use renderSlot('sidebar.workspaces.session.menu.item') and renderSlot('sidebar.workspaces.session.row.action') to preserve third-party extensibility and official pin actions.origin === 'subagent' transient child sessions from the sidebar tree to prevent clutter.