Passer au contenu principal
S

dsh-sidebar-tint

smsmy/dsh-sidebar-tint

Sidebar status for DeepSeek Harness: workspace rows with an aggregate state colour (idle/running/waiting), one left edge per session state, a count badge with waiting count and goal progress, four themes with tint and motion sliders, hide-empty folder toggle, quick pinning at the row edge, and an Arabic/English/Chinese UI. CSS/JS only, no network, no permissions, no dependencies.

Installer

dsh plugin --profile web add github:smsmy/dsh-sidebar-tint

README

dsh-sidebar-tint

Languages: English · 简体中文 · العربية

Version 1.8.1 · GitHub · npm: dsh-sidebar-tint. Display name: Sidebar Status.

A compact sidebar control panel for DeepSeek Harness: workspace rows read as tinted pills, sessions sit quieter underneath, every session carries one left edge for its state, and the top of the sidebar gains a pin strip plus a labelled toolbar. Four ready-made themes, a 0–100% tint slider, a separate 0–200% motion-glow slider, an Arabic/English/Chinese UI, and JSON settings export/import — all CSS/JS, no dependencies, no network.

dsh-sidebar-tint

Four themes Three languages


Install

dsh plugin --profile desktop add dsh-sidebar-tint

Restart the app (or reload the page in the web UI). The sheet and both scripts are re-read from lib/ on every HTML request, so later edits need only a page reload.

What it changes

ElementBeforeAfter
Workspace rowtransparentvertical tint + 1px inset ring (classic: .09 → .05, ring .07)
Workspace row hover—opens to .13 → .08
Workspace title400 · rgb(249,250,251)700 · theme foreground
Folder icongrey#6fb7ff (classic)
Session title14pxrgba(249,250,251,.68) · 13.5px
Open sessionwhite textwhite 600 · blue coat .20 + 3px edge (wins by selector specificity (0,4,0), no !important)
Count badge—22px pill at row end: total + waiting count (amber) + progress ring when a goal exists
Session statenative dotone left edge: blue 2px + light sheen 6s (running) · amber 3px breathing 2s (waiting) · green static (done) · dim green (>24h unread)
Nesting guide—1px line at left: 9px via ::after
Sidebar top—slim toolbar (hide-empty toggle + settings) and a sticky pinned strip
CustomisationCSS variables4 themes + tint slider + motion-glow slider + language + JSON export/import

Themes and intensity

classic (default translucent white glass) · darker (near-black outlined chips) · light (light chip with dark title on the dark sidebar) · muted (desaturated slate). The tint slider scales background/edge alphas and edge widths through --dsh-st-i. The motion-glow slider (0–200%) is separate (--dsh-st-wave): it controls only the running sheen and the waiting breathe glow — static edges are untouched. Default 100% is the calm look, 200% doubles the glow, so the current look is not the ceiling. At 0% tint no edges remain; typography stays. Settings live in localStorage under dsh-sidebar-tint.settings.v1.

Language

auto follows the html[lang] DSH sets from its locale preference (falling back to the browser language, then the rendered UI text). You can pin Arabic, English or 简体中文 from the panel; a DSH locale change is followed without a reload. Panel direction switches with the language. In the light theme, aggregate badges use per-theme --dsh-st-agg-* colours so the text stays readable on the white chip (rgb(29,78,216) on rgba(37,99,235,.14)).\n\n## Badge: total, waiting, progress

  • Total from group.sessionCount (the app's own number, archived excluded).
  • Waiting (small amber number inside the badge) from all sessions of the workspace via list.byId + workspaces[].sessionIds, using userQuestions.active or data-state="warning" — so collapsed folders are counted too (a 1.6.0 limitation).
  • Progress ring only when a session goal exists (roundsStarted / maxGoalRounds, or phase === "complete"). DSH has no generic "task progress" field; we never invent one.
  • Clicking the badge toggles the folder (the click simply reaches the app's own row handler).

Quick pin

A pin button appears on hover for folders and sessions. Pinned items get a sticky strip above the tree with a state dot and folder count. Clicking a folder chip opens it and flashes the row; clicking a session chip opens that session. Each chip has an × to unpin. In folder rows the pin sits at the far right edge, after the count badge, and is always visible (it does not appear/disappear on hover); the app's own actions (⋯ / +) keep their reserved space, so the title never jumps to the middle on hover. Session pins appear on hover at the edge. This is our own quick-access list — it does not touch DSH's native pin (rowState.pinnedSessionIds) or reorder React's tree. In session rows the button shifts left automatically when another plugin already adds a star (:has()), and in harmony mode we skip our count badge if another plugin renders a count in the same row.

Session state

Reads the app's [data-state] first, then React fiber (running / completed / pendingInteraction), then byId (userQuestions.active). Priority: selected (blue coat + 3px edge) → waiting → running → done → idle. "Done until opened" is mirrored in sessionStorage (key dsh-st-done-v1): survives reloads, clears on click/selection, never leaks to another tab. Age comes from updatedAt; older than 24h renders dim green (dsh-st-done-stale).

State legend

Orange is not a project type. A folder's icon and badge turn amber when one of its sessions is waiting for you, blue when one is running, and stay neutral slate otherwise — an idle folder and a running folder are not the same colour. The row background never changes.

The blue ring around the count badge is not selection or activity: it is task progress (goal) — roundsStarted/maxGoalRounds, or 100% when phase=complete; the tooltip spells it out ("task progress 100%"). A completed goal (100%) clears the ring; the tooltip still reports it. No goal, no ring. Hovering a folder row shows the same meaning as a tooltip ("Waiting for you: n of m sessions").

Performance

One debounced (150ms) MutationObserver per layer, filtered to ignore our own mutations; a light poll (1.5s counts / 1.2s states) that pauses while the document is hidden; byId read once per tick; writes happen only on actual change. No layout shift: session rows stay 32px, edges/guides are inset shadows and pseudo-elements.

Deliberately not done

No network, no page-side file reads, no permissions (permissions.network = []). No direction change (left edge is physical, not logical). No extra fixed row height. No red "error" state (the app never exposes one for sessions). No mutation of app state: no native pinning, no programmatic collapse, no reordering — interactions only forward clicks the user could make.

How it works

One channel: webserver/index-inject. On every HTML request the entry reads lib/sheet.css, lib/count.js, lib/status.js from disk and pushes them with a splice-then-push guard, so a newer fiber wins and edits appear on reload without a rebuild or restart. Selectors use only the prefix-free part of hashed CSS-module names. Data comes from the SessionTree fiber: list.byId, workspaces[].sessionIds, rowState.archivedSessionIds, and the row-local group.sessionCount.

Debug hooks: window.__DST_UI__ (version, settings(), setSettings(), exportSettings(), importSettings(), refresh()) and window.__DST_STATUS__.get(sessionId).

Upgrading from 1.6.0

1.8.1 ships under the same package name (dsh-sidebar-tint), so there is no rename step — just install/update:

dsh plugin --profile desktop add dsh-sidebar-tint

Settings written by 1.7/1.8 test builds under dsh-sidebar-status.settings.v1 are read once and re-saved under dsh-sidebar-tint.settings.v1. The old key is only a migration fallback.

Build

npm run build   # embeds src/sheet.css + src/count.js + src/status.js into lib/index.mjs
npm pack        # prepack runs the build

License

MIT

Plugins associés