Repository navigation
fix(dsh): restore observation sidebar auto-open on DSH 0.2.0+ - #485
Merged
iuyo5678 merged 1 commit intoOct 25, 2026
Merged
Conversation
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
Collaborator
|
LGTM |
iuyo5678
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 removedcurrentfrom thesessions.listsnapshot (view selection moved out of the session controller), so every auto-open read inregisterObservationSidebarsawundefinedand silently cancelled.Verified against the published packages:
@deepseek-ai/dsh-api-session-controller0.1.5-rc.3 seedslistwithcurrent; 0.2.0-rc.2/0.2.1-rc.2 seed{ ids, byId, phase, projectionsBySession }with nocurrentanywhere.uiSessionservice:adapter.currenton both 0.1.5 and 0.2.x (and a top-levelcurrenton 0.2.x), a binding source whose snapshot'skeyis the session id (undefinedwhen absent).Change
SessionListSource.currentis now optional to describe both host generations.currentSession()resolver prefers the legacy listcurrent(0.1.5) and falls back to the uiSession main binding (0.2.x);attempt(),reveal()andevaluate()all read through it.sessions.list— re-trigger the auto-open evaluation.uiSessionstays optional, so hosts without either source of "current" degrade to today's behavior (register, no auto-open) instead of losing the tab.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).pnpm --filter @wxg-prc-cpg/browser-skill-dsh-plugin test— 561/563; the 2 failures are intests/runner.test.ts(killAll/killFor child settle semantics) and reproduce identically on unmodifiedmain(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 fromautocrlf, committed bytes are LF).Fixes #484