Arrow-key navigation for the DSH Web GUI: Up/Down switch sessions inside the current workspace and Left/Right switch workspaces, reading session identity from the client controllers rather than the DOM, and yielding the keys back to the composer while a draft is being edited.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-arrowkey-nav
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:drscrewdriver/dsh-arrowkey-nav
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 | 简体中文 | 日本語 | 한국어 | Français | Deutsch | Italiano | Русский | Español
Arrow-key navigation for the DSH Web GUI. Switch sessions without leaving the keyboard:
| Key | Action | Scope |
|---|---|---|
↑ |
previous session | inside the current workspace |
↓ |
next session | inside the current workspace |
← |
previous workspace | all workspaces |
→ |
next workspace | all workspaces |
↑/↓ wrap around at the ends of the workspace and never cross into a
neighbouring one; crossing is what ←/→ are for. After a switch the target
row is scrolled into view, and focus returns to the composer if that is where
the press started, so typing can continue immediately.
Version and DSH lines
One version serves every supported host line. Version 0.5.0 is tested with
all rc releases of the DSH 0.1.0–0.2.0 lines — the exact whitelist is
engines.dsh, distributed from the single source scripts/hosts.mjs by
scripts/sync-hosts.mjs (hand edits fail npm run hosts:check):
| DSH line | tested rc releases |
|---|---|
| 0.1.0 | rc.2, rc.3, rc.6, rc.7, rc.8 |
| 0.1.1 | rc.1, rc.2 |
| 0.1.2 | rc.1 |
| 0.1.5 | rc.1, rc.2, rc.3 |
| 0.1.7 | rc.1, rc.2 |
| 0.2.0 | rc.1, rc.2 |
- There is no per-line build: both switching generations are dispatched by
capability probing in one bundle (
uiWorkspace.openSessionon the 0.1.6+ generations,sessions.openon the older ones), so every host line runs the same code. - On the 0.1.0/0.1.1 lines (
dsh-client-runtimegeneration) support is declaration-complete and unit-tested, but real-host keystroke verification is still pending; until then treat those cells as best effort.
Install
dsh plugin --profile web add dsh-arrowkey-nav -w
The registry's latest is the one version for every line. Each line also has a
dist-tag pointing at the same build — dsh-arrowkey-nav@dsh-0.2.0,
dsh-arrowkey-nav@dsh-0.1.5, and so on — if you prefer naming the line; the
install target is identical. A host release outside the table above is
rejected by the engines.dsh whitelist instead of mounting half-broken.
Restart the profile afterwards — a running instance does not hot-load a new
bundle layer. Then reload http://127.0.0.1:3080.
Confirm the row is in the composed tree:
dsh web --dump-config | Select-String dsh-arrowkey-nav
A local checkout can be registered instead with
dsh plugin --profile web add <absolute path to the checkout> -w; see
INSTALL.md for the full guide, including upgrades, verification
and removal.
Remove
dsh plugin --profile web remove dsh-arrowkey-nav
Restart, and the keys behave exactly as before the install: the listener is owned by the plugin's Cordis effect and is removed with it.
How it works
Identity comes from the two client controllers, never from the DOM: rows carry
no data-* and no id, so a row cannot be asked what session it is.
- Every switch goes through the capability-probed executor:
ctx.uiWorkspace.openSession(id)on the DSH 0.1.6+ generations,ctx.sessions.open(id)on the older lines — one bundle, no per-line build. The details panel needs no handling: the shipped frame already closes it when the current session changes. ctx.workspaces.list.getSnapshot()supplies the workspace order — the order←/→walks, and the source of each workspace's member list.
Which session is "next" follows the order the sidebar is drawing, not the controller's member order. Those disagree in exactly the case you notice: the sidebar reconciles its own persisted order with the membership and promotes recently-active sessions to the top, so an old session jumps to the first row the moment you open it. The plugin therefore reads the rendered row order out of the sidebar, and falls back to the controller order when the sidebar is not mounted (collapsed rail). A section is accepted only when its rows account for every session the controller reports for that workspace; an ambiguous or mismatched section falls back instead of guessing.
Keys are left alone when the event already belongs to somebody else: any
modifier, IME composition, an event already handled upstream, or a focus inside
a dialog, menu or another editable field (the sidebar's session search, a rename
box). The listener registers in the capture phase but only calls
preventDefault() when it actually navigates.
The composer is the one conditional case. An empty composer yields its arrow keys — there is no caret to move, so the key is free — which is what lets you navigate right after sending a message, while the composer still holds focus. Once the composer holds a draft, its arrow keys belong to the caret again, so editing a prompt is never hijacked.
The browser half has no React components, no CSS and no platform-module
requests, and the package has no runtime dependencies — lib/client.js is
generated by scripts/build-client.mjs into the module-loader contract the page
expects.
Development
npm run typecheck # both compiler faces
npm test # resolver unit tests + built-bundle smoke tests
npm run build # regenerate lib/client.js after editing src/client
npm run build needs typescript; if it is not installed in this package, point
DSH_TYPESCRIPT at an existing typescript module directory.
Known limitations
- A collapsed workspace group does not scroll. Its rows are not mounted, and
dsh exposes no public way to expand a group, so the switch happens but the
target row stays out of sight. The workspace holding the current session is
kept expanded by dsh itself, so
↑/↓are unaffected. - A rail-collapsed sidebar does not scroll for the same reason: the tree is not mounted. The switch still happens.
- "In one list" mode has no workspace sections, but
←/→still walk the controller's workspace order, so the list may appear to jump between sections. - Scrolling is best effort. Any lookup failure is swallowed: the selection has already moved, and a missing row must never turn into a wrong one.
- Snapshot fields are pre-stable.
sessionsandworkspacessnapshot shapes are pre-stable — the tested host releases are exactly theengines.dshwhitelist (engines.dsh: 0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2). If a dsh upgrade changes them,src/client/navigate.tsandsrc/client/apply.tsare the only files to revisit; a host that exposes neither switching API leaves the plugin inert rather than failing the page.
Layout
src/index.ts node half: loader entry, installs nothing
src/client/constants.ts keys owned, DOM anchors read
src/client/navigate.ts narrow waist: snapshot types + arrow resolver
src/client/apply.ts execution: open / blank-first / connectWorkspace
src/client/dom.ts read-only DOM: scroller, section binding, scroll, focus
src/client/session-nav.ts key guards + one arrow press end to end
src/client/index.ts Cordis entry: inject + one capturing listener
scripts/build-client.mjs generates lib/client.js
tests/ resolver unit tests + bundle smoke tests
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 8567
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★ 8567
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.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 4363
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.
ccch1mneyyy/dsh-TUI★ 4235
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 4081
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1441
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.