Introduction¶
In DSH’s Web GUI, the todo panel is a built-in component mounted on the conversation.input.dock slot (order: 0), displayed above the chat input box by default. Two issues arise here: first, the panel takes up document flow, squeezing the input area; second, under the native mechanism, turn/start (user sends a message to start a new round) clears the todo projection, causing the panel to vanish entirely. It only returns after the agent re-calls todo_write in this turn. If your workflow relies on a task list to track progress, both behaviors will disrupt the rhythm.
Below is an introduction to dsh-todo-dock. It addresses these two points: a snippet of CSS injection pins the panel to the top right corner, and a host-side mechanism replay ensures the list remains visible across turns.
What is it¶
dsh-todo-dock is a DeepSeek Harness Web GUI plugin by lsxblh, licensed under MIT, version 0.3.2. Since v0.3.0, it was renamed from dsh-ui-todo-fix to dsh-todo-dock (v0.2.x and earlier were the original name).
It is a pure Host plugin with zero dependencies. The core code is about 50 lines and relies on the official injection hook webServer.tapIndex (isomorphic to built-in theme plugins), touching no component logic. It takes the standard dsh.bundle form, and dsh plugin add will automatically register it into the profile bundles.
Core Features¶
Dock to Top Right¶
The plugin injects a <style> block into index.html, pinning the todo panel (section[data-testid="todo-panel"]) to the top right corner using position: fixed. It adds shadows, rounded corners, and scrolling, ensuring it does not take up document flow or block the input. The DEFAULT_CSS in lib/index.js inside the package provides the built-in default style, giving the default effect immediately after installation:
body section[data-testid="todo-panel"]{
position: fixed; top: 104px; right: 16px;
width: 320px; max-width: min(320px, calc(100vw - 32px));
z-index: 9999; margin: 0;
box-sizing: border-box;
box-shadow: 0 8px 32px rgba(0,0,0,.35);
max-height: calc(100vh - 120px); overflow-y: auto;
}
Note: The TodoPanel is conditionally rendered—it will not display the panel if the current session has no todo tasks. This is product behavior and unrelated to the plugin.
Persist Across Turns¶
The native mechanism clears the todo projection on turn/start, making the panel disappear until the agent re-calls todo_write. This plugin listens to session/event on the host side: it records the last todo/write list per session and immediately replays a todo/write after turn/start. This keeps the task list visible across turns. No extra action is required from any agent, and it does not depend on the agent’s behavioral habits (added in v0.2).
Enabled by default; set config.keepAcrossTurns to false to disable and restore native behavior. Two edge cases need to be known:
- The panel will not revive after the agent actively clears it (by writing an empty list).
- Every turn appends an extra
todo/writeto the session event stream—this is a valid event used solely for recovery.
Recovery Across Restarts¶
Added in v0.3.2. When restarting dsh and reopening the same session, the plugin restores the last todo list from DSH’s persisted session logs. The implementation is zero new storage: lazy scanning + incremental cursor. The cursor is empty after a process restart; the first turn/start will perform a reverse lazy scan of the last todo/write in the session’s persisted event logs (only once, then O(1) incrementally). If there are no todos in the logs (new session or pruned by compaction), it safely falls back to not replaying.
Robustness Hardening¶
v0.2.1 / v0.3.2 added four hardening measures: do not replay non-array junk; clean up Map when the session is destroyed; isolate replay errors; safe fallback when logs have no todos. The tests/ directory contains regression tests, which can be run using the following command:
node tests/keep-across-turns.test.mjs
Installation and Enablement¶
Requires the DSH Web profile. dsh plugin is based on pnpm, so pnpm must be installed locally.
- Install the plugin. Method 1 (GitHub release package, recommended):
dsh plugin --profile web add https://github.com/lsxblh/dsh-todo-dock/archive/refs/tags/v0.3.2.tar.gz
Method 2 (Local source code directory):
dsh plugin --profile web add file:/path/to/dsh-todo-dock
- Restart the dsh web service once (bundles are composed at startup).
- Refresh the page, and the panel will appear in the top right corner.
Style Hot-Reloading¶
The injected CSS defaults to the DEFAULT_CSS inside the package. To override or adjust, append an entry with id/name dsh-todo-dock to ~/.dsh/profiles/web/cordis.patch.yml, setting config.css:
- id: dsh-todo-dock
name: dsh-todo-dock
config:
css: |
body section[data-testid="todo-panel"]{
position: fixed; top: 104px; right: 16px;
width: 320px; z-index: 9999; margin: 0;
box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
No restart is needed after changes: HMR applies automatically, and the page refresh takes effect.
Uninstall / Rollback¶
dsh plugin --profile web remove dsh-todo-dock
If you have modified cordis.patch.yml, delete the relevant override lines as well.
Applicable Scenarios and Notes¶
Suitable for users in the DSH Web GUI who want to track multi-step tasks using a todo list, want the list to remain visible, and do not want it to squeeze the input area. There are only two configuration options: config.keepAcrossTurns (disable persist across turns to restore native behavior) and config.css (override default CSS).
Notes before installation:
- The plugin runs with the permissions of the current dsh process. It is recommended to check the source code (repository at the end) and the license (MIT) before installing.
- Depends on the DSH Web profile and local pnpm.
- Whether the panel displays depends on whether the current session has todo tasks. When there are none, TodoPanel does not render. This is product behavior.
- After enabling persist across turns, every turn will append an extra
todo/writeto the session event stream.
Conclusion¶
Summary: dsh-todo-dock solves the two problems of the DSH Web todo panel’s docking position and disappearance across turns using CSS injection and host-side mechanism-level replay. It does not touch component logic, supports hot style tuning, recovers across restarts, and uninstalls with a single command.
- GitHub Repository: https://github.com/lsxblh/dsh-todo-dock
- Community Plugin Directory Page: https://www.skillhub.cn/plugins/lsxblh/dsh-todo-dock