From b55c042e59e214daaa72bf3439c4a7e7fc684e9b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 01:00:35 +0000 Subject: [PATCH 1/3] docs(skills): point the DataSource member count at data.ts instead of a number The data-integration guide said the published DataSource has 38 members. The declaration in packages/types/src/data.ts never bore that number out, and every member added or retired moves it further. Replace the count with a pointer to the declaration, in the shape the same section already uses for its optional members, so the sentence cannot drift. One line changed; the guide keeps its line count. Claude-Session: https://claude.ai/code/session_01JZnppgHRp4sREcouhkQYDB Co-authored-by: Claude --- skills/objectui/guides/data-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectui/guides/data-integration.md b/skills/objectui/guides/data-integration.md index 93909b9753..1e188521b8 100644 --- a/skills/objectui/guides/data-integration.md +++ b/skills/objectui/guides/data-integration.md @@ -31,7 +31,7 @@ methods from context for CRUD, and read the ambient scope through ## DataSource interface ⚠️ The fence below is a deliberately SIMPLIFIED teaching copy, kept rather than -replaced by an import: the published `DataSource` has **38** members and the +replaced by an import: `data.ts` lists every published `DataSource` member and the excerpt is what makes this section readable. The real one is `import type { DataSource } from '@object-ui/types';` (source: `packages/types/src/data.ts`) — read it before you rely on any member's exact From d6c74789acba697b441f0beea4403d2a60a017c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 01:24:15 +0000 Subject: [PATCH 2/3] docs(skills): point the AuthClient method count at types.ts instead of a number The testing guide's auth-provider example said AuthClient declares ~38 methods. The declaration in packages/auth/src/types.ts has 39 at the branch base, and every method added or retired moves the number again. Point at the declaration instead, keeping the comment's teaching claim that the provider reaches only one of those methods on this path. Same shape as the DataSource sentence in the data-integration guide. One line changed; the guide keeps its line count. Claude-Session: https://claude.ai/code/session_01JZnppgHRp4sREcouhkQYDB Co-authored-by: Claude --- skills/objectui/guides/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectui/guides/testing.md b/skills/objectui/guides/testing.md index 3e47f78f6c..693ed00b5a 100644 --- a/skills/objectui/guides/testing.md +++ b/skills/objectui/guides/testing.md @@ -190,7 +190,7 @@ function AuthConsumer() { describe('AuthProvider', () => { it('shows loading then authenticated state', async () => { - // `AuthClient` declares ~38 methods and the provider reaches ONE of them on + // Of every method `AuthClient` declares in `packages/auth/src/types.ts`, the provider reaches ONE on // this path. Type the literal `Partial` and the stubbed member // against `AuthClient['getSession']`: the key, the signature and the // resolved value are then all checked, and the widening happens ONCE, in a From 7b2bb22f71574c15a8afc54e76fe300cff6deb07 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 01:49:56 +0000 Subject: [PATCH 3/3] docs(skills): name the AuthClient members the auth example reaches, and stub both The auth-provider example in the testing guide said the provider reaches one AuthClient method on its path. It reaches two: getSession on mount, and listOrganizations once a user is set. On the old one-member stub the second call threw inside refreshOrganizations and was reported as a console.warn; the example passed with that warning, not because one member was enough. The comment now names both members, with no count, and the stub types listOrganizations against AuthClient['listOrganizations'] the way getSession already is, resolving to an empty list so the organization load ends there. The line saying the example has the shape of the auth package's own AuthProvider.test.tsx is dropped: that file's createMockClient stubs its members with untyped vi.fn(), so it does not check a resolved value the way this example does, and the file is not something a reader of the published guide can open. The guide keeps its line count: the dropped line pays for the stub's line. Claude-Session: https://claude.ai/code/session_01JZnppgHRp4sREcouhkQYDB Co-authored-by: Claude --- skills/objectui/guides/testing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/skills/objectui/guides/testing.md b/skills/objectui/guides/testing.md index 693ed00b5a..040d76da47 100644 --- a/skills/objectui/guides/testing.md +++ b/skills/objectui/guides/testing.md @@ -190,17 +190,17 @@ function AuthConsumer() { describe('AuthProvider', () => { it('shows loading then authenticated state', async () => { - // Of every method `AuthClient` declares in `packages/auth/src/types.ts`, the provider reaches ONE on - // this path. Type the literal `Partial` and the stubbed member - // against `AuthClient['getSession']`: the key, the signature and the - // resolved value are then all checked, and the widening happens ONCE, in a - // named place. Casting the double to `any` unchecks all three at once. - // This is the shape `@object-ui/auth`'s own AuthProvider.test.tsx uses. + // Of every method `AuthClient` declares in `packages/auth/src/types.ts`, this path reaches + // `getSession` on mount and `listOrganizations` once a user is set; an empty list ends the + // organization load there. Type the literal `Partial` and each stub against its + // own member (`AuthClient['getSession']`): the key, the signature and the resolved value are + // then all checked, and the widening happens ONCE, in a named place. `any` unchecks all three. const stub: Partial = { getSession: vi.fn().mockResolvedValue({ user: { id: '1', email: 'alice@example.com', name: 'Alice' }, session: { token: 'abc' }, }), + listOrganizations: vi.fn().mockResolvedValue([]), }; render(