dsh-question-rail
DSH web plugin: 模仿 deepseek 网页版界面右侧的问题条 — 右缘一条竖向问题栏,列出当前会话每一轮的用户提问,点击平滑滚动定位。DeepSeek Harness right-edge question rail.
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 26, 2026
- Updated
- Aug 26, 2026
Introduction
dsh-question-rail
English | 中文
A DeepSeek Harness web plugin that adds a right-edge question rail like the deepseek.com chat — a narrow strip of ticks on the right edge that expands on hover to list every user turn in the current conversation, and jump-scrolls back to that turn when clicked.
- One rendering, two states — the collapsed tick column and the expanded list are the same
.qrl_itemelements. Collapsed shows only each item's right-edge tick; hovering widens the panel to reveal the text. Identical style, identical spacing, identical right reference line. - Jump to any round — click a question, and the chat scrolls smoothly to that turn (
data-chat-anchor-keyanchor) with a brief highlight ring. - Conversation-only — reads the live per-session chat store (
viewfromctx.slots.entries("conversation.session")+resolveStore), so it renders only on the chat view and hides instantly on 轨迹 / 上下文 / Design / PPT or the empty home. - Full history — DSH conversation history is windowed (
hasMore). The rail auto-callssession.loadOlder()in a loop untilhasMore === false, so it lists all rounds, not just the loaded window. - Performance-tuned —
useSessionsselects onlycurrent; the rail subscribes to a render signature (question set + active view) instead of the whole conversation snapshot, so streaming output / tool calls don't re-render the list. Skip-free typing, stable handlers, signature-memoized items. - Theme-aware — panel text & the hover detail box follow
body[data-ds-dark-theme](dark: white text on transparent; light: black text). The panel itself is transparent (no card, no border). - Keyboard accessible — each question is
role="button"withtabIndex=0, Enter/Space triggers. - Zero runtime dependencies — the node half is intentionally empty (it only makes the loader discover the package); the browser half uses only
react/react/jsx-runtimeseed words.
How it works
| Layer | What happens |
|---|---|
Node half (lib/index.js) | Empty apply() — just enough to be an active cordis loader entry so dsh-client-modules publishes /plugins/dsh-question-rail/client.js. |
Browser half (lib/client.js) | Registers via window.__ModuleLoader__.load, then apply(ctx) injects the rail into the shell.overlay slot (frame-wide, additive, click-through until the entry opts in). |
| Data | Reads the current session's ConversationSnapshot.nodes (full list, not the windowed chat.order), extracts user/steering turns, and maps each seq → chat key for scroll anchors. |
| View gating | ctx.slots.entries("conversation.session") → resolveStore(handle, sessionId) → store.getSnapshot().view — the authoritative source DSH's own header tabs use. Renders only when view === "chat". |
Installation
# From a local checkout (dev / link mode — source edits take effect on hard-refresh)
dsh plugin --profile web add link:D:/path/to/dsh-question-rail
# Or straight from GitHub (requires git + a GitHub token on this machine)
dsh plugin --profile web add github:LeonSone/dsh-question-rail
dsh plugin add adds the package to the profile's dependencies; because the package declares dsh.bundle, it is automatically appended to dsh.profile.bundles.
New client packages need a restart.
dsh.clientdiscovery scans only at boot for new packages (bundle content changes hot-reload). After first install, restartdsh web(or the headless runner), then hard-refresh the browser (Cmd/Ctrl+Shift+R).
Usage
Once installed, a narrow strip of ticks appears along the right edge of an active chat conversation:
| Interaction | Behavior |
|---|---|
| Move mouse near the right edge | The strip widens, revealing each round's question as a single line (12px, right-aligned, trailing tick). |
| Hover a single question | A detail box appears on the left showing the full question text (scrollable up to 50vh). |
| Click a question | The chat scrolls smoothly to that turn and flashes a highlight ring. |
| Switch to 轨迹 / 上下文 / Design / PPT | The rail hides instantly (chat-view gate). |
| Empty / home screen | Nothing renders. |
Development
lib/client.js browser half (ModuleLoader bundle, injects into shell.overlay)
lib/index.js node half (empty apply; discovery only)
cordis.patch.yml bundle patch (mounts the node half)
test/*.mjs headless contract & extraction tests
Run the checks:
node test/bundle-contract.test.mjs # __ModuleLoader__.load / apply / inject / shell.overlay registration
node test/bind-fix.test.mjs # closure-bound getSnapshot/subscribe (no lost-this crash)
node test/extract.test.mjs # full-list extraction: user/steering only, anchor mapping
node test/loadolder.test.mjs # loadOlder loop until hasMore=false (full history)
License
MIT