Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/8083-record-presence-stub-array-shape.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
---

Test-only change. Thirteen `RecordDetailView` test files stubbed
`useRecordPresence` as `{ viewers: [], others: [] }`, while the real hook
returns `PresenceUser[]` and its only consumer reads `recordPresence.length > 0`.
An object has no `length`, so the presence row was structurally unrenderable in
those files: they exercised the no-presence branch through a shape mismatch
rather than through the empty array the branch is about, and no value of the
object stub could ever have made the row appear. All thirteen now stub `[]`,
matching the nine files that already did. No published package changes — the
edits are confined to `*.test.tsx` files, which no package's `files[]` ships.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
}));
vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));
vi.mock('sonner', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
}));
vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));
vi.mock('sonner', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
}));
vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));
vi.mock('sonner', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({

vi.mock('@object-ui/collaboration', async (importOriginal) => ({
...(await importOriginal<Record<string, unknown>>()),
useRecordPresence: () => ({ viewers: [], others: [] }),
useRecordPresence: () => [],
PresenceAvatars: () => null,
}));

Expand Down
Loading