Skip to content
Merged
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
1 change: 1 addition & 0 deletions apps/web/lib/public-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@
const offset = (page - 1) * PUBLIC_COLLECTION_PAGE_SIZE;
const where = and(
eq(spaceVideos.spaceId, collection.id as Space.SpaceIdOrOrganisationId),
isNull(spaceVideos.folderId),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does spaceVideos.folderId reliably stay NULL for root-level space videos? If there’s a “root folder” record now or in the future, this could unintentionally hide all videos from the root listing. Might be worth a quick regression test covering root vs sub-folder visibility.

eq(videos.public, true),
isNull(organizations.tombstoneAt),
videoPasswordPredicate(
Expand Down Expand Up @@ -679,7 +680,7 @@
const folderIds = childFolders.map((folder) => folder.id);
const counts = isOrgLevelFolder(collection)
? await getPublicOrgFolderVideoCounts(folderIds, verifiedPasswordHashes)
: collection.kind === "space" || Boolean(collection.spaceId)

Check notice on line 683 in apps/web/lib/public-collections.ts

View workflow job for this annotation

GitHub Actions / Lint (Biome)

lint/complexity/noExtraBooleanCast

Avoid redundant `Boolean` call
? await getPublicSpaceFolderVideoCounts(folderIds, verifiedPasswordHashes)
: await getPublicUserFolderVideoCounts(folderIds, verifiedPasswordHashes);
const countByFolderId = new Map(
Expand Down
Loading