feat(site): add public Compute template directory - #8128
Conversation
Linear: DR-8815
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe site adds a ChangesCompute Templates Directory
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant TemplatesPage
participant RemoteManifest
participant Visitor
TemplatesPage->>RemoteManifest: Fetch and validate template metadata
RemoteManifest-->>TemplatesPage: Return templates or unavailable data
TemplatesPage-->>Visitor: Render cards or empty state
Visitor->>TemplatesPage: Select deployment or source link
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/site/src/app/templates/page.tsx`:
- Around line 29-30: Add an AbortController-based timeout around the manifest
fetch in the page component, passing its signal to fetch and cancelling the
request after a bounded interval shorter than the page deadline. Ensure timeout
cancellations reject into the existing catch handling and clean up the timer
after the request completes.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 62bf64f3-4dec-4ce7-87aa-00148a29a320
📒 Files selected for processing (2)
apps/site/src/app/layout.tsxapps/site/src/app/templates/page.tsx
Linear: DR-8815
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/site/src/app/templates/page.tsx (1)
8-18: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winEnforce unique
template.idvalues intemplateManifestSchema. The current manifest has unique IDs, but the schema accepts duplicate valid items. Duplicate IDs create duplicate React keys and identical Console URLs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/site/src/app/templates/page.tsx` around lines 8 - 18, Update templateManifestSchema to validate that all template.id values are unique within the templates array. Preserve the existing per-template validation and reject manifests containing duplicate IDs before rendering or generating URLs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/site/src/app/templates/page.tsx`:
- Around line 8-18: Update templateManifestSchema to validate that all
template.id values are unique within the templates array. Preserve the existing
per-template validation and reject manifests containing duplicate IDs before
rendering or generating URLs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 68fa8e6c-bc20-4613-8d88-6e0e405f8646
📒 Files selected for processing (1)
apps/site/src/app/templates/page.tsx
Purpose of change
Publish a public Prisma Compute template directory at
/templatesso developers can inspect working starters and begin a guided deployment from prisma.io.Closes DR-8815
What's changed and why
/templatespage backed by the shared Compute template manifest, refreshed every five minutes.Testing notes / Before-after
Before: prisma.io had no public template directory. Developers had to reach the signed-in Console catalog first.
After:
/templatespresents the live catalog publicly, gives developers the source up front, and preserves the selected template through the Console link.Verified with:
/templatesis statically generated with a five-minute refreshScreenshots
Mobile
Summary by CodeRabbit