Vai al contenuto principale
L

dsh-ui-appearance

luosuqwq/dsh-ui-appearance

Wallpapers with pointer parallax, frosted-glass panels, composer and sidebar styling, and sidebar auto-hide for the DeepSeek Harness web UI. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installazione

dsh plugin --profile web add github:luosuqwq/dsh-ui-appearance

README

English | 简体中文

Glaze

Wallpaper, glass panels and chat-box styling for the DeepSeek Harness web UI.

The DSH web interface ships with one plain look. This bundle adds an "Appearance (外观)" page to Settings where you can put a wallpaper behind the app, make the conversation card, composer and settings panel translucent with a backdrop blur, tune the sidebar, and switch on a pointer-following parallax and an auto-hiding sidebar. It is a local UI bundle: the only server it talks to is your own DSH instance, serving your own images back to the browser.

dsh-ui-appearance

Showcase

Pointer parallax: the wallpaper drifts with the cursor

Pointer parallax. A real capture of the browser UI: the wallpaper layer drifts against the cursor; amplitude and easing are adjustable in Settings → Appearance.

Home with a wallpaper and glass panels

The whole shell. The wallpaper sits behind every panel; the conversation card, composer and sidebar stay legible on top of it.

Appearance settings

Settings → Appearance. Wallpaper source and the 壁纸文件夹 button (opens your folder instead of asking for a path, decoded names), transparency / blur / mask / parallax sliders, and sidebar opacity plus auto-hide.

Composer close-up

Composer. The frosted backing is tuned separately from the wallpaper, so the input text stays readable over a busy image.

Sidebar close-up

Sidebar. The wallpaper shows through at the chosen opacity; auto-hide is a single switch.

Sidebar auto-hide: it slides in when the cursor reaches the left edge and retracts when it leaves

Auto-hide. A real capture of the browser UI: once the cursor comes within 20 px of the left edge the sidebar slides back in over 220 ms, and it retracts along the same curve when the cursor leaves, without reflowing the conversation column.

The conversation area over a wallpaper

Conversation area. Messages, tool cards and the composer sit on the frosted card while the wallpaper stays visible around and through it.

Why this plugin

Wallpaper and glass effects are easy to add and easy to make a long session stutter. This bundle keeps every effect out of the streaming hot path instead of re-rendering the shell on each token.

dsh-ui-appearancea naive wallpaper layer
Long sessionsdebounced full syncs, cheap light syncs, cached measurement, a tooltip observer that ignores its own mutationsre-layout on every streamed token
Sourcesa folder you pick, with decoded Chinese names; only images are servedpaste a path
Scopeconversation card, composer, settings panel and sidebar tuned separatelyone global opacity
PrivacyCSS only, served by your own DSH; no network, no CDNoften loads remote assets

Quick start / 快速开始

What it is (EN). A DeepSeek Harness Web bundle that changes how DSH looks: wallpaper layer, translucent glass panels, composer and sidebar styling, pointer parallax and an auto-hiding sidebar. Everything runs locally; custom wallpapers are read from a folder you choose and served back to your own browser.

这是什么(中文)。 一个改 DeepSeek Harness 外观的 Web 插件包:壁纸层、玻璃拟态面板、输入框与侧边栏样式、指针视差、自动隐藏侧边栏。全部在本地运行,自定义壁纸来自你指定的文件夹,只在你自己的浏览器里显示。

Install (EN).

  1. Add the bundle to a DSH profile — Desktop: Settings → Plugins; CLI:
    dsh plugin --profile <profile> add @luosuqwq/dsh-ui-appearance
    

or from source:

git clone https://github.com/LuosuQWQ/dsh-ui-appearance.git dsh plugin --profile add link:/dsh-ui-appearance

2. Restart DSH. Open **Settings → Appearance (外观)**.
3. Pick a wallpaper folder with the **壁纸文件夹** button, or keep the bundled defaults. Everything applies live.

**安装(中文)。**
1. 加进一个 DSH profile——桌面版:**设置 → 插件**;命令行:
```sh
dsh plugin --profile <profile> add @luosuqwq/dsh-ui-appearance
# or from source:
git clone https://github.com/LuosuQWQ/dsh-ui-appearance.git
dsh plugin --profile <profile> add link:<本地绝对路径>/dsh-ui-appearance
  1. 重启 DSH,打开 设置 → 外观。
  2. 用 壁纸文件夹 按钮选目录,或直接使用自带默认壁纸;改动即时生效。

After installing, tell the owner: restart DSH, then open Settings → Appearance (外观). There is no other setup; the two default wallpapers are already bundled.

For agents. See AGENTS.md for config keys, defaults and constraints.

Features

  • Wallpaper layer behind the whole app: cover / contain / tile / stretch / auto sizing, opacity, blur and a color wash on top.
  • Pointer parallax: the wallpaper drifts with the cursor; amplitude and easing are adjustable.
  • Glass conversation area: background color, opacity, backdrop-blur strength, and a max width for the conversation column.
  • Glass composer and settings panel, each with its own color, opacity and blur; the composer also has border style and corner radius.
  • Sidebar controls: translucent fill plus optional auto-hide, where the bar slides off the left edge and comes back when the pointer reaches it.
  • Consistent cards elsewhere: the same card can be applied to the Plugins and Scheduled-tasks pages, and the right-hand document preview panel reuses the conversation glass.

Requirements

  • DeepSeek Harness 0.2.x (developed against 0.2.2-rc.5), running the web UI — the desktop app and dsh web share the same interface.
  • No extra npm packages and no external service.
  • A wallpaper: two defaults (花与大肥鱼 version1 / version2) ship with the plugin, and a fresh install starts on version2. Drop your own JPEG/PNG/WebP/GIF (12 MB or less each) into the wallpaper folder to add more.

Install

This directory is a DSH bundle with two halves: lib/host/index.js (the module named by the composition row) and lib/client/index.js, exposed to the web UI through exports["./client"] and dsh.client.platform: "web".

Install it from the checkout with the plugin manager:

plugin_manager: { action: "install_bundle", target: "<path-to-checkout>" }

Or add it to a profile by hand — in the profile's package.json:

{
  "dependencies": {
    "dsh-ui-appearance": "link:<path-to-checkout>"
  },
  "dsh": {
    "profile": {
      "bundles": ["dsh-ui-appearance"]
    }
  }
}

then run pnpm install in the profile directory.

Restart DSH after installing, then reload the page: both halves are composed when the DSH process starts, so a browser refresh alone does not pick up a fresh install. Use a hard reload (Ctrl+F5) if the browser still has an older client bundle cached. Removing the bundle is plugin_manager: { action: "remove_bundle", target: "dsh-ui-appearance" }, plus dropping the row from the profile.

Configuration

All options live on the Appearance page (Settings → 外观). Changes are applied immediately and stored twice: in the browser under localStorage["dsh-ui-appearance:settings"], and on the host at config.json:

~/.dsh/plugins/dsh-ui-appearance/config.json

Missing fields fall back to the defaults below, and the host clamps every numeric value into its allowed range when it saves.

FieldTypeDefaultMeaning
bgImagestringbundled version2Selected wallpaper as a URL (/bg/<file>); empty means no wallpaper
bgSizecover / contain / tile / stretch / autocoverHow the image fills the window
bgOpacitynumber 0–11Wallpaper opacity
bgBlurpx 0–600Blur applied to the wallpaper
bgMaskcolor#f8f7f7Wash color drawn above the wallpaper
bgMaskOpacitynumber 0–10Wash strength
parallaxEnabledbooleantrueMake the wallpaper follow the pointer
parallaxAmplitudepx 0–5012Maximum travel in each direction
parallaxEasingease-out / ease-in / ease-in-outease-outTransition easing of the parallax
sidebarOpacitynumber 0–10.4Opacity of the sidebar fill
sidebarAutoHidebooleanfalseSlide the sidebar off the left edge
prewarmFirstSlidebooleantrueRasterize the hidden sidebar in the background so the first reveal does not stutter
FieldTypeDefaultMeaning
conversationEnabledbooleantrueDraw the glass conversation card
conversationColorcolor#ffffffCard background color
conversationOpacitynumber 0–10.2Card opacity
conversationBlurpx 0–602Backdrop-blur strength
conversationWidthpx 420–1200870Maximum width of the conversation column
pageCardbooleantrueSame card on the Plugins and Scheduled-tasks pages (requires conversationEnabled)
previewPopupSharedbooleantrueUse the conversation glass for the right-hand document preview
previewPopupInsetpx 0–488Outer margin of the preview panel (top, right and bottom)
chatBoxColorcolor#ffffffComposer background color
chatBoxOpacitynumber 0–10.59Composer opacity
chatBoxBlurpx 0–600Composer backdrop-blur strength
chatBoxBordernone / thin / thicknoneComposer border style
chatBoxRadiuspx 0–6024Composer corner radius
settingsColorcolor#ffffffSettings panel background color
settingsOpacitynumber 0–10.4Settings panel opacity
settingsBlurpx 0–6016Settings panel backdrop-blur strength

The page labels are Chinese-only; the field names above are the keys stored in config.json.

A hand-written config.json only needs the values you want to change:

{
  "bgImage": "/bg/my-wallpaper.jpg",
  "bgSize": "cover",
  "bgOpacity": 0.9,
  "parallaxEnabled": true,
  "sidebarAutoHide": true,
  "conversationOpacity": 0.7,
  "conversationBlur": 14
}

Where wallpapers come from

The picker lists image files from up to three directories:

  1. DSH_APPEARANCE_ASSETS — an optional extra folder you point at. Images there are served read-only. The variable is read when the plugin loads, so restart DSH after changing it.
  2. <workspace>/plugins/dsh-ui-appearance/assets/backgrounds/ — the writable folder. The 壁纸文件夹 button in Settings → Appearance opens it in your file manager; anything dropped in appears in the wallpaper dropdown.
  3. assets/backgrounds/ inside the installed package — the bundled defaults. Read-only, and it is what makes the two shipped wallpapers available after an npm install that has no checkout.

<workspace> is DSH_WORKSPACE when set, otherwise the first workspace registered in DSH, otherwise the process working directory.

The repository ships exactly two wallpapers — 花与大肥鱼 version1.png and version2.png, both 2560×1440 PNG — and .gitignore keeps every other image in that folder out of git. Add your own files there too: a user file of the same name wins over the bundled default. When this checkout is linked into a workspace as plugins/dsh-ui-appearance (the usual development setup), the checkout folder is directory 2 above. Copy files in, press 壁纸文件夹 in Settings → Appearance to open the folder, then reopen the Appearance page to pick one. All directories are listed and searched when an image is requested; the first match wins. The host keeps its /bg/upload route for API callers — it writes under a random file name — but the settings page no longer uses it.

Usage

Open Settings (the gear icon) and pick 外观. The page is organised as 壁纸背景, 视差动效, 侧边栏, 会话对话区, 聊天框 and 设置面板.

  • Wallpaper: the dropdown lists the bundled defaults plus everything in the wallpaper folder plus 不使用壁纸 (no wallpaper), and the 壁纸文件夹 button opens that folder in the system file manager. A fresh install selects version2; picking 不使用壁纸 stores an empty choice, so it stays off. The list refreshes after the button is used, and a selected image that no longer exists still appears, marked as no longer in the folder.
  • Auto-hide: with 自动隐藏到左侧 enabled, the sidebar slides out of the window and reappears when the pointer comes within 20 px of the left edge; it hides again once the pointer leaves. The sidebar's own collapse button toggles this mode on and off.
  • Warm-up: 首次滑入前预热 draws the hidden sidebar once in the background so the first reveal does not pay the rasterization cost. Turn it off to skip that work; the first reveal may then drop a few frames.
  • Conversation: 启用区分 must stay on for the conversation card, the composer glass and the page cards. 插件/任务页也用会话卡片 extends the same card to the Plugins and Scheduled-tasks pages; turning either option off returns those pages to the stock layout.
  • Document preview: 应用到文档预览弹窗 lets the right-hand preview panel share the conversation glass; 弹窗外边距 sets its top, right and bottom margin. The left edge stays flush on purpose, so dragging the divider does not force the panel contents to reflow on every pointer move.
  • Latest message: when you scroll away from the newest message in a long conversation, a "↓" button appears at the bottom right and jumps back to the end. The stock scroll-to-bottom control is hidden while the bundle is active.
  • Turning it off: disable the bundle row on the Plugins page or remove it from the profile; the plugin puts back the inline styles it changed. To reset the look completely, delete config.json and the dsh-ui-appearance:settings localStorage key.

How it works

  • The host half serves /bg/*: it lists the wallpaper folders with decoded names, reads and writes config.json, opens the wallpaper folder via /bg/reveal, accepts uploads and returns image bytes. It also injects a small <style> element into the <head> of every page the DSH web server serves, so a configured wallpaper paints before any client script runs.
  • The client half is a web client module. It appends its own <style> elements, builds a fixed wallpaper layer plus a mask layer, publishes the settings as CSS custom properties on <html>, and keeps the app frame's grid columns in sync with the sidebar and the right-hand preview panel.
  • Settings are applied from localStorage immediately and mirrored to config.json by the host, which validates every numeric value on save.
  • The bundle only adds CSS and marks the official containers it needs; disabling it removes those marks and styles again.

Limitations

  • Web UI only: it styles the DSH browser interface, and CLI sessions are unaffected.
  • The Appearance page is hard-coded in Chinese, so its labels do not follow the UI language.
  • Styling depends on the official DOM (frame, sidebarCol, centerCol, data-slot anchors, data-sidebar-right-panel). A DSH release that renames those can disable part of the styling until the plugin is updated.
  • Auto-hide assumes the sidebar is on the left.
  • Backdrop blur is GPU work; several large glass surfaces on a weak GPU can cost frames. Lower the blur values if scrolling feels heavy.
  • Wallpapers are limited to 12 MB each and to JPEG/PNG/WebP/GIF.
  • Opening the wallpaper folder needs the host half to run the current code: after upgrading this plugin, restart DSH (client code hot-reloads, host routes do not).
  • Two wallpapers are bundled (about 9 MB of the repository); everything else you add lives in your workspace and is not committed.

Development

Static regression checks (no third-party dependencies; asserts the streaming hot path has no per-frame whole-document scans or forced layouts):

node test/appearance-motion.cjs

Manual checks:

  1. Enable the bundle in a profile and start DSH.
  2. Reload the web UI, with a hard reload (Ctrl+F5) if the client bundle was rebuilt.
  3. Settings → 外观 should render. The host routes can also be queried directly:
curl -s http://127.0.0.1:<port>/bg/list
curl -s http://127.0.0.1:<port>/bg/path
curl -s http://127.0.0.1:<port>/bg/config

Every /bg/* route runs the Host admission check (ctx.connection.requestRejection) before it touches the disk: a request has to come from an admitted DSH client, so a plain curl without the browser's dsh-auth-* cookie gets 401. Add -H 'cookie: dsh-auth-...=<value>' copied from devtools when you want to poke at the routes by hand.

/bg/list returns [{ url, name }] with the name decoded, /bg/path the writable folder, POST /bg/reveal opens it in the OS file manager, and /bg/config the stored settings — the last one answers 404 until the page has saved at least once.

PathRole
lib/host/index.jsHost half: /bg/* routes, config file, early wallpaper injection
lib/client/index.jsClient half: styles, wallpaper layer, settings page
assets/backgrounds/Put your own wallpapers here
test/appearance-motion.cjsStatic checks for structure and the hot path
cordis.patch.ymlThe bundle's composition row

License

MIT. See LICENSE.

Plugin correlati