Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1e0ee34
feat(database): add note caps and a table for their content
richiemcilroy Nov 27, 2026
7b6f115
feat(web): split My Caps into videos, images and notes
richiemcilroy Nov 27, 2026
8ff106e
feat(web): group folders, spaces and search by cap kind
richiemcilroy Nov 27, 2026
5e0d954
feat(web): show shared notes on the share page
richiemcilroy Nov 27, 2026
ad07a2a
test(web): mock the note share shell in the edit processing test
richiemcilroy Nov 27, 2026
408786b
feat(web): treat notes as caps without video media
richiemcilroy Nov 27, 2026
dcc083b
feat(web): link previews and embed handling for notes
richiemcilroy Nov 27, 2026
debe2ce
feat(web): delete and transfer note content with its cap
richiemcilroy Nov 27, 2026
d152405
feat(web): share notes from the desktop app
richiemcilroy Nov 27, 2026
18f5c28
feat(web): notes in the add to space dialog and per kind space order
richiemcilroy Nov 27, 2026
abfa33a
fix(web): My Caps counts, old page links and share header avatar
richiemcilroy Nov 27, 2026
e612c26
test(web): cover who can read shared note content
richiemcilroy Nov 27, 2026
d342cdf
fix(web): tighten note excerpt cleanup and session id fallback
richiemcilroy Nov 27, 2026
bba3f31
improve(web): load the share page shells on demand
richiemcilroy Nov 27, 2026
d035c7a
fix(web): select only the cards shown on the My Caps overview
richiemcilroy Nov 27, 2026
8795985
fix(web): give a transferred note its own document id
richiemcilroy Nov 27, 2026
0458f73
feat(web): apply the shareable link limit to notes
richiemcilroy Nov 27, 2026
08bda5d
improve(web): load the note link limit notice on demand
richiemcilroy Nov 29, 2026
ba45668
test(web): give the caps keyboard media query stub its listeners
richiemcilroy Nov 29, 2026
5b220e0
chore(web): apply formatting to the My Caps overview files
richiemcilroy Nov 29, 2026
a3ff099
Merge branch 'main' into feat/notes-share-web
richiemcilroy Nov 29, 2026
dfbb4d5
Merge branch 'main' into feat/notes-share-web
richiemcilroy Nov 29, 2026
1b12fe6
fix(web): use the shown order for range selection in folders and spaces
richiemcilroy Nov 29, 2026
9b32501
feat(database): index caps by kind for the library lists
richiemcilroy Nov 29, 2026
1102d1f
improve(web): read each kind of cap from its own index
richiemcilroy Nov 29, 2026
078c938
fix(web): keep the comment stats inside their row on share pages
richiemcilroy Nov 29, 2026
7286ac7
fix(web): keep the Sharing dialog actions in view on small screens
richiemcilroy Nov 29, 2026
dbdcd43
improve(web): word the link limit notice for notes
richiemcilroy Nov 29, 2026
b6e6c7a
improve(web): count Caps on folder cards
richiemcilroy Nov 29, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/infra-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- "apps/web/app/api/cron/developer-storage/**"
- "apps/web/lib/user-preferences-sql.ts"
- "apps/web/lib/meetings/trial.ts"
- "apps/web/lib/meetings/share.ts"
- "apps/web/lib/meetings/audio-usage.ts"
- "apps/web/lib/media-input-policy-strikes.ts"
- "apps/web/lib/organization-member-removal.ts"
Expand Down Expand Up @@ -52,6 +53,7 @@ on:
- "apps/web/app/api/cron/developer-storage/**"
- "apps/web/lib/user-preferences-sql.ts"
- "apps/web/lib/meetings/trial.ts"
- "apps/web/lib/meetings/share.ts"
- "apps/web/lib/meetings/audio-usage.ts"
- "apps/web/lib/media-input-policy-strikes.ts"
- "apps/web/lib/organization-member-removal.ts"
Expand Down Expand Up @@ -155,4 +157,4 @@ jobs:
CAP_INFRA_TEST_DATABASE_URL: mysql://root@127.0.0.1:3306/cap_infra_tests
CAP_INFRA_ROUND_TRIPS_DATABASE_URL: mysql://root@127.0.0.1:3306/cap_infra_tests
CAP_PASSKEYS_TEST_DATABASE_URL: mysql://root@127.0.0.1:3306/cap_infra_tests
run: bun run vitest run __tests__/integration/infra-*-database.test.ts __tests__/integration/user-preferences-database.test.ts __tests__/integration/space-creator-membership-database.test.ts __tests__/integration/organization-pointer-database.test.ts __tests__/integration/dashboard-library-database.test.ts __tests__/integration/messenger-poll-database.test.ts __tests__/integration/passkeys-database.test.ts __tests__/integration/email-change-database.test.ts __tests__/integration/meetings-trial-database.test.ts __tests__/integration/meetings-audio-usage-database.test.ts
run: bun run vitest run __tests__/integration/infra-*-database.test.ts __tests__/integration/user-preferences-database.test.ts __tests__/integration/space-creator-membership-database.test.ts __tests__/integration/organization-pointer-database.test.ts __tests__/integration/dashboard-library-database.test.ts __tests__/integration/messenger-poll-database.test.ts __tests__/integration/passkeys-database.test.ts __tests__/integration/email-change-database.test.ts __tests__/integration/meetings-trial-database.test.ts __tests__/integration/meetings-audio-usage-database.test.ts __tests__/integration/meetings-share-database.test.ts
65 changes: 65 additions & 0 deletions apps/web/__tests__/integration/dashboard-library-database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,71 @@ describe.runIf(Boolean(databaseUrl))(
).toEqual({ [unshared]: [], [shared]: [orgId] });
});

it("lists and counts each kind of Cap on its own, newest first", async () => {
const { CapsPageView } = await import(
"@/app/(org)/dashboard/caps/caps-page-data"
);
const { listCapIdsInView } = await import("@/actions/caps/list-view-ids");
const { orgId, ownerId } = await createOrg();
const otherId = await addMember(orgId);
const at = (minute: number) => ({
createdAt: new Date(Date.UTC(2026, 0, 1, 0, minute)),
});
const videoIds = [
await createVideo(ownerId, orgId, at(1)),
await createVideo(ownerId, orgId, at(4)),
];
const imageIds = [
await createVideo(ownerId, orgId, { ...at(2), isScreenshot: true }),
];
const noteIds = [
await createVideo(ownerId, orgId, { ...at(3), isNote: true }),
await createVideo(ownerId, orgId, { ...at(5), isNote: true }),
];
await createVideo(ownerId, orgId, {
...at(6),
archivedAt: new Date(),
});
await createVideo(ownerId, orgId, {
...at(7),
isNote: true,
folderId: id() as never,
});
await createVideo(otherId, orgId, { ...at(8), isNote: true });
fixture.sessionUserId = ownerId;
const expected = {
videos: videoIds.toReversed(),
images: imageIds,
notes: noteIds.toReversed(),
};

for (const kind of ["videos", "images", "notes"] as const) {
const page = await CapsPageView({
searchParams: {},
view: "library",
kind,
});
expect(
page.props.data.map((cap: { id: string }) => cap.id),
kind,
).toEqual(expected[kind]);
expect(page.props.count, kind).toBe(expected[kind].length);
expect(
(await listCapIdsInView({ type: "personal", kind })).ids,
).toEqual(expected[kind]);
}

const overview = await CapsPageView({
searchParams: {},
view: "library",
});
expect(
overview.props.data.map((cap: { id: string }) => cap.id).sort(),
).toEqual([...videoIds, ...imageIds, ...noteIds].sort());
expect(overview.props.counts).toEqual({ videos: 2, images: 1, notes: 2 });
expect(overview.props.archivedCount).toBe(1);
});

it("counts comments and lists each shared organization once on My Caps", async () => {
const { CapsPageView } = await import(
"@/app/(org)/dashboard/caps/caps-page-data"
Expand Down
Loading
Loading