# dsh-avatar-top [English](README.md) | [中文](README.zh.md) Moves the left sidebar's account avatar (which is also the Settings launcher) out of the bottom strip, so the session list gains the space back. Placement, height and spacing are adjustable from a card on the **Plugins** page; **inline brand row** costs zero vertical space. > Tested against DeepSeek Harness `0.2.1-rc.2` (desktop, Windows). ## What it does DSH pins a footer at the bottom of the left sidebar: the account row (`头像 + 账号名`) sits next to `sidebar.footer.action`, where plugins such as `dsh-cost-meter` mount their own widgets. This plugin moves **only the account row**: - The footer becomes `display: contents`, so its two children join the sidebar's flex column; the account row is then reordered while `_footerActions` keeps its default order and stays pinned at the bottom. (Moving the whole footer would drag other plugins' widgets along — that was a real bug in 0.2.1.) - Four placements: **top**, **below the brand row**, **below New Session**, or **inline inside the brand row** (Windows desktop; `position: absolute` at the free right end, zero vertical cost). - Three heights: **full 44px**, **compact 32px**, **avatar only 28px** (hides the account name and shrinks the avatar to 20px). - Spacing 0–24px, and an on/off switch that restores the stock layout without uninstalling. - The desktop update pill (download progress / "ready") shares that flex row. While it is visible the **inline** placement temporarily returns to a normal 28px row under the brand row: an absolutely positioned row has no width to give the pill, so it would otherwise be drawn underneath the avatar. The avatar goes back to the corner as soon as the pill disappears. Changes apply immediately — the browser half subscribes to the settings document and rewrites the stylesheet. Settings persist in the profile's `cordis.patch.yml`. ## Settings | Setting | Values | Default | |---|---|---| | Enabled | on / off | on | | Position | top / below brand / below New Session / inline brand row | top | | Height | full 44 / compact 32 / avatar only 28 | full 44 | | Spacing below | 0–24 px | 4 | | Restore defaults | button | — | ## Install ```sh dsh plugin add dsh-avatar-top ``` Restart DSH once after installing (the client bundle and package metadata are read at host start). Then open **Plugins → dsh-avatar-top** to configure it. Git install works too, e.g. `dsh plugin add git+https://github.com//dsh-avatar-top`. Self-check: the plugin serves its current stylesheet at `/dsh-avatar-top.css` (public, read-only), so a wrong layout can be diagnosed without a session: ``` http://127.0.0.1:/dsh-avatar-top.css ``` ## How it works ### Injection channel The Host contributes one structured `style` row through `webserver/index-inject`: ```js ctx.on('webserver/index-inject', (table) => { table.push({ kind: 'style', text: cssFor(readOptions(config)) }) }) ``` Both shells render that row: | Shell | Where the page comes from | How the row arrives | |---|---|---| | Browser / `dsh web` | the SPA dist server answers the index over HTTP | `renderIndex()` renders the rows into the HTML | | Desktop app | Electron serves `dsh-web-frontend/dist/index.html` itself over its `dsh-app://` scheme | the Host's injection table is handed to the page over IPC after startup; the page-side interpreter appends `style` rows to `` | `ctx.webServer.tapIndex()` would only cover the HTTP shell; the desktop window never calls it. The desktop snapshot is taken at Host start, so the browser half also applies the stylesheet live (`