From 5c7c5184cf4c61e27dd27fe57adc8000bbfcb18c Mon Sep 17 00:00:00 2001 From: cliffhall Date: Thu, 27 Aug 2026 20:35:33 -0400 Subject: [PATCH] chore(web): address Copilot review on #2155 Give the test's paginated-list fixture a precise return type instead of an unjustified double cast. The cast was hiding that the fixture omitted `error`, so an interface change would not have been type-checked there. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_013hzwzS8UvBsr4yZm7o7sev Signed-off-by: cliffhall --- clients/web/src/hooks/useServerCommands.test.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clients/web/src/hooks/useServerCommands.test.tsx b/clients/web/src/hooks/useServerCommands.test.tsx index 226c8a29..6bb5ad93 100644 --- a/clients/web/src/hooks/useServerCommands.test.tsx +++ b/clients/web/src/hooks/useServerCommands.test.tsx @@ -110,16 +110,19 @@ const authError = () => reason: "unauthorized", }); -function pagination(over: Partial> = {}) { +function pagination( + over: Partial> = {}, +): PaginatedListModel { return { - items: [] as T[], + items: [], paginated: false, canLoadMore: false, loadedPages: 1, + error: null, onRefresh: vi.fn().mockResolvedValue(undefined), onLoadMore: vi.fn().mockResolvedValue(undefined), ...over, - } as unknown as PaginatedListModel; + }; } interface HarnessProps {