Skip to content

fix(dsh): restore observation sidebar auto-open on DSH 0.2.0+ - #485

Merged
iuyo5678 merged 1 commit into
Tencent:mainfrom
wcy12378:fix/484-sidebar-auto-open-dsh-0.2
Oct 25, 2026
Merged

iuyo5678 merged 1 commit into
Tencent:mainfrom
wcy12378:fix/484-sidebar-auto-open-dsh-0.2

Conversation

@wcy12378

Copy link
Copy Markdown
Contributor

Problem

On DSH 0.2.0-rc.2 and later the observation tab no longer auto-opens in the native right sidebar; it only opens manually (#484). Upstream removed current from the sessions.list snapshot (view selection moved out of the session controller), so every auto-open read in registerObservationSidebar saw undefined and silently cancelled.

Verified against the published packages:

  • @deepseek-ai/dsh-api-session-controller 0.1.5-rc.3 seeds list with current; 0.2.0-rc.2/0.2.1-rc.2 seed { ids, byId, phase, projectionsBySession } with no current anywhere.
  • The current main session is now exposed by the uiSession service: adapter.current on both 0.1.5 and 0.2.x (and a top-level current on 0.2.x), a binding source whose snapshot's key is the session id (undefined when absent).

Change

  • SessionListSource.current is now optional to describe both host generations.
  • A currentSession() resolver prefers the legacy list current (0.1.5) and falls back to the uiSession main binding (0.2.x); attempt(), reveal() and evaluate() all read through it.
  • The resolver's binding is also subscribed (when available) so conversation switches on 0.2.x hosts — which no longer touch sessions.list — re-trigger the auto-open evaluation.
  • Registration still requires only the existing services; uiSession stays optional, so hosts without either source of "current" degrade to today's behavior (register, no auto-open) instead of losing the tab.
  • New tests cover: auto-open via the main binding with a current-less list, waiting for a selected conversation before opening, and graceful no-auto-open when no source exists. CHANGELOG entry added under Unreleased/Fixed.

Validation

Environment: Windows 11 x64, Node.js 24, pnpm 10.17.0.

  • pnpm install --frozen-lockfile — clean.
  • pnpm --filter @wxg-prc-cpg/browser-skill-dsh-plugin typecheck (tsc --noEmit) — passes.
  • vitest run tests/client/observation-sidebar.test.tsx — 21/21 pass (18 existing + 3 new).
  • Full plugin suite pnpm --filter @wxg-prc-cpg/browser-skill-dsh-plugin test — 561/563; the 2 failures are in tests/runner.test.ts (killAll/killFor child settle semantics) and reproduce identically on unmodified main (git stash + rerun), so they are pre-existing on this Windows machine and unrelated to this change.
  • biome check — clean on both changed source files (local checkout-wide CRLF noise comes from autocrlf, committed bytes are LF).

Fixes #484

DSH 0.2.0 removed `current` from the `sessions.list` snapshot (view
selection moved to the uiSession service), so the sidebar auto-open path
always saw undefined and silently cancelled; the tab only opened manually.

Resolve the auto-open target through a currentSession() helper that
prefers the legacy list `current` and falls back to the uiSession main
binding (`adapter.current` on both 0.1.5 and 0.2.x, top-level `current`
on 0.2.x), and subscribe to that binding so conversation switches on
0.2.x hosts re-trigger evaluation.

Fixes Tencent#484
@iuyo5678

Copy link
Copy Markdown
Collaborator

LGTM

@iuyo5678
iuyo5678 merged commit 3e0356b into Tencent:main Oct 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

# Right-sidebar observation tab stops auto-opening on DSH 0.2.0+ (auto-open reads sessions.list.current, removed upstream)

2 participants