From 99805b63409d1d8d6e08e07c817bdaac5441c657 Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Sun, 26 Jul 2026 04:30:58 +0800 Subject: [PATCH] fix(gui): merge adaptations to master's apiproxy defaults and deleted test hook The origin/master merge introduced a required workspaceRoot on ApiProxyDefaults and deleted the ui-conversation test hook.ts helper. Add workspaceRoot to the new todo-projection api-proxy test and bind the todo-panel spec's selector hook via bindSnapshotSelector directly, matching the sibling specs. --- packages/client/ui-conversation/tests/todo-panel.spec.tsx | 4 ++-- packages/host/apiproxy/tests/api-proxy-view.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/ui-conversation/tests/todo-panel.spec.tsx b/packages/client/ui-conversation/tests/todo-panel.spec.tsx index 8971bba2cd..5261e1d9e4 100644 --- a/packages/client/ui-conversation/tests/todo-panel.spec.tsx +++ b/packages/client/ui-conversation/tests/todo-panel.spec.tsx @@ -6,7 +6,7 @@ */ import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' -import { hookOf } from './hook.ts' +import { bindSnapshotSelector } from '@deepseek-ai/dsh-client-web-react' import { createSnapshotStore } from '@deepseek-ai/dsh-client-runtime/client' import type { TodoItem, ToolResultNode } from '@deepseek-ai/dsh-client-runtime/client' import type { UseSession } from '@deepseek-ai/dsh-client-ui-slots' @@ -19,7 +19,7 @@ afterEach(cleanup) function sessionWith(todos: readonly TodoItem[]) { const store = createSnapshotStore<{ todos: readonly TodoItem[] }>({ todos }) - return { store, useSession: hookOf(store) as unknown as UseSession } + return { store, useSession: bindSnapshotSelector(store) as unknown as UseSession } } const LIST: TodoItem[] = [ diff --git a/packages/host/apiproxy/tests/api-proxy-view.spec.ts b/packages/host/apiproxy/tests/api-proxy-view.spec.ts index f30babc296..4263c53cea 100644 --- a/packages/host/apiproxy/tests/api-proxy-view.spec.ts +++ b/packages/host/apiproxy/tests/api-proxy-view.spec.ts @@ -156,7 +156,7 @@ describe('mux live view computation', () => { it('tail page carries the full-log todo projection; older pages and todo-less sessions omit it', async () => { const { ctx } = await harness() - const api = createApiProxy(ctx, { provider: 'p', model: 'm', cwd: '/tmp' }) + const api = createApiProxy(ctx, { provider: 'p', model: 'm', cwd: '/tmp', workspaceRoot: '/tmp' }) const session = ctx.sessions.create() ctx.agents.register({ id: session.id, session, status: 'idle', ctx } as Agent) // Superseded write early in the log, latest write later; enough messages to page.