Skip to content

Commit e8f37cd

Browse files
authored
[TASK-396857] [Apps] Group Perfect Meetings databases for demo cleanup (#132)
## Description #### Attribution - Custom agent: [Neil 3000](https://app.dev.notion.com/agent/40bff68032f2477d8ce9cff62af1dc40) - Custom agent created by: Neil Sarkar (nsarkar@makenotion.com) - Custom agent requested by: Neil Sarkar (nsarkar@makenotion.com) - Triggered from Slack thread: [View thread](https://notion.enterprise.slack.com/archives/C0BL6SMEHU4/p1791501419755589) - Notion thread: [View thread](https://app.dev.notion.com/chat?t=3f3b35e6e67f81f08fd100a9acca102c&wfv=chat) [written by Neil 3000] New Perfect Meetings installations create their four databases under **Perfect Meetings Resources**, linked from the app home. This gives demos a single data-cleanup page while keeping existing resource IDs stable. Existing installations need a manual database move; the custom agent and Worker remain separate, so this is not full uninstall. Task: [Group Perfect Meetings template resources under one cleanup page](https://app.dev.notion.com/p/25b933ee59a54b81baa2610399756fca) The resources page has no explanatory text, only the four child database links. Omitting those links fails SDK provisioning because each child database must appear exactly once in its parent page. README cleanup guidance and the catalog copy change have been removed. ### Resource declaration This declaration was exercised in the successful local deployment: ```ts const resources = page({ resourceId: "perfect-meetings-resources", properties: { title: notion.text("Perfect Meetings Resources") }, content: `<database url="meetings-db" inline="false">Meetings</database> <database url="people-db" inline="false">People</database> <database url="companies-db" inline="false">Companies</database> <database url="sync-runs-db" inline="false">Workflow runs</database>`, }) ``` ## Testing - App checks, all 168 existing unit tests, and build passed on Node 26. Catalog validation, generated agent-file checks, targeted Markdown/format checks, and commit hooks passed. - Deployed the revised template to an isolated local Notion workspace. The real client shows only Meetings, People, Companies, and Workflow runs under Perfect Meetings Resources. Fresh server reads confirm these are the page's only four child blocks and each database has that page as its parent. - The stock smoke fixture was adapted temporarily for current NaC imports and CLI arguments, with workspace deletion disabled. Deployment completed successfully. Destructive cleanup, workflow execution, and existing-install migration were not exercised. ### Agent QA proof (after-only) ![Perfect Meetings Resources with only its four child databases and no explanatory text](https://github.com/user-attachments/assets/436e1549-9472-4dbe-9afe-f184bcf06f48) --------- Co-authored-by: neilsarkar <83109+neilsarkar@users.noreply.github.com>
1 parent b321e9e commit e8f37cd

3 files changed

Lines changed: 30 additions & 14 deletions

File tree

‎apps/templates/perfect-meetings/APP.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Prepare for Google Calendar meetings with people outside your organization, with
66

77
## Your library
88

9+
<mention url="perfect-meetings-resources">Perfect Meetings Resources</mention> — The databases created by this app, grouped for demo cleanup.
10+
911
- <mention url="meetings-db" type="database">Meetings</mention> — Meeting briefs and your notes.
1012
- <mention url="people-db" type="database">People</mention> — Get to know the people you're meeting.
1113
- <mention url="companies-db" type="database">Companies</mention> — Background on their companies.

‎apps/templates/perfect-meetings/README.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ Notion pages with a short research brief.
99

1010
## What it creates
1111

12-
| Kind | Name | Purpose |
13-
| ------------ | ------------------ | ------------------------------------------------------------------------------------------------- |
14-
| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help |
15-
| Database | Meetings | One row per external meeting; brief at the top of the page, notes below |
16-
| Database | People | One row per outside attendee, keyed by email |
17-
| Database | Companies | One row per outside company, keyed by email domain |
18-
| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) |
19-
| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly |
20-
| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting |
12+
| Kind | Name | Purpose |
13+
| ------------ | -------------------------- | ------------------------------------------------------------------------------------------------- |
14+
| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help |
15+
| Page | Perfect Meetings Resources | Parent of the four app databases for demo cleanup |
16+
| Database | Meetings | One row per external meeting; brief at the top of the page, notes below |
17+
| Database | People | One row per outside attendee, keyed by email |
18+
| Database | Companies | One row per outside company, keyed by email domain |
19+
| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) |
20+
| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly |
21+
| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting |
2122

2223
## Home page
2324

‎apps/templates/perfect-meetings/src/notion.ts‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { access, customAgent, database } from "@notionhq/apps"
1+
import { access, customAgent, page } from "@notionhq/apps"
22
import { notion } from "@notionhq/apps/notion-as-code"
33

44
// Resource and property IDs are stable declaration identities. Do not rename
@@ -55,7 +55,20 @@ export const MEETING_STATUS = {
5555
cancelled: "Cancelled",
5656
} as const
5757

58-
export const companies = database("companies-db", {
58+
// Keep the data together for demo cleanup without deleting the app home.
59+
const resources = page({
60+
resourceId: "perfect-meetings-resources",
61+
properties: { title: notion.text("Perfect Meetings Resources") },
62+
content: `<database url="meetings-db" inline="false">Meetings</database>
63+
64+
<database url="people-db" inline="false">People</database>
65+
66+
<database url="companies-db" inline="false">Companies</database>
67+
68+
<database url="sync-runs-db" inline="false">Workflow runs</database>`,
69+
})
70+
71+
export const companies = resources.addDatabase("companies-db", {
5972
dataSourceResourceId: COMPANIES_SOURCE,
6073
name: "Companies",
6174
icon: { type: "emoji", emoji: "🏢" },
@@ -83,7 +96,7 @@ export const companies = database("companies-db", {
8396
],
8497
})
8598

86-
export const people = database("people-db", {
99+
export const people = resources.addDatabase("people-db", {
87100
dataSourceResourceId: PEOPLE_SOURCE,
88101
name: "People",
89102
icon: { type: "emoji", emoji: "🧑‍💼" },
@@ -158,7 +171,7 @@ export const people = database("people-db", {
158171
],
159172
})
160173

161-
export const meetings = database("meetings-db", {
174+
export const meetings = resources.addDatabase("meetings-db", {
162175
dataSourceResourceId: MEETINGS_SOURCE,
163176
name: "Meetings",
164177
icon: { type: "emoji", emoji: "🗓️" },
@@ -283,7 +296,7 @@ export const RUN_TRIGGER = {
283296

284297
// One row per calendar ingest run. Adding a row yourself runs a calendar
285298
// catch-up, and the ingest fills in that row.
286-
export const syncRuns = database("sync-runs-db", {
299+
export const syncRuns = resources.addDatabase("sync-runs-db", {
287300
dataSourceResourceId: "sync-runs-source",
288301
name: "Workflow runs",
289302
icon: { type: "emoji", emoji: "🔄" },

0 commit comments

Comments
 (0)