Skip to content

Commit 4ca23ec

Browse files
committed
test(app-shell): the Home bell test's AI-surface mock answers the nav gate's question too
Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85 Co-authored-by: Claude <noreply@anthropic.com>
1 parent ce38534 commit 4ca23ec

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎ui/packages/app-shell/src/console/home/__tests__/HomePage.openMarksRead.test.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ vi.mock('../../../context/NavigationContext', () => ({
8282

8383
vi.mock('../../../hooks/useRecentItems', () => ({ useRecentItems: () => ({ recentItems: [] }) }));
8484
vi.mock('../../../hooks/useFavorites', () => ({ useFavorites: () => ({ favorites: [] }) }));
85-
vi.mock('../../../hooks/useAiSurface', () => ({ resolveAiApiBase: () => '' }));
85+
// The bell's roster gates navigation through `useNavMemberGates`, which asks
86+
// the AI surface whether to draw an app's `ai:chat` entry (objectstack#37833).
87+
vi.mock('../../../hooks/useAiSurface', () => ({
88+
resolveAiApiBase: () => '',
89+
useAiSurfaceEnabled: () => ({ enabled: false, isLoading: false, buildServed: false, focusServed: false }),
90+
}));
8691
vi.mock('../../../views/metadata-admin/useMetadata', () => ({
8792
useMetadataClient: () => ({ listDrafts: async () => [] }),
8893
}));

0 commit comments

Comments
 (0)