Adds a 最近 (Recent) section below the workspace list in the DSH web sidebar that flattens the newest sessions of every workspace into one timeline, reusing the session rows and hover cards the shell already renders, paging in earlier sessions as you scroll, and folding the workspace list itself to the five folders with the newest history. Requires DSH ^0.2.0-rc.1.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ttmouse/dsh-recent
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 | 简体中文
A DSH Web GUI plugin that adds a Recent section to the left sidebar, below the workspace list: the newest sessions of every workspace flattened into one time line. Browse projects by folder on top, jump back into the latest work below.

Why
Codex's sidebar has two views: projects (folders) and recent (a time line). DSH ships only the project view — to get back to the session you were just in, you have to remember which workspace it belongs to, then expand that folder.
This plugin adds the second view: every workspace's sessions sorted by
activity, one click to open. A row is the workspace tree's session row, element
for element — state dot, title, age (or the compact label of the interaction
that waits), pin marker — and hovering it swaps the age and the marker for the
row's actions (… menu / archive / pin) without moving the row: the pointer
changes what the row shows (its fill, and the contents of a fixed-width trailing
cell), never where the row or its title is. The swap lands in one step, because
the row carries no transition at all, and nothing floats above the list. The
list does not fold: scrolling to the end of what is rendered loads older
sessions, so one wheel over the column carries from the project tree into
history.
View options also offer a third way to read the same conversations: by status. The project folders and the time line step aside, and each conversation appears once, under needs you, running, unread, or idle. A group with nothing in it is left out. Every group has its own fold arrow and keeps its count while folded, so 431 idle conversations can be put away in one click. The first three are shown whole; idle keeps paging as you scroll. Pinned conversations are not a separate block in this view — the pin stays a mark on the row — and project names always show, because the column is no longer grouped by project. Choosing "By recent" restores the column as it was.
Features
- Flat time line — every session that holds history, across all workspaces and without a row cap, independent of how the workspace list is folded.
- Loads older sessions as you scroll — one page (20 rows) is rendered first, and reaching the end of it appends the next page until the history runs out. No fold row and no inner scrollbar: the section lives inside the workspace list's own scroll area, so the column scrolls as one surface.
- The workspace tree's row, reused — a 16px state cell, the title, the age
in the shell's caption size, and the pin marker on a pinned session; size,
spacing, radius, and the hover/current highlight all come from the shell's own
session row (32px /
0 8px/--dsw-radius-md/--dsw-alias-interactive-bg-hover). - Hovering swaps in the actions — while the pointer is on a row (or its menu
is open) the age and the pin marker give way to that row's actions: the
…menu (pin / rename / fork / archive), archive, and pin, with the shell's own icons and spacing (16px buttons, 10px apart). - Hovering moves nothing — the pointer changes what a row shows (its fill,
and what sits in a fixed-width trailing cell), never where anything is: the
row's position and width, the title's inline start, and the trailing cell's
position and width are the same values at rest, on hover, and with the row's
menu open. The cell is 74px wide in every state and only ever holds one of its
three occupants, and the row carries no
transitionat all, so both arriving and leaving land in one step — nothing slides or hops under the cursor. - The highlight stops short of the edges — the fill is painted on a layer inset 4px at each end of the row, so the row under the pointer reads as a block with air around it rather than as a full-bleed band. Only that layer is inset, never the row: a row is the layout box of its own text, so insetting the box would step the title sideways and no dropped transition could undo it. Painting the gutter into the layer is what lets the spacing and the stillness both hold.
- Hovering floats nothing — no card rises above the list. Two things happen on hover: the highlight layer lights up, and the trailing cell swaps the age and the pin marker for that row's action buttons. The full title is still reachable — the row's accessible name is the whole title, so screen readers and keyboards get it — while the visible title keeps its ellipsis.
- Archive still asks — the Host refuses to archive a session that still has
work; that refusal raises the shell's own
Stop and archive this session?wording, and confirming stops the work first. - Consistent visibility — the same rules as the workspace tree: archived sessions are hidden, subagent sessions belong to their parent's catalog, and blank provisional sessions never appear (they hold no history).
- Live state — a yellow dot while a session waits for you (approval,
question, plan review), a pulse while it runs, a green dot when a run
finished while you were elsewhere and you have not opened it yet (the
shell's own
completionUnread, cleared by opening the session), and the row of the current session highlighted. The precedence is the shell's: waiting > running > completed; every other (idle) row leaves the leading cell empty, so the shell's ownsidebar.session.row.leadingseat (the scheduled-task clock) keeps that spot. - Workspace folding — the workspace list shows five folders by default behind
a
Show N more workspacesrow in the shell's own style; the recent list does not fold. The five are the ones with the newest history: every group is ranked by its own latest session, the ungrouped bucket competes like any workspace instead of holding a permanent place, and a folder whose chats are not recent — or which has none at all — only appears when a slot is left over. Expanding is a temporary state, so collapsing the sidebar and reopening it returns to the folded default, as in Codex. - Five conversations per project — a project's session rows fold to their five
newest by the session's own last activity, whatever their live state:
running, waiting, and blank rows take no extra slot here (the shell's own quota
exempts them; this layer does not, so a running session older than the fifth
newest folds like any other). What is left over waits behind a single row — the
shell's own
Show N more sessionswhen it renders one, otherwise an identical row this plugin injects — and one click unfolds the whole group. - Native look —
--dsw-*semantic tokens plus the shell's ownStateDotand chevron icons, so light/dark and every brand theme follow the shell; the fold row matches the shell's own session overflow control exactly. - No hover-card primitive — the card is gone as a whole, so this plugin never
touches
HoverCardfrom@deepseek-ai/dsh-client-ui-primitives; the workspace tree's own session cards are unaffected. - No shell source changes — the recent section registers into the sidebar's
long-standing
sidebar.footer.actionlist slot and performs its actions through the shell's publicuiWorkspaceservice; the workspace list offers no slot or service for folding, so that half is applied at the DOM level (see Design notes). DSH's front end is neither patched nor rebuilt.
Install
From the profile that runs your GUI (usually ~/.dsh/profiles/web), install
from GitHub:
dsh plugin --profile web add github:ttmouse/dsh-recent
Or point at a local clone while working on the plugin (link: follows your
edits):
dsh plugin --profile web add link:/path/to/dsh-recent
Either way the command writes the dependency into the profile's package.json
and appends dsh-recent to dsh.profile.bundles. Doing both steps by hand
works too:
{
"dependencies": { "dsh-recent": "link:/path/to/dsh-recent" },
"dsh": { "profile": { "bundles": ["…", "dsh-recent"] } }
}
Then restart dsh web and reload the page — the bundle list is read at startup,
and hot reload only covers source changes of plugins that are already loaded:
# stop the running dsh web, then
dsh web
Development
pnpm install
pnpm run typecheck # tsc --noEmit over src + tests
pnpm test # unit tests; also checks lib/client.js's loader contract once built
pnpm run build # lib/index.js + lib/invariant.js + lib/client.js + lib/types
lib/ is committed, and the host serves lib/client.js rather than the source,
so re-run pnpm run build after every source change. CI rebuilds and fails if
the committed lib/ drifts from a fresh build.
Design notes
- Seat —
sidebar.footer.actionis a list slot declared by@deepseek-ai/dsh-client-ui-sidebar, rendered exactly between the workspace tree and Settings. Narrowed to the 56px rail (wide: false) the section rendersnull: a list has no meaning in the icon rail. - Data — sessions and workspaces come through the framework standard kit
(the registration's own
useSessions/useSessionStatus/useWorkspacesselector hooks), and session actions come through theRecentActionsface injected at registration (src/client/sessionActions.ts, bound touiWorkspace); the component subscribes to no external source. - Opening — goes through
uiWorkspace.openSession, which also clears the center panel's selection;uiWorkspaceis a required cordis service, and the sidebar shell itself depends on it. - Relative time — the shell's own
relativeTimefrom@deepseek-ai/dsh-client-ui-primitives(now / Nmin / Nh / Nd / Nmo / Ny), refreshed every 30 seconds, so one session reads the same age on both surfaces by construction. - Row copied from the shell — every row element follows
ui-workspace's session row: the 16×20 state cell, the 14/20 title, the 10/16 tertiary age, the pin marker, and the three 16px icon buttons the row swaps in on hover, with--dsw-alias-interactive-bg-hoverfor both the hovered row and the current one. The trailing cell is the one thing measured rather than copied: the shell's row lets it resize with what it holds (which is why a hovered shell row pulls its own title sideways), so this section pins it at 74px and mounts exactly one occupant at a time — age, or pin marker, or the actions. The row no longer carries a card, so these elements sit on the row itself — the shell wraps its session rows in a hover-card slot, and this section's rows need no such layer. The title keeps its ellipsis on hover instead of hard-clipping and marquee-scrolling. - Cross-project ownership moves onto the row — the shell's session card
carries "which project does this session belong to" in the card, on the line
the shell reserves for extra content (its
sidebar.session.row.hoverseat). With the card gone, that fact is carried by theShow project namesview option instead: with it on, every row gains a 12px tertiary line under the title (the workspace title, falling back to the directory basename and then toUngroupedfor a session no workspace claims); with it off, the list stays a single compact line per session. - Row actions go through public services — archive, pin and fork all run
through the injected
uiWorkspace(archiveSession/pinSession/forkSession), and rename throughctx.sessions(it lends the session's binding tosession.rename), becauseuiWorkspacecarries no rename. The shell's own row-action slots (sidebar.workspaces.session.row.action,sidebar.workspaces.session.menu.item) are declared byui-workspaceand a child slot has exactly one declaring entry, so a plugin cannot declare or render them: what is reproduced here is the look and the behavior, not the slot. When the Host refuses to archive a session that still has work (WorkspaceArchiveError+workspace/session-active) the stop-and-archive confirmation is raised; every other failure is logged, because the plugin owns no notice surface. - Folding the workspace list — the shell renders one
_groupSectionper workspace and exposes no "show fewer" affordance, slot, store or config field, so the plugin applies it from the outside: the groups that lose the ranking getdisplay: noneand a fold row is inserted after the last group the fold keeps. React rewrites the list on every frame, so aMutationObserverondocument.bodyre-applies the fold, comparing before writing so its own writes never feed it; the callback filters records to sidebar mutations first, so conversation streaming never reachesapply(). The container is resolved as the parent of the first rendered_groupSection, which leaves the flat/search rendering (no group wrappers) untouched. The fold cuts by "used most recently", not by list order: every group's freshness is its own newest session (membership copied from the shell — registered workspaces claim their own sessions and the rest belong to the ungrouped bucket), and the five freshest survive. A group's identity comes from the DOM: the shell writesdata-row-key="workspace:<workspace id>"on each group's header row (the bucket's key is the empty string), which is the only stable address a group has — its classes are hashed and its markup is React's. A group with no history ranks behind every group that has some, so it appears only while a slot is left over, and a list that already fits the five is left alone entirely. The ungrouped bucket therefore has no special treatment any more: it is hidden by default and shows up only when its own sessions are new enough to win a place. The fold row trails the last kept group in render order, while the groups it hides stay where they are, simply out of sight — so unfolding restores the original order. - Folding is temporary state — no store: the expanded flag lives in the
component, so collapsing the sidebar and reopening it (
widefalse → true) returns the workspace list to the five-row default and the recent list to its first page. - How the per-project session fold works — the shell does not render session
rows as the group's own children: each one sits inside its own hover-card slot
(a
position:relative; display:blockspan that carries a 2px lead-in of its own). The fold therefore finds rows by theirdata-row-key="session:<id>"and hides and restores the slot, because hiding the row alone would leave the slot's spacing behind; its own overflow row is inserted after the last kept row's slot, on the same level and with the same metrics as the shell's own overflow control (margin-topzeroed like it). Each group keeps exactly one expander: when the shell already rendersShow N more sessions, no second row is injected, and clicking the shell's row unfolds both layers at once (the plugin listens for thatdata-row-keyon the document). Ranking reads the session catalog's own timestamps, so a row the catalog does not know yet ranks last. - The section lives inside the list's scroll area — it is portalled into the
shell's own scrolling container (the workspace tree's
overflow-y: autolist) as that column's last content. So there is exactly one scrollbar: scrolling past the workspace tree reaches 最近, and scrolling further reaches older sessions. The section reserves no fixed bottom block and never scrolls internally — it is exactly as tall as its rows. - How the paging works — a 1px sentinel sits at the end of the rendered
window and an
IntersectionObserver(rooted at that same scroller, firing 320px before the bottom) watches it; when it comes into view the render window grows by one page. Appending pushes the sentinel out of the trigger band, so the observer settles until the next scroll: the list grows a page at a time rather than all at once. Folding the section away (its header chevron) removes the sentinel, so a folded list never loads in the background. - No more shell layout override — the section used to ride outside that
scroller, where the shell's
flex: 1on the list stretched a short workspace list to the column's foot and stranded the section out of sight; the fold layer therefore traded that grow forflex: 0 1 auto. Inside the scroller the problem cannot occur (the section is part of the list's content, not a sibling below it), so that write is gone and the plugin no longer touches the shell's layout.
Known limitations
- Wide column only — the 56px rail renders no recent section (an entry that
deserves a rail cell should be a
sidebar.panellistpanel instead). - Workspace folding depends on the shell's DOM — it keys off the
_groupSection/_footAreaCSS-module suffixes, the first group's parent, and thedata-row-key="workspace:<id>"address on each group's header row. If the shell renames or restructures them the fold silently stops applying (degrading to the shell's full list) instead of failing loudly; a group whose identity cannot be read ranks last, which is the same as cutting by list order. The fold counts groups (the ungrouped bucket included), not sessions. The section's own scroll area rides the same lookup: if the shell stops giving its list its ownoverflow-y, the section follows that resolution to whatever element the lookup names. - Fold, not reorder — freshness only decides who survives; workspace order stays the list's own (newest first, plus manual ordering); the plugin does not re-sort by recent activity, which would require changing the shell's list order upstream.
- The session fold depends on the shell's DOM too — rows are found by
data-row-key="session:<id>"and attributed by_groupSection(a nested group keeps its own rows); if the shell drops those row keys or restructures the slots, the session fold silently falls back to the shell's own quota (five idle sessions plus its running/blank exemptions) instead of failing loudly. Note also that the shell's own row counts only what the shell left unrendered, so unfolding it shows the rows this fold holds back a little earlier than it promises. - One page at a time — 20 rows render first and each scroll appends 20 more; with a lot of history, reaching the oldest session means scrolling to the end, and there is no page number or jump target.
- No hover card — a row shows no floating card, so the full title of a
clipped session is only readable through the row's accessible name (or by
widening the column). The
Show project namesview option is the way to see which project a session belongs to. - The rename dialog is its own — the shell's rename dialog is driven by a
ui-workspaceinternal store a plugin cannot reach, so the plugin carries its own copy of the shell's “Rename session” dialog (44px field, autofocus with the text selected, Enter commits, an Enter that settles an IME composition does not, and the failure line is the host's own message). The rename itself takes the shell's own route —ctx.sessionslends the session's binding tosession.renameunder the sameworkspaceOperationsource label — so the title the host accepted settles into that session'stitleprojection at once and the row updates on the spot, without waiting for the next control-stream frame. - No search — search stays in the workspace tree. For a session from long ago, search is still faster than scrolling.
- A title-less session shows its id — titles are projected by the host from
the log; for old sessions without one the row falls back to
displayTitle(usually the project directory name or the session id).
License
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10686
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★ 10686
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★ 8436
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7504
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★ 5379
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1076
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.