Skip to content

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

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

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 on lines 121 to +135
## Promote and roll back

Promote an earlier deployment to production:
Promote an earlier **production** deployment back to live:

```npm
npx @prisma/cli@latest app promote dep_123 --app web
```

Promotion rebuilds the deployment with your production environment variables. The rebuild is necessary because values are baked in at deploy time: a preview build still carries preview config, so it can't serve production as-is.
Promotion rebuilds the deployment with your current production environment variables. The rebuild is necessary because values are baked in at deploy time, so an old build can't pick up new config as-is. Because it rebuilds, verify the result serves correctly afterwards — `app logs` or a request to the live URL.

`app promote` works within one branch. It has no `--branch` flag; the branch comes from your active Git branch (or `main` outside a repo), and the deployment id must belong to that branch's app. It cannot move a preview deployment to production:

- From a preview Git branch, promote resolves the *preview* app. Promoting that branch's live deployment succeeds with the warning `The selected deployment is already live for this app` and changes nothing.
- From the production branch, a preview deployment id fails with `DEPLOYMENT_NOT_FOUND`.

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Promote intro contradicts its own branch-scoped clarification below.

Line 123 frames promote as acting on a "production deployment," and line 129 says it rebuilds with "your current production environment variables." But lines 131-135 (and cli-reference.mdx's app promote row, plus the FAQ) clarify promote is branch-scoped and, run from a preview branch, uses that branch's preview env vars — not production ones. The opening framing should be branch-neutral to avoid misleading preview-branch users.

📝 Suggested rewording
-Promote an earlier **production** deployment back to live:
+Promote an earlier deployment of the current branch's app back to live:

 ```npm
 npx `@prisma/cli`@latest app promote dep_123 --app web

-Promotion rebuilds the deployment with your current production environment variables. The rebuild is necessary because values are baked in at deploy time, so an old build can't pick up new config as-is. Because it rebuilds, verify the result serves correctly afterwards — app logs or a request to the live URL.
+Promotion rebuilds the deployment with the current branch's environment variables (production variables on the production branch, preview variables plus overrides elsewhere). The rebuild is necessary because values are baked in at deploy time, so an old build can't pick up new config as-is. Because it rebuilds, verify the result serves correctly afterwards — app logs or a request to the live URL.

</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
## Promote and roll back

Promote an earlier deployment of the current branch's app back to live:

🤖 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/deployments.mdx` around lines 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.

Comment on lines +28 to +30
- `app deploy --framework` accepts `nextjs`, `nuxt`, `astro`, `hono`, `nestjs`, `tanstack-start`, `custom`, and `bun`. This list is exhaustive: no other framework has dedicated support.
- Frameworks not on the list (Elysia, Express, Fastify, and anything else that runs as a plain HTTP server) deploy with `--framework bun --entry <server-file>`. They get no framework-specific handling: the server must bind `0.0.0.0`, listen on the deployed port, and bundle any files it reads at runtime.
- `app build --build-type` accepts `auto`, `bun`, `nextjs`, `nuxt`, `astro`, `nestjs`, `tanstack-start`, and `custom`.

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

"Exhaustive... dedicated support" claim conflates fallback flag values with dedicated framework support.

Line 28 lists all 8 accepted --framework values (including custom and bun) and asserts "no other framework has dedicated support" — implying these 8 all have dedicated support. But bun and custom are the generic fallback path (as line 29 itself describes: "no framework-specific handling"), and getting-started.mdx explicitly limits dedicated build support to 6 frameworks (Next.js, Nuxt, Astro, Hono, NestJS, TanStack Start). This contradicts the framework-support clarification that's the point of this PR.

✏️ Suggested rewording
-- `app deploy --framework` accepts `nextjs`, `nuxt`, `astro`, `hono`, `nestjs`, `tanstack-start`, `custom`, and `bun`. This list is exhaustive: no other framework has dedicated support.
+- `app deploy --framework` accepts `nextjs`, `nuxt`, `astro`, `hono`, `nestjs`, `tanstack-start`, `custom`, and `bun`. Dedicated build support exists only for the first six; `custom` and `bun` are the fallback path for everything else.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `app deploy --framework` accepts `nextjs`, `nuxt`, `astro`, `hono`, `nestjs`, `tanstack-start`, `custom`, and `bun`. This list is exhaustive: no other framework has dedicated support.
- Frameworks not on the list (Elysia, Express, Fastify, and anything else that runs as a plain HTTP server) deploy with `--framework bun --entry <server-file>`. They get no framework-specific handling: the server must bind `0.0.0.0`, listen on the deployed port, and bundle any files it reads at runtime.
- `app build --build-type` accepts `auto`, `bun`, `nextjs`, `nuxt`, `astro`, `nestjs`, `tanstack-start`, and `custom`.
- `app deploy --framework` accepts `nextjs`, `nuxt`, `astro`, `hono`, `nestjs`, `tanstack-start`, `custom`, and `bun`. Dedicated build support exists only for the first six; `custom` and `bun` are the fallback path for everything else.
- Frameworks not on the list (Elysia, Express, Fastify, and anything else that runs as a plain HTTP server) deploy with `--framework bun --entry <server-file>`. They get no framework-specific handling: the server must bind `0.0.0.0`, listen on the deployed port, and bundle any files it reads at runtime.
- `app build --build-type` accepts `auto`, `bun`, `nextjs`, `nuxt`, `astro`, `nestjs`, `tanstack-start`, and `custom`.
🤖 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 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.

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