Reset per-gesture travel before node guards so a preceding background pan cannot suppress the next card click. Index and iteratively lay out graph topology, memoize agent card contents, and project complete settled branches under independent existing-settings preferences.
Keep unknown real workflow catalogs and explicitly opened descendant paths visible. Add regression coverage and real rc.1 browser/baseline validation evidence.
Replace the 460px viewport cap with flex allocation. Bound the graph section minimum so long history scrolls internally instead of stretching the outer list. Verify tall and narrow panes, preview selection, folding and long Changes lists in the mounted host.
Use an activation-scoped Cordis controller for session, agent, and job-owner entries. Reuse native Context tabs, cancel stale navigation, and close source overlays without canceling pending requests.
Verify optional capability lifecycle, truthful job ownership, three real dsh-context configurations, and the existing mount regression suite.
Restore selection declarations removed with logRow during graph integration. Dangling selectors had inherited absolute positioning and borders from indent guides. Add parsed CSS and mounted browser regression coverage for staged, unstaged and conflict rows.
The lane's `onScreenSession` walked every `[data-sidebar-right-session]` element
and took the first without a `hidden` attribute. On 0.2.x the host marks BOTH
each RETAINED seat (one per Conversation stays in the DOM) AND each seat's panel
with that attribute, so the walk could name a background Conversation and the
A → B → A round trip failed on `selectConversation` (real mount lane: expected
`session-eeb1…`, read `session-b8e4…`, 60s timeout).
Read the panel that is actually laid out (`[data-sidebar-right-panel]:visible`) —
the same `:visible` convention the rest of this lane already uses — and keep a
visible-seat fallback. Mount lane: 10/10 (was 9/10).
Two conflicts, both in the native tab adapter's per-session work — main's
`5c95002` moved the expansion set into the plugin store's session state while
this branch moved the RECORD identity to `sessionId::tabId`:
- `src/client/native/tab-adapter.tsx`: keep main's store-backed expansion as
the authority (`attachStore` / `syncExpanded` / `getSessionStates().expanded`)
and this branch's seat-scoped identity (`views` keyed `sessionId::tabId`,
`get/has/update/drop/versionOf/retain` take the seat session). `toggleExpanded`
keeps main's active-`reduce` / background-`reduceFor` split, but locates the
record by its seat and writes the SCOPE session's set — the set every view of
that session mirrors.
- `tests/native-surface.spec.ts`: main's five expansion cases adapted to the
session-scoped API (seat session on `ensure`, two-arg `get`/`drop`, seat on
`toggleExpanded`); the branch's cases now bind a store before toggling, since
expansion no longer lives in the record itself.
The `files` takeover guard and its registration invariants come from
main; this merge drops the branch's duplicate.
The comparison with PR #712 left three of its cases uncovered here: #712
parked an unsaved editor draft, an unsaved commit message and the chosen
worktree in module-level memory and tested each by unmounting. This branch
claims the host's `keepMounted` makes that memory unnecessary, but the claim
was only ever exercised for tree expansion and scroll — the draft was
explicitly recorded as unverified, and it is the one loss a reader cannot
re-derive by looking again.
All three are now measured on a real host, in the retention lane's A -> B -> A
round trip:
- an unsaved EDIT typed into the file's editor must still be in the document;
- an unsaved COMMIT MESSAGE must still be in the changes tab's box;
- the CHOSEN WORKTREE must still be selected, rather than re-derived from the
inventory.
The lane's workspace becomes a real git repo (idempotently: it persists across
local runs) with one staged change — that is what renders a usable commit box —
plus a linked checkout for the worktree choice. Two host details the lane has
to respect, both recorded in comments: the worktree selector only renders when
the inventory holds more than one entry, and paths are compared through
`realpathSync` because macOS /var is a symlink to /private/var while git
reports the resolved form.
Measured: 8/8 on 0.1.7-rc.1 + headless Chromium, and the full unit suite
(113 files / 1141 tests) stays green.
"State survived" is not the same claim as "nothing was silently reloaded":
the retention lane asserted the visible vector (expansion, scroll, chip) but
never looked at the network, so a body that remounted and refetched
everything would have passed it.
The lane now counts the plugin's own reads. These routes are POSTs, so the
path being listed or read travels in the BODY — the counter parses it, which
is what lets one level or file be told apart from a fresh read. It then opens
a real file in conversation A and requires, on return:
- the file is still open as a tab, and selecting it shows the editor without
a second `fs.read` of its bytes;
- no `fs.read` of that file happened anywhere in the round trip.
Measured against the real host (0.1.7-rc.1, headless Chromium): zero plugin
reads on returning to A — the seat lands on its previous tab and shows the
content it already holds.
One ordering fact this lane had to be taught: opening a file in merged mode
swaps THAT tab's content to the editor, so the tree component unmounts and
its scroll starts over by design (attributed with a probe: hide/show keeps
320, opening a file drops it to 0). The lane therefore re-builds the scroll
offset after the file step before measuring the conversation round trip,
which is the claim the offset is actually evidence for.
DSH 0.1.7 gives a tab TYPE the `keepMounted` switch: a marked body stays
mounted through hiding, tab selection and Session switches. That is exactly
what the plugin tried to fake with module-level memory, so declare it on
every plugin type (the descriptor types and the `files` takeover) and let
the host hold the component state — tree scroll, unsaved drafts, chip
renames — with no plugin-side memory at all.
With the bodies staying up, the per-session record registry from the
previous commit is what keeps co-resident sessions apart; both halves are
required, because a body may still be remounted by the host (type disposal,
session teardown) and the records must outlive that.
Verification on a real host (`scripts/e2e-mount.sh`: npm pack -> fresh
scratch profile -> real `dsh web` pinned to 0.1.7-rc.1 -> headless Chromium),
new lane `tests/e2e/tree-scroll.e2e.ts`: build state in conversation A,
switch to B, come back, and compare the whole observable vector (tree
expansion, scroll offset, chip title) — plus the negative half, that B does
not inherit A's state.
That lane also exposed a defect in the old one: it picked its "second
conversation" by row index, but the session tree's first row is a WORKSPACE
row and a seeded session with no messages takes no row at all, so the
"A -> B -> A" round trip was re-selecting the same session and every
assertion held vacuously. It now identifies sessions by
`data-row-key="session:<id>"` and creates a real second session through the
rail.
`tests/e2e/mount.e2e.ts` reaches the side-chat tab through its guide entry
now: with the record retained, the chip shows the thread's own title, so
the old `/Side Chat/` chip match no longer names it.
Docs: AGENTS.md records the two facts that must hold together, and
docs/plans/2026-09-25-native-tab-state-retention-keepmounted.md replaces the
park/archive design (PR #712) with this one.
Two raw-HTML preview defects (client rendering only, no DSH source touched):
- A stray `</a>` from an author's `<a id="x"></a>` was printed as literal text.
The host renderer emits one text node per raw-HTML token, so the open tag and
its close tag arrive as siblings; DOMPurify drops a lone close tag (no element
children), which fell into the inline pass's "no elements means prose, keep
the text" branch. The pass now deletes a node that is nothing but a close tag,
keeping the anchor id and leaving comparison prose (`a < b`, `x </ y`) intact.
- A `<details>` fold showed the UA's own "Details" label while the authored
summary text dropped into the body: `<summary>…</summary>` is a balanced span,
so analyzeHtmlSegment reduced it to an `html` leaf wrapped in a block div,
which is not a direct child of `<details>` and therefore not honored as the
disclosure widget. The renderer now hoists a leaf-leading summary into a real
`<summary>` element inside its details frame (attributes via the shared props
extraction, media/anchors still hardened), with no hardcoded label.
Also scope `.editorMd details > summary { cursor: pointer }` so a hoisted
summary keeps its pointer cursor (the old `.editorHtmlBlock summary` rule no
longer matches once it leaves the leaf wrapper).
Tests: 8 new/tightened cases in tests/markdown-html-render.spec.tsx (13 -> 21),
plus a seeded anchor and direct-child summary assertions in the real mount
smoke (tests/e2e/mount.e2e.ts). Verified pnpm test (113 files / 1140 passed),
typecheck, lint, and pnpm test:mount (7/7).
Fixes#778
The shell's base stylesheet makes every direct body child no-drag
(`html[data-platform=darwin] body > :not(#root)`). The viewport-sized
`[data-dsh-panel-host]` layer inherited it, and since app-region ignores
pointer-events it cancelled every window-drag strip beneath it once the
shell recomputed regions.
Take the host and layer out of the app-region computation (`!important`,
the shell selector carries an id's specificity) and keep the panels
themselves no-drag so their controls still receive clicks.
Fixes#772
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DSH 0.1.7-alpha.1 is 1299 commits past 0.1.6-alpha.2 and rewrites four
contracts this plugin was built on. The peer floor moves to
^0.1.7-alpha.1 (semver's prerelease rule means ^0.1.6-alpha.2 can never
match a 0.1.7 prerelease); 0.1.6-alpha.2 and earlier stay on v0.19.1.
Released as 0.21.0-alpha.1 (dist-tag alpha).
Hard breaks:
- dsh-settings was rewritten: register(ns, schema) is gone, a form is
addressed by the plugin row's Loader entry id and read from the
module's exported Config. The preferences are merged into Config and
marked volatile — which requires DSH's own schemastery, because only
that build wraps a volatile field in the cosmokit reference the
loader's volatile commit walks. With the public package a settings
write reports success and revision 1 while the effective value never
changes.
- ui-primitives renamed its whole icon family (IconXxx14/16 ->
IconXxxRegular/Medium): 26 imported symbols, 17 files. The failing
mode is render-time, not load-time. Five call sites that relied on the
old 14px default now pass size={14} explicitly.
- Session format v4 rejects source.kind === 'plugin'; the side-chat
boundary injection now writes plugin:dsh-better-sidebar, the same kind
DSH's own v3->v4 migration produces, so historical threads survive.
Tool results moved to role 'tool' with top-level content/isError; all
four parsers accept both shapes.
- The client session snapshot dropped subagentsByParent/jobsBySession
and the on-demand subagent-catalog observation API. The Tasks page
reads projectionsBySession and a new jobs.list route.
Yields and convergence:
- The read-only previews go to DSH's documentpreview (Office->PDF, a
spreadsheet worker, zoom, per-directory refresh); editor.canOpen
refuses those 26 extensions. Markdown, HTML (with its sandbox
switches) and the editable code buffer stay.
- The host browser kind is desktop-profile-only now, so the web e2e
lanes expect no browser entry and assert its absence.
- Link takeover claims only urlTarget links and passes the rest to the
host, fixing a regression from the 0.1.6 round: the fallback pointed
at a 'browser' type the plugin no longer registers, so http links in
its own markdown did nothing.
Also fixed, found along the way:
- The file tree refreshes live (new directory watch over the plugin's
own socket), since the plugin owns the `files` kind.
- ctx.sessions.list has no `current` field at either tag; the three
readers were dead. They now use ctx.sidebarRight.mounted.
- package.json.files was missing lib/client-locale.js.
- Two genuinely dead call sites: sessions.openSubagent/open/
refreshSubagents do not exist on the current baseline, so the
topology click, the jump-back and the retry were all no-ops.
- The test harness window shim lacked addEventListener, which the 0.1.7
primitives call at module-evaluation time; and the e2e token exchange
needs Playwright's request stack, not Node's fetch.
DSH 0.1.6-alpha.2 ships a right-Sidebar terminal and a right-Sidebar browser
of its own. Both were things this plugin had built from scratch, so keeping
them meant two implementations of one surface plus a plugin that shadows a
host type the product is actively developing.
Terminal: the plugin's whole PTY stack goes — the UI-tab manager, the
agent-owned registry, the lazy node-pty loader, the eight model-facing
terminal_* tools, the xterm view and its font/link/scrollback helpers, and
the cross-session 'pinned terminal' rail that existed only to keep a terminal
alive across a session switch. The host's terminal kind becomes the only
provider, which also retires the node-pty dependency, its pnpm allowBuilds
entry, and the installer's -Repair mode (issue #140's whole class of
'node-pty failed to load' support).
Model-facing capability note: the plugin used to inject terminal_* tools
(off by default). Those are the model's only cross-call persistent terminal,
and DSH's own equivalent (@deepseek-ai/dsh-tool-terminal) is not mounted by
any shipped bundle, so removing them leaves the model with the one-shot
bash/pwsh tools only. That is the accepted cost of not maintaining a second
PTY surface; the README documents how to enable the upstream toolset.
Browser: the plugin's browser tab type is dropped, so the host's own browser
kind owns embedded pages. The DOM-level link takeover STAYS (it is the only
thing that can route an https link to the system browser by protocol, which
the host does not do) but now delegates to the host's browser tab via
ctx.sidebarRight.openTab('browser', …) with a window.open fallback, and the
two settings that only ever configured the plugin's own iframe (sandbox
escape hatch, loopback allowlist) go with it — along with the host-side
browser.probe route they fed.
Cards: the empty-pane welcome cards adopt the host's guide-capsule recipe
(0.5px l4 hairline, 24px radius, layer-1 fill, 56px floor, 14px/20px padding)
so the plugin's 'pick what opens here' surface reads as the same design as
DSH's own. A theme.spec guard pins the geometry and the token-only paint —
including that the upstream-only --dsw-alias-bg-l1/-l2 spellings (defined
nowhere, so their declarations are silently dropped upstream) never appear
here.
Also drops the dead state the removed features left behind (SidebarTab.pin,
nextTerminal, agentWaits, bottomOpenedOnce, the agent-tab helpers, the
pinned-tab memo key), re-points every test fixture that used them at
surviving equivalents, and prunes the specs of the deleted features.