Environment
dsh-genui 0.8.2, installed via dsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-genui.git
- DeepSeek Harness 0.1.0-rc.6, web profile, Windows
Problem
- Clicking the panel's close (✕) button reloads the entire page. The handler ends with
location.reload(), so the whole app reboots instead of the panel simply dismissing. Users perceive this as "the harness restarted when I clicked close".
- The ✕ button reuses the header toggle's CSS class, so it renders as a huge stretched area (full width + large padding) for a tiny glyph.
The shipped lib/client.js (dock component registered in conversation.input.dock) contains:
(0,g.jsx)(`button`,{type:`button`,className:C.panelToggle,title:`关闭面板`,"aria-label":`关闭面板`,onClick:()=>{try{let t=JSON.parse(localStorage.getItem(`dsh.genui.panel`)??`null`);if(t&&typeof t===`object`){delete t.sessions?.[e];t.order=Array.isArray(t.order)?t.order.filter(x=>x!==e):[];localStorage.setItem(`dsh.genui.panel`,JSON.stringify(t))}}catch{};location.reload()},children:`✕`})
Both className:C.panelToggle and the trailing location.reload() are the problems.
Proposed fix (verified locally)
The plugin already has the correct primitive: the /panel clear path calls un(sessionId, null), which updates the in-memory store, persists to localStorage, and notifies subscribers — the panel unmounts immediately with no navigation. Reuse it:
And give the ✕ its own compact class instead of panelToggle (add a panelClose entry to the CSS-module map, then this CSS):
.V1MMBW_panelClose{flex:0 0 auto;width:26px;height:26px;margin-right:8px;display:flex;align-items:center;justify-content:center;border:0;border-radius:6px;background:transparent;color:inherit;font-size:13px;line-height:1;cursor:pointer;padding:0;opacity:.65}
.V1MMBW_panelClose:hover{background:#ffffff14;opacity:1}
Test results (patch applied to the built bundle)
- Before: clicking ✕ → full page reload; ✕ hit area spans a large stretch of the header.
- After: clicking ✕ → panel disappears in place instantly; session, scroll position and app state all preserved; no reload.
- Closing persists: after a refresh the panel stays closed (same localStorage semantics as
/panel clear).
- Verified the served bundle no longer contains
location.reload.
Environment
dsh-genui0.8.2, installed viadsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-genui.gitProblem
location.reload(), so the whole app reboots instead of the panel simply dismissing. Users perceive this as "the harness restarted when I clicked close".The shipped
lib/client.js(dock component registered inconversation.input.dock) contains:Both
className:C.panelToggleand the trailinglocation.reload()are the problems.Proposed fix (verified locally)
The plugin already has the correct primitive: the
/panel clearpath callsun(sessionId, null), which updates the in-memory store, persists to localStorage, and notifies subscribers — the panel unmounts immediately with no navigation. Reuse it:And give the ✕ its own compact class instead of
panelToggle(add apanelCloseentry to the CSS-module map, then this CSS):Test results (patch applied to the built bundle)
/panel clear).location.reload.