dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DSH plugin: fold the sidebar add-on rows under the shipped More row; kept-visible rows and left/center/right alignment
Collapse the DSH sidebar's add-on entries into the shipped “More” row.
The left column's *Global panels* list grows with every installed plugin: schedules, agent teams, the plugin market, context pages, … dsh-sidebar-fold puts a 28×28 square arrow toggle on the right end of the host's “More” row. One click folds those add-on rows away so only the “More” line remains; the arrow flips from ▲ (can collapse) to ▼ (can expand) and a second click brings the rows back.
patched, nothing in app.asar is touched, and uninstalling restores the sidebar exactly as shipped (own ` tag and data-dshsf-*` marks removed).
panelRow carryingaria-haspopup="menu" inside the “Global panels” nav, which is locale-independent and independent of plugin registration order.
localStorage, so areload keeps it.
icon + label pair left / centred / right. At right the toggle mirrors to the row's left end so it never covers the text; the override is a single justify-content longhand and leaves the row's display/gap/height alone.
in the plugin's settings card (host Config, .volatile(), applied without a restart).
removed and every row is shown again: no squeezing, no half-hidden state.
plugin stays out of the way instead of breaking the sidebar (dsh-sidebar-fold: fold installed { mounted: false } in the console tells you it happened).
Expanded, rows centred — the toggle sits on the More row and the add-on rows are listed:
Folded — only the plugin row and the More row remain:
# npm channel (after release)
dsh plugin --profile <profile> add dsh-sidebar-fold
# local build
npm run build && npm run verify
npm pack --pack-destination .
dsh plugin --profile <profile> add ./dsh-sidebar-fold-0.1.2.tgzThen add dsh-sidebar-fold to the profile's dsh.profile.bundles list (or enable the bundle in the app) and restart. On the desktop profile, quit the Electron app before editing its package.json — the running app rewrites that file and rolls external edits back.
Open Plugins → dsh-sidebar-fold (the card is registered on the plugins.bundle.config seat, keyed by the package name):
Field · Meaning · Default Folded by default · State a window starts in when it has no local record · off Row alignment · Three-way segmented control (left / centre / right) for the managed rows; the “More” row follows the same setting · left Entries kept visible · One switch per row read from the live sidebar — switch a row on to keep it visible while the rest fold · only 插件 / Plugins
The row list is read from the DOM at open time, so a panel installed later shows up without editing anything. When every row is switched on the toggle dims itself and reports aria-disabled="true" instead of flipping an arrow over an unchanged list.
npm run build # scripts/build-client.mjs -> lib/client.js (module-loader bundle)
npm run verify # gate: loader id === package name, dual-manifest same string,
# no module request, no host primitives, 9 locales, no
# machine-absolute paths
npm test # node --test on the pure seams (header split, nav fallback chain)
npm run hosts:check # enumeration drift vs scripts/hosts.mjs (--write to repair)prepack runs build + verify, so a stale lib/client.js cannot be published.
DSH 0.2.1-rc.3 only. Single source of truth: scripts/hosts.mjs (the three declarations — engines.dsh, peerDependencies, dsh.plugin.json — are generated from it and must not be edited by hand).
Why not wider: mounting needs the sidebar's panel list and the shipped "More" row. Measured on every published dsh-client-ui-sidebar rc:
host line · panel list · "More" row 0.1.0-rc.8 / 0.1.1-rc.2 / 0.1.2-rc.1 · no · no 0.1.5-rc.3 / 0.1.7-rc.2 / 0.2.0-rc.2 · yes · no 0.2.1-rc.1 / 0.2.1-rc.2 · yes · no 0.2.1-rc.3 · yes · yes
On a line without the More row the plugin degrades quietly — it injects nothing and leaves the sidebar as shipped. Declaring such a host would only install a plugin that does nothing.
After a host upgrade, re-run the browser smoke test before widening this list: CSS-module hashes drift every build (rc.2 emitted wtg9ga_, rc.3 emits hHd-Xa_), so only the fragment selectors (_panelList, _panelRow, _moreAnchor, _collapsed) are stable.
Host CSS-module hashes drift per build (wtg9ga_ on rc.2 → hHd-Xa_ on the rc.3 runtime), which is why every selector matches a *fragment* (_panelList, _panelRow, _moreAnchor, _collapsed). After any host upgrade, re-run the browser smoke before assuming the fold still mounts; the plugin degrades silently by design, so a regression shows up as “nothing happened”, not as an error.
src/index.js host half: Config schema + no-op apply (no build step)
src/client/constants.ts measured anchors, attribute marks, injected stylesheet
src/client/locales.ts 9 runtime dictionaries (zh = key-set source of truth)
src/client/fold.ts nav location, header/group split, toggle mount, fold state
src/client/settings-card.ts the bundle-page configuration card (plain DOM)
src/client/index.ts apply: fold first, then the guarded settings waists
scripts/ build-client / verify / sync-hosts / hosts / gen-locale-metaMIT