DeepSeek Harness Plugin

Choi-Peng/dsh-footer-order

Stars ★ 1 Downloads (30d) 1,009 Category UI Enhancements Added 2026-08-19 npm @choi-p/dsh-footer-order

DSH sidebar footer ordering: forces the sidebar.footer.action slot into a vertical stack and lets users configure the top-to-bottom order of its entries.

Install

# from npm (prebuilt)

dsh plugin --profile web add @choi-p/dsh-footer-order

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:Choi-Peng/dsh-footer-order

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

A DeepSeek Harness web plugin that fixes the sidebar footer (sidebar.footer.action slot) squeezing multiple plugin entries into one row, and lets you configure their top-to-bottom order.

[!NOTE] AI-generated disclaimer: this plugin was generated by AI; review the code and test it before use. Issues and PRs are welcome.

[!COMPAT] Version compatibility: this release targets dsh ≥ 0.2.1-rc.1 and uses the 0.2 configuration model (an exported Config schema projected by the settings seam, read in the browser through ctx.configForms, with the settings surfaces on the plugin's own pages). It does not install on dsh 0.1.x — use @choi-p/dsh-footer-order@0.4.x there.

Problem

After installing several plugins, each registers content into the sidebar.footer.action slot. The slot anchor div[data-slot="sidebar.footer.action"] gets the inline style display: contents from the dsh web-react renderer, so every entry's root element participates directly in the parent's layout (.footerActions, display: flex, row direction) — multiple footer plugins end up crammed into one horizontal row.

This plugin injects an !important stylesheet rule that turns the anchor into a vertical flex stack (display: flex; flex-direction: column), so the entries are arranged top to bottom.

Features

  • Stacks sidebar.footer.action content vertically (display: contents → flex column), fixing the squeezed row.
  • Configurable top-to-bottom order: write the entry-id list in the bundle's cordis.patch.yml row, or reorder with ↑/↓ on the plugin's configuration page.
  • The shell's Settings row (settingsArea / the sidebar.settings slot) joins the same order list under the reserved id settings — put it above, between, or below the footer entries; leave it out and it stays exactly where the shell renders it.
  • Whole-settingsArea arrangement: settingsLayout (row / column / row-reverse / column-reverse / contents), settingsGap (px, default 8), settingsAlign (center / stretch / start / end), and settingsOrder (↑/↓ order of the area's blocks). The scope is the div.settingsArea container, not just the shell's sidebar.settings outlet: whatever another plugin appends to that area (e.g. the .dsh-sidebar-row that @zhengjunyao/dsh-restart adds) is an arrangeable block too.
  • Configurable layout (column / row / contents), gap (px between entries), and align (cross-axis alignment).
  • Tolerates entries that render nothing (e.g. the shell's dormant cordis-panel, which returns null unless a dynamic plugin run needs attention): those entries are skipped by the ordering instead of blocking it when "registered ids ≠ DOM nodes".
  • Live config: saving applies instantly without restarting dsh web — every field is volatile, so the loader treats the write as a live update instead of remounting the entry. Editing the bundle's cordis.patch.yml base config still reloads the fiber through patch-layer HMR.
  • Registers no visible footer entry itself — it only does layout + ordering, and cleans up its style sheet, observers, and DOM moves on unload.

Architecture

Side File Role
Host lib/index.js Exports the schemastery Config the settings seam projects (every field volatile). No settings namespace, no HTTP route: the configuration rides the 0.2 seam, and the whole feature is client-side
Client lib/client.js Reads/writes the effective config through ctx.configForms, injects the override stylesheet (anchor → vertical flex, plus the whole-settingsArea arrangement when configured), watches the DOM and reorders the anchor's blocks (footer entries +, when listed, the settings row) per config, writes the settingsArea block order as inline order, and registers the two settings surfaces

Settings surfaces:

  • plugins.bundle.config, keyed by the package name — a section on this plugin's page in Settings → Plugins.
  • plugins.row.config, keyed by <package name>#footer-order — the configuration page the Plugins page dispatches for this bundle's row.

Ordering: every registered entry renders as exactly one child of the anchor (the renderer outputs entries sorted by order), but some entries may render nothing (e.g. cordis-panel, or readouts hidden in the collapsed rail). The client pairs each child with the entry id from ctx.slots.entriesOfSlot('sidebar.footer.action') through three layers: ① label text — a child whose text contains an entry's label (e.g. the "Restart DSH" button) is that entry; ② previously confirmed pairings; ③ a subsequence heuristic over the remaining children (config-order match first, then minimal rank shift). It then re-sorts the children to the configured sequence — so ordering keeps working even while a dormant null-rendering entry stays registered.

The settings row is found without touching the shell's hashed CSS-module class: the sidebar.settings outlet anchor is display: contents, so its parent element is div.settingsArea. Whenever the reserved id settings appears in order, that block is moved into the footer column (the anchor this plugin already owns) and sorted alongside the entries; when it does not appear, the block is handed back to div.footArea as its last child — where the shell renders it — and is otherwise never touched. On unload the plugin restores it too, so nothing is left behind.

settingsArea is a container the shell shares with other plugins (the 0.2.1 shell hands it whole to whoever appends to it): @zhengjunyao/dsh-restart appends its own .dsh-sidebar-row as the area's last child. The plugin therefore arranges div.settingsArea itself, not the sidebar.settings outlet: the block first gets a stable data-dfo-settings-area marker (its class name carries a build hash and cannot be hard-coded), and the stylesheet targets that marker.

The area's blocks come from a structural walk: the in-flow element children, descending through outlet anchors (the renderer gives them display: contents, so their children are the real flex items) and skipping position: fixed / absolute overlays (the settings panel, the onboarding outlet). The shell's settings row is detected structurally (it holds the settings.launcher outlet or the aria-haspopup="dialog" trigger) and keeps the reserved key settings; every other block is keyed from its own identity — id → plugin:<data-plugin> → slot:<data-slot> → first class token — so dsh-restart's row is plugin:dsh-sidebar-row.

The order is written only as an inline order declaration with !important; no node is ever moved. Flex lays items out by CSS order first and document order second, so the inline declaration outranks any foreign stylesheet rule; and leaving the DOM alone matters because dsh-restart's observer re-appends its row whenever that row is not the area's last child — moving nodes here would make the two plugins trade moves forever. Clearing settingsOrder releases only the declarations this plugin wrote, never a plugin's own inline order.

Width is covered by the same rules, so nothing spills past the area: the shell's settings row arrives as width: calc(100% + 4px) with -2px side margins (it bleeds into the sidebar padding), and as one item of the shared line it is reset to take only the space that is left (flex:1 1 auto; width:auto; margin:0); injected blocks keep their intrinsic size (flex:0 1 auto), but every item carries min-width:0 and max-width:100% — so a block whose own stylesheet says width:100% or flex:1 1 auto can neither squeeze the other item to zero width nor push the line past settingsArea.

Configuration

The plugin follows the dsh 0.2 config model, and all changes apply live without restarting dsh web (dsh ≥ 0.2.1-rc.1):

Layer Source How it takes effect
Default built into the exported Config schema —
base layer the bundle's own cordis.patch.yml inline config (dsh.bundle.patch, auto-mounted on install) dsh web watches the patch layer (HMR); editing it reloads this fiber with the new config
user layer Save on the plugin's configuration page, written into this entry's row in the profile patch document through the settings seam; Reset clears those overrides and falls back to the bundle defaults every field is volatile, so the seam publishes a live update — no remount, no restart

The base-layer config (what the bundle ships):

- insert:
    - id: footer-order
      name: '@choi-p/dsh-footer-order'
      config:
        layout: column            # column = vertical stack (default) | row = horizontal | contents = no override
        gap: 0                    # gap between entries in px (>= 0)
        align: stretch            # stretch | start | center | end (cross-axis alignment when column)
        order: []                 # entry-id list, top to bottom; unlisted entries keep default registration order below the listed ones
        settingsLayout: contents  # contents = no override (default) | row | column | row-reverse | column-reverse
        settingsGap: 8            # gap between the area's blocks in px (default 8)
        settingsAlign: center     # center | stretch | start | end
        settingsOrder: []         # area block order, e.g. [settings, plugin:dsh-sidebar-row]

The ids in order are the id each plugin passes to slots.register({ name, id, ... }) for sidebar.footer.action — not package names. The configuration page lists all currently registered ids and lets you reorder them with ↑/↓.

The keys in settingsOrder are blocks inside settingsArea: settings stands for the shell's settings row; any other block uses its own id, or plugin:<data-plugin> (dsh-restart's row is plugin:dsh-sidebar-row), falling back to slot:<data-slot> / its first class token. Blocks left out keep their DOM order and follow the listed ones; the sequence is applied as inline order and no node is moved.

settings is a reserved id: it stands for the shell's Settings row (the sidebar.settings slot rendered inside div.settingsArea). List it anywhere in order — e.g. ['settings', 'deepseek-balance'] puts Settings above the balance readout — and the row is moved into the footer column at that position. Leave it out and the row stays exactly where the shell renders it: the bottom of the foot area, below the whole footer stack. (If a real footer entry happens to be registered under the id settings, it wins — the reserved id is only used when no entry owns it.)

The form exposes layout, gap, align, order, and the settingsArea group (which now spans the whole area, injected blocks included), with Save / Reset to defaults. A save is one atomic write through ctx.configForms; the controller fences it with the namespace revision, so a concurrent edit is refused by the seam and the form reloads the accepted state instead of silently clobbering it.

Installation

Via plugin registry / marketplace

Settings → Plugins → Install, source @choi-p/dsh-footer-order or github:Choi-Peng/dsh-footer-order.

Manual

dsh plugin --profile web add "github:Choi-Peng/dsh-footer-order"

The plugin package ships its own cordis.patch.yml (dsh.bundle.patch in package.json), which dsh mounts automatically on install. Restart dsh web to activate.

Uninstall

dsh plugin --profile web remove @choi-p/dsh-footer-order

The bundle mount disappears with the plugin. If you had previously written the row manually in the profile layer, remove it first.

Usage

  1. Open dsh web — the footer entries below the sidebar stack vertically.
  2. Settings → Plugins → Sidebar Footer Order (the bundle's page, or the row's configuration page): adjust layout, gap, alignment, entry order, and the whole settingsArea arrangement (the shell's settings row plus blocks other plugins inject there, such as dsh-restart's entry row), then Save. The "Settings row (settingsArea)" entry in the order list can be moved anywhere with ↑/↓. All changes apply live without restarting dsh web.

Development

pnpm install
node --check lib/index.js
node --check lib/client.js
node scripts/smoke-host.mjs    # host half: exported Config contract + real cordis mount
node scripts/smoke-client.mjs  # client half: CSS/ordering/pairing + settings surfaces + form writes

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.