From aa82c4aed7d03e2af89314b58c6c95a021a5c84e Mon Sep 17 00:00:00 2001 From: HuanLinOTO Date: Thu, 1 Oct 2026 17:25:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(train):=20#697=20=E6=B5=8B=E8=AF=95=20harne?= =?UTF-8?q?ss=20=E9=80=82=E9=85=8D=20#776=20=E7=9A=84=20mounted=20?= =?UTF-8?q?=E8=A7=82=E6=B5=8B=E2=80=94=E2=80=94=E4=BC=9A=E8=AF=9D=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BB=8E=E6=9D=A5=E6=B2=92=E6=9C=89=20current=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=88AGENTS=20=C2=A73.4.9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/native-surface-cross-session.spec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/native-surface-cross-session.spec.ts b/tests/native-surface-cross-session.spec.ts index 94f7fb55..27a6af6e 100644 --- a/tests/native-surface-cross-session.spec.ts +++ b/tests/native-surface-cross-session.spec.ts @@ -28,12 +28,23 @@ describe('createNativeSurface cross-session opens', () => { openResource: vi.fn(), openResourceIn: vi.fn(), close: vi.fn(), + // #776: the mounted-seat observation (`ISidebarRight.mounted`) is the + // only sanctioned on-screen-session source (the session list has NO + // `current` field in any DSH release — AGENTS §3.4.9). + mounted: { + getSnapshot: () => list.current, + subscribe: (fn: () => void) => { + notify = fn + return () => { notify = undefined } + }, + }, } const ctx = { get: () => controller, sessions: { list: { - getSnapshot: () => ({ current: list.current }), + // No `current` field: the real SessionListState never had one. + getSnapshot: () => ({}), subscribe: (fn: () => void) => { notify = fn return () => { notify = undefined }