- Início
- Plugins
- Melhorias de UI
- dsh-awesome-workspace-ux
dsh-awesome-workspace-ux
doublelll3/dsh-awesome-workspace-ux
Orders workspace groups by recent activity, collects pinned conversations into a shelf above the list, pins workspaces, tints each group with a coloured left edge and marks remote ones, and shows the current workspace beside the composer.
Instalar
dsh plugin --profile web add github:doublelll3/dsh-awesome-workspace-uxREADME
dsh-awesome-workspace-ux
Workspace-first improvements for the DeepSeek Harness sidebar and composer. One client bundle, six switches, all on by default.
Why this exists
I keep a dozen projects open at once, and the thing that kept failing was memory: which conversations are still in flight? They are scattered across workspaces, and the sidebar could not answer that.
The shipped sidebar groups by workspace (or by workspace tree), and inside a group it sorts sessions by recency — so each project is ordered. The workspaces themselves, however, keep a fixed order that has nothing to do with activity: they stay wherever they were created or last dragged. Answering "what did I touch today" meant reading every group.
So the first switch here sorts the workspace groups themselves by their latest activity. Everything else in this bundle comes from the same walk through the sidebar: once you actually look at that list every day, the rough edges are hard to unsee.
| Rough edge | Switch that addresses it |
|---|---|
| Groups all look alike; long lists read as one grey field | 工作区配色 — one wash per workspace |
| Remote and local folders look identical | 远程工作区标记 — a badge on remote folders |
| Pinned conversations stay buried inside their groups | 置顶区 — one block above the list |
| You cannot keep two projects at the top | 工作区置顶 — pin whole workspaces |
| You forget which workspace a draft belongs to | 输入框下方显示工作区 — the name beside the composer |
The six switches
| Switch | What it does |
|---|---|
| 按最近活动排序工作区 / ordering | Workspace groups follow recent activity (the shipped sidebar only sorts sessions inside a group). |
| 工作区配色 / colors | One wash per workspace so a group reads as a block — slimmer corners than the app frame, a coloured left edge, and a small vertical gap so neighbouring groups never merge. |
| 远程工作区标记 / marks | A wireless badge on the folder icon of every remote workspace. |
| 置顶区 / shelf | The pinned conversations collected into a 「置顶区」 block above the workspace list. Five rows, then 展开 +N; drag to reorder; click to open the conversation and jump to it in its workspace; hover for ✕. |
| 工作区置顶 / pins | Every workspace row shows a pin on hover; click it (or right-click → 置顶工作区) to pin. Pinned ones float to the top and drag into any order, even in the host's manual mode. |
| 输入框下方显示工作区 / composer | The current workspace's name in the composer tool row, right of the permission selector. Click to copy its path, hover for the full name. |
pins is deliberately independent of ordering: pinning lifts the pinned half even when the rest stays in the host's order. All six live under 设置 → 工作区优化 (Settings → Workspace extras). Switches apply immediately — every feature tears its patch down and rebuilds on the spot, so the open session, the scroll position and the settings dialog all survive. If one ever lands half-applied, the page header carries a 刷新 button.
Features in detail
按最近活动排序工作区 · ordering
- Workspace groups sort by their newest session (a fresh conversation counts, not just a fresh drag).
- It only reorders — your grouping mode and view settings are never rewritten, and nothing reloads.
- For the order to be visible, pick 分组方式「按工作区」/「按工作区树」 + 排序方式「最近更新」 under the sidebar's view options. 「单列表」 shows one flat list, where ordering has nothing to do.
工作区配色 · colors
- One wash per group instead of per-row stripes: adjacent groups never share a hue, so a block always reads as one project.
- A coloured edge on the left and a slimmer 10px radius keep it a group, not a card; a 3px vertical inset keeps neighbouring groups from melting together.
- Nested workspaces paint an opaque shade over the parent, so indentation stays legible.
- Light/dark switches re-sample the sidebar background, so the wash never compounds into mud.
远程工作区标记 · marks
- Remote workspaces are resolved from the host's registered mirrors first, then from the
remote-workspaces/path segment, so the badge appears even when the mirror endpoint is slow. - The badge sits on the folder's top-right corner; the tint stays the same as local, so the colour carries no second meaning.
置顶区 · shelf
- Pinned conversations appear both inside their workspace and in this block.
- Five rows, then 展开 +N: the workspace list is its own scroll area, so an unbounded shelf would crowd it out.
- Drag rows to reorder (native HTML5 drag, same drop marquee as the shipped session list).
- Clicking a row opens the conversation and reveals it in the tree: a collapsed owner workspace is expanded and the row is highlighted briefly.
- Archive, rename and multi-select are not duplicated here — the row hands you over to the workspace instead.
工作区置顶 · pins
- Hover any workspace row and click the pin at its trailing edge, or right-click → 置顶工作区 / 取消置顶工作区.
- Pinned workspaces float to the top in their own order, which you can drag; they stay pinned regardless of the sort mode.
- Same vocabulary as session pinning: outline on idle, filled when pinned, glyph only (no background block) on hover.
输入框下方显示工作区 · composer
- Names the workspace the draft belongs to, in the composer tool row, styled like the neighbouring 28px controls.
- Click to copy the path (the toast says 已复制路径); hover for the full name and path in a card placed to the right, so it never covers the composer.
- The mode selector is deliberately not duplicated: the session header already shows it.
Install from the plugin list
Publish or unpack the package, then add it from Plugins → Add plugin and enable its row. It is a pure client bundle: no host half, nothing written outside localStorage.
Requirements
- DeepSeek Harness ≥
0.2.2-rc.5(checked against the desktop build of that version). - No host-side dependencies. Client-only: the host half (
index.js) is an emptyapply().
Install
The bundle is a plain DSH bundle: package.json carries dsh.bundle.patch and dsh.client, so installing the directory (or the packed tarball) is enough.
Turning it off
Disable or remove the bundle from the plugin list. Nothing is written outside localStorage, and every DOM/style change is removed with the plugin.
Implementation notes
How each switch hooks the shipped UI, for anyone reading the code or porting it:
ordering
- Reads the sidebar's own view preference (
dsh.workspace.view.v5, including the per-account suffix) so it respects 手动排序 — in manual mode the groups keep the order you dragged. The stored pin order still lifts the pinned half to the top in that mode: pinning never depends on the sort order. - The group order is patched by wrapping the workspace store's
getSnapshot, which is where the sidebar reads itsitems. Modes (按工作区 / 按工作区树 / 单列表) are untouched. - The group signature is computed only from the items already on screen, and the parsed view/pin sets are cached per raw
localStoragestring, so the wrapper costs a couple of property reads per snapshot. - Turning the switch on only changes the order of the groups. It never touches your sidebar view and never reloads: pick 分组方式「按工作区」/「按工作区树」+ 排序方式「最近更新」 under the sidebar's view options yourself, and the recency order becomes visible.
pins
- Pins live in
localStorageunderdsh-awesome-workspace-ux.pinned-workspaces. The stored value is an ordered list: the first entry sits at the top of the pinned half, and a freshly pinned workspace is unshifted to the front. The pinned half is lifted in every sort mode, manual included. - Every workspace row carries a pin marker on its far right, and it uses the same two glyphs as a session row's pin: the hollow outline on hover when the workspace is not pinned, the filled one once it is — drawn at the same
--dsw-alias-label-secondarybrightness, 14px size and 1px stroke as the session-row pin button. Pointing at the glyph itself darkens it to--dsw-alias-label-primary; the hit box is 28px wide (glyph plus the dead space before the hover buttons), and clicks there pin or unpin, the same focus feedback a session row's pin button gives on hover. Clicking it toggles the pin. It is a masked pseudo-element on the shipped row, in a 23px box so the gap to the hover buttons matches their own 13px rhythm, because DSH exposes a row-action slot for sessions but not for workspaces. - Dragging a pinned row reorders the pinned half. The drag uses the shipped
dragstart/dragover/dropevents, so you get the native drag image. The landing spot is marked with the same recipe the shipped list uses for a dragged session: a 2px bar in--dsw-alias-state-business-primarywith the two angled ticks at its left end (the source row fades to 55%). Dropping intercepts the event, so the host's own workspace reorder never runs and the pin order is what persists. - Pinning publishes through the store's own
invalidate(true), which rebuilds its cached snapshot and notifies subscribers in the same task — that is what removed the two-second lag; waking the captured listeners by hand is only the fallback. - Pinning never scrolls the list smoothly: the reveal is an instant jump, because a smooth scroll reads as an unresponsive click.
shelf
-
Each row carries one hover action, ✕ 取消置顶 (
workspaces.unpinSession, the same call the session row's own pin button makes). Archive, rename and multi-select are deliberately not duplicated here: clicking a shelf row reveals the conversation in its workspace, where the sidebar's full row actions already live. -
「置顶区」 is a React root mounted above the list, not a fake workspace group, so it never appears inside a workspace and never interferes with the tree.
-
It coalesces store notifications to one render per animation frame, so a streaming reply cannot recompute it per token.
-
Rows can be dragged into any order; the order persists in
dsh-awesome-workspace-ux.pinned-sessions, and rows you have not moved keep falling back to newest activity first. -
The list stops at five rows (
SHELF_LIMIT): the workspace list below is its own scroll area, so an unbounded shelf would push it out of reach. Anything past five sits behind a展开 +Ntoggle that carriesaria-expandedand flips to 收起. -
Reordering uses the native HTML5 drag the sidebar gives its own rows (drag image + drop marquee), so a button inside the row still takes its own click.
-
Its head measures the shipped 「工作区」 label so the two titles share a left edge.
colors
- Colours are assigned by walking the list in display order, so adjacent groups always differ — eight palette slots are enough for any number of workspaces, which is why there is no per-workspace colour picker.
- The fill is the palette colour blended onto the sidebar's real background, so it is opaque and a nested workspace covers its parent. The base colour is read outside the painted area (so a theme switch cannot compound the tint), and a theme flip triggers a repaint.
- Remote detection uses
dsh-remote's bindings when available and falls back to the…/remote-workspaces/<host>/…path segment, so the badge shows up even if that request fails.
composer
- Registers into the shipped
conversation.input.leftslot, styled after the permission selector beside it (28px, same radius and type scale). - The hover card is a portal to
document.body(the composer clips its children) and opens to the right of the chip, flipping to the left when there is no room. - Clicking copies the path through the async clipboard API, with a
document.execCommandfallback for non-secure contexts, and confirms with 「已复制路径」.
Publishing it
The package is already publishable: npm publish ships index.js, client.js, cordis.patch.yml, locale/*.json, docs/, icon.svg and the src//test/ sources. After the release:
- Plugin list. Anyone can add it from Plugins → Add plugin with the package name. Nothing else is required —
dsh.bundle.patchanddsh.clientare inpackage.json. - Plugin catalogue. Catalogues index published plugins that carry the
dsh-pluginkeyword, so keep that keyword and add the GitHub topicdsh-pluginto the repository; some catalogues are curated lists, so a PR that adds a row (name, one-line description, repository link) is the fastest route into them. - Detail page. The card users see in the plugin list is built from
locale/en.json+locale/zh.json:meta.title,meta.description, andmeta.detail→docs/DETAIL.md/docs/DETAIL.zh.md, each of which is a single image line pointing atdocs/preview.svg. Keep the description about the capability, where to find the switches, and the fact that it adapts undocumented UI internals. - Repository metadata. Fill in
repository,homepageandbugsinpackage.json, and add screenshots of the real sidebar todocs/(see below).
About the images
The illustrations under docs/ are generated — python3 tools/make-docs.py rewrites all seven SVGs (six feature shots plus preview.svg, the market card image). They are plain self-contained SVG, no fonts or bitmaps, so they stay small and readable in both themes.
docs/preview.svg is a hand-drawn, text-free diagram (640×300) so it reads in both themes and needs no font work. Real screenshots are still worth adding — one clean shot of a tinted group with the 置顶区 above it, and one close-up of the composer chip — because the diagram explains the shape, while a screenshot proves the look. Put them in docs/ and reference them from the README with relative paths; the plugin detail page itself only accepts one image, so keep the gallery in the README.
Known limits
-
These are patches over internal contracts (
data-row-key,[data-sidebar-list-area],[class*="groupSection"], the workspace snapshot store,--dsh-workspace-indent). A DSH release that renames them can make a feature stop working — never crash. On startup the bundle runs a contract self-check and reports what it found:window.__dshAwesomeWorkspaceUx // { bundle, features, checks, failures, checkedAt } window.__dshAwesomeWorkspaceUxApi // { readFeatures, setFeature, FEATURES, DEFAULTS, SWITCHES }window.__dshWorkspaceLensandwindow.__dshSidebarPlusremain as aliases for consoles opened before the renames. -
The workspace pin marker is a pseudo-element on the shipped row (DSH exposes a row-action slot for sessions, not for workspaces), so it is not keyboard-focusable; the right-click menu and the pinned shelf are the accessible paths.
-
The 「置顶区」 head measures the shipped 「工作区」 label to line the two up; if that label is hidden (expanded search) the head falls back to its default indent.
Development
npm run build # assemble client.js from template.client.js + src/*.js
npm test # bundle shape, switches, and each feature's pure logic
client.js is generated: edit src/<feature>.js or template.client.js, then rebuild. A DSH client bundle is a single file because the browser module loader only resolves its own seed table (react, react-dom, primitives, …), so the build inlines the three feature bodies as separate IIFEs.
Migrating from the earlier names
This bundle was also installed as dsh-workspace-lens and, before that, as dsh-sidebar-plus (with the features split across dsh-sidebar-recency, dsh-sidebar-identity and dsh-composer-context). The switch set and the pin list are read from those older storage keys once and copied forward, so upgrading keeps your pins and any disabled feature.
License
MIT.
Plugins relacionados
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-TUI
ccch1mneyyy/dsh-tui
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui