Community plugin

aaronlei / dsh-width-tiers

DSH Web client plugin: chat content width tiers (standard / medium / wide / ultra / full / custom) with a floating picker button. Mounts into the app's shell.overlay slot on DSH 0.2.x and drives the native width axis, so the built-in drag handles keep working. UI copy follows the app language (zh / en / ja / es / fr / de / ru / pt).

  • TypeScript
  • MIT
  • 2 stars
  • Nov 25, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-width-tiers is a DSH plugin published from the aaronlei/dsh-width-tiers repository.

  • Listing statusManifest verified
  • Manifest checkedNov 25, 2026
  • Packagedsh-width-tiers
  • Package version2.0.4
  • Source commit36e4b29
  • Repository createdAug 14, 2026

Capabilities and topics

dshdeepseek-harnesspluginweb
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

Cached versionView on GitHub

Tiers

TierContent widthSidebar
Standard 标准App default: max(680px, min(column × 0.64, 920px))unchanged
Medium 中等1120pxunchanged
Wide 宽1280pxunchanged
Ultra 超宽1400pxunchanged
Full 全宽max(640px, column − 176px)collapsed to icon rail
Custom 自定义width recorded from a native dragunchanged

Fixed and custom widths are clamped by the app to max(640px, column − 176px); the standard tier follows the app default (680–920px). The menu always lists each tier's nominal width (1120/1280/1400); only the button shows the width actually applied after the clamp (on an 800px column, Wide reads 1120px in the menu and 640px on the button once selected). Full follows the live column maximum and is marked as hiding the left sidebar, so selecting it can widen the column and change its own value.

Features

  • Uses the app's native width axis (--dsh-chat-user-width and dsh.conversation.contentWidth), so the built-in drag handles keep working.
  • Persists the selected tier and restores it on the next visit; a width dragged with the native handles before installation is adopted as custom.
  • A native drag closes an open menu, and the settled width is announced through a polite live region for screen readers.
  • Follows Settings → Language (中文 / English / 日本語 / Español / Français / Deutsch / Русский / Português), including the Settings plugin card's title and summary (locale/<lang>.json).
  • Menu rows describe the tiers; the button shows the width actually applied.
  • Menu supports ArrowUp/Down, Home/End, Escape and Tab, with focus restoration.
  • Tier changes sync across tabs.
  • Respects prefers-reduced-motion.
  • Never touches the right panel. Only full collapses the left sidebar, and you can expand it again at any time.

Install

dsh plugin --profile web add dsh-width-tiers

Restart dsh web, then hard-refresh the page. A six-bar picker appears at the bottom-right.

For a local checkout:

dsh plugin --profile web add link:/path/to/dsh-width-tiers

Usage

  • Click the picker and choose a tier.
  • Picking Custom before the first drag opens a guide at the right edge; drag a native handle to record a width.
  • Dragging any native handle switches to Custom; the plugin steps aside while you drag.
  • Standard clears the width preference and returns to the app default.
  • Full collapses the left sidebar; the icon rail stays available.

How it works

  • Mounts the picker into the frame-wide shell.overlay slot; the plugin fiber owns the controller lifetime, so no listeners or timers outlive it.
  • The controller publishes an immutable snapshot (tier, menu, guide); the React picker renders it and dispatches actions, so the view can remount without rebuilding observers.
  • Locates the conversation body that declares --dsh-chat-content-width (prefers [data-conversation-content], skips the right sidebar's embedded conversation), then writes --dsh-chat-user-width on its parent.
  • Stores the configured target in the app preference; only the inline width is clamped to max(640px, column − 176px).
  • Watches the column with ResizeObserver so full follows sidebar, rightbar and window changes.
  • Drives panels through ctx.layout and registers copy through ctx.locale.

Compatibility

  • DSH Web 0.2.x with a web profile (shell.overlay slot and slots service).
  • Width axis checked against DSH 0.2.2-rc.3 in the live Web UI: 640px floor, 176px handle budget, --dsh-chat-* variables, data-width-handle, layout/locale services.
  • Narrow screens: the picker hides while the sidebar drawer (data-sidebar-drawer) is open and follows the on-screen keyboard.

Development

pnpm install
pnpm build        # src/ -> lib/ (host entry + loader-wrapped client bundle)
pnpm typecheck
pnpm test         # vitest: controller (jsdom) + picker component suites
pnpm verify:client

The sources live in src/ (src/index.ts is the no-op host entry, the feature lives in src/client/); lib/ is the built, published payload. The vitest suites import the sources directly: the controller runs under jsdom and the picker is rendered with Testing Library, so no live DSH instance is required. verify:client checks the built bundle contract. Development needs Node 22+ and pnpm.

Notes

  • Wider fixed tiers are clamped on narrow windows.
  • A custom width dragged on a narrow window is clamped by the app before it is recorded.

License

MIT — see LICENSE. Copyright (c) 2026 aaronlei.

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/aaronlei/dsh-width-tiers)
dsh-width-tiers — DSH Plugin