feat: Notify user roadmap submissions#105
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Caution Review failedThe pull request is closed. WalkthroughAdded Arcjet bot-detection and rate-limiting to the roadmap triage API, expanded board data fetching and input validation, inserted triage items, dispatched an Inngest email event, and implemented a new Inngest function that fetches page/user data and sends a Postmark notification to the page admin. Changes
Sequence DiagramsequenceDiagram
participant User
participant API as submit-triage API
participant Arcjet
participant DB as Supabase
participant Inngest
participant EmailFn as sendRoadmapTriageNotification
participant Postmark
participant Admin
User->>API: POST /roadmap/submit-triage
API->>Arcjet: Check bot & rate limits
Arcjet-->>API: Allow / Deny (403)
API->>DB: Fetch board (includes title,page_id)
DB-->>API: Board data
API->>DB: Insert triage item
DB-->>API: Item created
API->>Inngest: Dispatch email/roadmap.triage-submitted
API-->>User: { success: true, item }
Inngest->>EmailFn: Trigger function
EmailFn->>DB: Fetch page (title, user_id, logo)
DB-->>EmailFn: Page details
EmailFn->>DB: Fetch user (admin) via admin API
DB-->>EmailFn: Admin email
EmailFn->>Postmark: Send HTML/text email (CTA -> triage URL)
Postmark->>Admin: Deliver notification email
EmailFn-->>Inngest: { body, result }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/page/pages/api/roadmap/submit-triage.ts(3 hunks)apps/web/inngest/email/send-roadmap-triage-notification.ts(1 hunks)apps/web/pages/api/inngest.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: arjunkomath
Repo: techulus/changes-page PR: 101
File: packages/supabase/migrations/20_roadmap_triage_items.sql:15-25
Timestamp: 2025-10-18T23:41:55.508Z
Learning: In the changes-page codebase, roadmap triage items use service role (supabaseAdmin) for all database operations with authorization implemented at the API layer. The RLS policies on roadmap_triage_items are for page owner management only. Public INSERT happens through apps/page/pages/api/roadmap/submit-triage.ts which uses supabaseAdmin and checks board.is_public and visitor authentication. No INSERT RLS policy is needed.
📚 Learning: 2025-10-18T23:41:55.508Z
Learnt from: arjunkomath
Repo: techulus/changes-page PR: 101
File: packages/supabase/migrations/20_roadmap_triage_items.sql:15-25
Timestamp: 2025-10-18T23:41:55.508Z
Learning: In the changes-page codebase, roadmap triage items use service role (supabaseAdmin) for all database operations with authorization implemented at the API layer. The RLS policies on roadmap_triage_items are for page owner management only. Public INSERT happens through apps/page/pages/api/roadmap/submit-triage.ts which uses supabaseAdmin and checks board.is_public and visitor authentication. No INSERT RLS policy is needed.
Applied to files:
apps/web/inngest/email/send-roadmap-triage-notification.tsapps/page/pages/api/roadmap/submit-triage.ts
🧬 Code graph analysis (3)
apps/web/pages/api/inngest.ts (1)
apps/web/inngest/email/send-roadmap-triage-notification.ts (1)
sendRoadmapTriageNotification(13-182)
apps/web/inngest/email/send-roadmap-triage-notification.ts (2)
packages/supabase/admin.ts (1)
supabaseAdmin(4-7)apps/web/utils/helpers.ts (1)
getAppBaseURL(1-3)
apps/page/pages/api/roadmap/submit-triage.ts (1)
packages/supabase/admin.ts (1)
supabaseAdmin(4-7)
Summary by CodeRabbit
New Features
Security
Reliability