Skip to content

docs(docs): fix Compute production/preview, promote, and framework support docs#8032

Closed
ankur-arch wants to merge 1 commit into
mainfrom
dr-8720-compute-docs-fix-productionpreview-branch-semantics-prod-and
Closed

docs(docs): fix Compute production/preview, promote, and framework support docs#8032
ankur-arch wants to merge 1 commit into
mainfrom
dr-8720-compute-docs-fix-productionpreview-branch-semantics-prod-and

Conversation

@ankur-arch

@ankur-arch ankur-arch commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What changed and why

Docs audit driven by real user + agent deployment feedback (a Glitch-style Elysia app port that went sideways). Every behavioral claim below was verified today against a live Compute app with @prisma/cli@latest; nothing is inferred from old docs.

Verified behaviors that contradicted the docs

  • app deploy --prod from a non-default Git branch silently creates a preview deployment. --prod confirms production, it doesn't select it; branch resolution (--branch → active Git branch → main) decides the environment, and the CLI doesn't warn. The JSON output even reports "promoted": true (live-within-branch), which reads like a production promotion.
  • "The first branch in a project is production" is outdated. The production branch is the project's default branch; a first-ever deploy from a non-default branch creates a preview. Was wrong on both the limitations and branching pages.
  • app promote is same-branch only. From a preview Git branch it no-ops with the warning The selected deployment is already live for this app; from the production branch a preview deployment id fails with DEPLOYMENT_NOT_FOUND. Preview→production promotion is impossible; the old text implied otherwise. It also has no --branch flag (nor does app remove) — branch context is Git-only.
  • Framework lists were stale: --framework accepts nextjs, nuxt, astro, hono, nestjs, tanstack-start, custom, bun; app build --build-type accepts auto, bun, nextjs, nuxt, astro, nestjs, tanstack-start, custom (checked against CLI validation errors). "First-class support" wording removed — an agent extrapolated it into claiming Elysia has first-class support. The docs now state the dedicated list is exhaustive and that everything else (Elysia, Express, Fastify, …) deploys as a plain Bun server with no framework-specific handling.

Page-by-page

  • deployments: new "How Compute chooses production or preview" section (linked from 4 other pages); "Branch context still matters" warning callout on --prod; promote section rewritten with same-branch semantics, the two failure modes, the correct path to production, and what to do when promote "does nothing"; new troubleshooting section "The deploy succeeded but the app only serves an error page" (bind 0.0.0.0, listen on process.env.PORT, runtime-read files must ship in the artifact, repro with app build/app run) — none of this was documented anywhere.
  • branching: production = default branch (not first branch); warning callout on --prod + branch resolution.
  • limitations: replaced the outdated first-branch line; added --prod and app promote limitations; corrected framework/build-type lists; stated the generic-Bun-server path explicitly.
  • getting-started: "first-class support" → "dedicated build support … this list is exhaustive" (+ NestJS); generic-server guidance for everything else; branch-context warning in the production section.
  • environment-variables: new "Which scope does a deploy use?" — including that --prod from a non-default branch still gets preview vars, and how to check via branch.kind.
  • faq: two new entries: "I ran app deploy --prod. Why did I get a preview deployment?" and "Why did app promote do nothing?".
  • cli-reference: promote description qualified as same-branch; framework/build-type enums fixed; --prod branch-context note.

How it was tested

Content-only MDX change. CLI behavior verified against a live project: deployed --prod from a throwaway non-default branch (got "kind": "preview"), exercised promote from both branch contexts (observed the no-op warning and DEPLOYMENT_NOT_FOUND), extracted flag enums from CLI validation errors, and cleaned the test branch up afterwards.

Follow-ups / known limitations

  • Product questions for the Compute team (also in Linear DR-8720): should the CLI warn when --prod is passed but the resolved branch is a preview? app promote of a valid production deployment also returned a transient DEPLOY_FAILED (Internal Server Error) that succeeded on retry — and the rebuilt old deployment served 404s until rollback, which is worth a look.
  • The prisma-compute agent skill should get the same corrections so agents stop overclaiming framework support.

Linear: DR-8720

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified how production and preview deployments are determined, including branch selection rules and what --prod does.
    • Expanded guidance for framework support, build types, and deployment behavior across CLI commands.
    • Added troubleshooting and FAQ notes for failed-looking deploys, promotion behavior, and environment variable scope.
    • Updated getting-started and limitations docs with clearer runtime requirements and production deployment steps.

…pport docs

Linear: DR-8720

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 7, 2026 3:07pm
docs Ready Ready Preview, Comment Jul 7, 2026 3:07pm
eclipse Ready Ready Preview, Comment Jul 7, 2026 3:07pm
site Ready Ready Preview, Comment Jul 7, 2026 3:07pm

Request Review

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

52 links: ✅ 3 OK | 🚫 0 errors | 🔀 2 redirects | 👻 47 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 3
🔀 Redirected 2
👻 Excluded 47
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Documentation across Prisma Compute pages was updated to clarify that production versus preview environments are resolved from branch context (--branch, active Git branch, then main) rather than the --prod flag. Also updated: app promote semantics, expanded framework/build-type lists, and new troubleshooting/FAQ content.

Changes

Compute Documentation Updates

Layer / File(s) Summary
Core branch resolution concept
apps/docs/content/docs/compute/branching.mdx, apps/docs/content/docs/compute/deployments.mdx, apps/docs/content/docs/compute/getting-started.mdx
Clarifies that production vs preview is determined by resolved branch order (--branch → active Git branch → main), not by --prod; adds warnings, examples, and branch.kind output guidance.
Promote behavior and env scope
apps/docs/content/docs/compute/cli-reference.mdx, apps/docs/content/docs/compute/deployments.mdx, apps/docs/content/docs/compute/environment-variables.mdx, apps/docs/content/docs/compute/limitations.mdx
Redefines app promote as a branch-constrained rebuild using current branch env vars; documents preview-vs-production promote behavior, errors, and environment variable scope resolution.
Framework and build-type support expansion
apps/docs/content/docs/compute/cli-reference.mdx, apps/docs/content/docs/compute/limitations.mdx
Expands --framework and --build-type option lists to include custom, nestjs, and other frameworks; documents Bun fallback behavior for unsupported frameworks.
Troubleshooting and FAQ additions
apps/docs/content/docs/compute/deployments.mdx, apps/docs/content/docs/compute/faq.mdx
Adds troubleshooting steps for deploys that succeed but show error pages, and new FAQ entries on --prod preview behavior and promote limitations; wording tweak to custom-domain instructions.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • prisma/web#7931: Introduced the same Compute docs pages (branching, deployments, cli-reference, getting-started) that this PR refines with clarified branch/production semantics.

Poem

A rabbit hopped through docs so fine,
Untangling branches, line by line,
"Production's not just --prod," it said,
"It's the branch resolved, straight ahead!"
With promote and preview now clear as day,
This bunny's docs will guide the way. 🐇📘

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main doc updates around Compute production/preview behavior, promote semantics, and framework support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@argos-ci

argos-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 7, 2026, 3:17 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
apps/docs/content/docs/compute/limitations.mdx (1)

20-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

"production and default branches" implies two distinct concepts.

Per this file's own line 20, the production branch is the default branch. "left alone" phrasing on line 24 reads as if these could differ.

✏️ Suggested tweak
-- Deleting a branch on GitHub can tear down the matching platform branch, but production and default branches are always left alone.
+- Deleting a branch on GitHub can tear down the matching platform branch, but the production (default) branch is always left alone.
🤖 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/docs/content/docs/compute/limitations.mdx` around lines 20 - 25, Clarify
the wording in the limitations copy so “production branch” and “default branch”
are not treated as separate concepts, since the text already says the production
branch is the default branch. Update the relevant sentences in the documentation
content to use one consistent term or explicitly say “production/default branch”
where needed, and keep the behavior notes for app deploy, app promote, branch
list, and branch deletion aligned with that single definition.
🤖 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/docs/content/docs/compute/deployments.mdx`:
- Around line 121-135: The “Promote and roll back” section in deployments.mdx
should be made branch-neutral because the current wording in the `app promote`
example and surrounding text implies only production deployments and production
environment variables. Update the prose around `app promote` so it matches the
branch-scoped behavior described later in the same section and in the `app
promote` documentation: make clear it rebuilds using the current branch’s
environment variables (production on the production branch, preview on preview
branches) and still note that the rebuild is required before verifying the live
result.

In `@apps/docs/content/docs/compute/limitations.mdx`:
- Around line 28-30: Clarify the framework support wording in the limitations
doc so it does not imply that all accepted `app deploy --framework` values are
dedicated framework integrations. Update the copy near the `app deploy
--framework` and `app build --build-type` descriptions in the limitations
content to distinguish the dedicated frameworks from the generic fallback values
(`bun` and `custom`), and make the text consistent with the support matrix
described elsewhere (for example, the dedicated support list used in
getting-started). Use the existing `app deploy --framework` and `app build
--build-type` references to keep the wording accurate and unambiguous.

---

Nitpick comments:
In `@apps/docs/content/docs/compute/limitations.mdx`:
- Around line 20-25: Clarify the wording in the limitations copy so “production
branch” and “default branch” are not treated as separate concepts, since the
text already says the production branch is the default branch. Update the
relevant sentences in the documentation content to use one consistent term or
explicitly say “production/default branch” where needed, and keep the behavior
notes for app deploy, app promote, branch list, and branch deletion aligned with
that single definition.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b861884c-7cb1-4cbd-92fb-e71bfea6409b

📥 Commits

Reviewing files that changed from the base of the PR and between 52fe2bb and ac74159.

📒 Files selected for processing (7)
  • apps/docs/content/docs/compute/branching.mdx
  • apps/docs/content/docs/compute/cli-reference.mdx
  • apps/docs/content/docs/compute/deployments.mdx
  • apps/docs/content/docs/compute/environment-variables.mdx
  • apps/docs/content/docs/compute/faq.mdx
  • apps/docs/content/docs/compute/getting-started.mdx
  • apps/docs/content/docs/compute/limitations.mdx

Comment thread apps/docs/content/docs/compute/deployments.mdx
Comment thread apps/docs/content/docs/compute/limitations.mdx
@ankur-arch ankur-arch closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants