MCPcopy Index your code
hub / github.com/coder/coder / readTitle

Function readTitle

site/src/api/queries/chats.test.ts:1677–1683  ·  view source on GitHub ↗
(
		queryClient: QueryClient,
		chatId: string,
	)

Source from the content-addressed store, hash-verified

1675
1676describe("sidebar title race condition", () => {
1677 const readTitle = (
1678 queryClient: QueryClient,
1679 chatId: string,
1680 ): string | undefined => {
1681 const data = queryClient.getQueryData<InfiniteData>(infiniteChatsTestKey);
1682 return data?.pages.flat().find((c) => c.id === chatId)?.title;
1683 };
1684
1685 it("in-flight refetch overwrites a WebSocket title update (the bug)", async () => {
1686 const queryClient = createTestQueryClient();

Callers 1

chats.test.tsFile · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected