Skip to content

Commit ae3ac62

Browse files
committed
feat(frontend): feature flag compute
1 parent cef217f commit ae3ac62

10 files changed

Lines changed: 83 additions & 28 deletions

File tree

.claude/reference/feature-flags.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ if (features.platform) {
2828
| `acl` | Engine enforces token auth on the public endpoint. Implied by `platform`; set independently for enterprise. |
2929
| `billing` | Billing UI. |
3030
| `captcha` | Turnstile captcha on auth forms. Requires `auth`. |
31+
| `compute` | Rivet Compute (managed pool) UI: namespace deployments + logs sidebar links and routes, actor-details deployment-logs tab, and the Rivet provider option in onboarding / Add Provider. Requires `platform`. |
3132
| `support` | Support/help affordances. |
3233
| `branding` | Rivet branding chrome. |
3334
| `datacenter` | Datacenter-related UI. |
3435
| `danger-zone` | Destructive settings actions (`features.dangerZone`). |
3536

36-
Deployment flavors map to flag sets roughly as: **cloud** = all on; **OSS** = `auth`/`platform`/`acl` off; **enterprise** = `acl` on, `auth`/`platform` off (engine enforces auth without a login UI). Do not treat `platform`/`auth` as "engine requires credentials" — that is `acl`.
37+
Deployment flavors map to flag sets roughly as: **cloud** = all on; **OSS** = `auth`/`platform`/`acl` off; **enterprise** = `acl` on, `auth`/`platform` off (engine enforces auth without a login UI). Do not treat `platform`/`auth` as "engine requires credentials" — that is `acl`. **`compute` is opt-in even on cloud** — each Railway service adds it to `VITE_FEATURE_FLAGS` per-environment (e.g. staging on, prod off) rather than inheriting the cloud default-on set.
3738

3839
## When to add a new flag
3940

frontend/src/app/actors-grid.tsx

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/app/getting-started.tsx

Lines changed: 29 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/app/layout.tsx

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/app/provider-dropdown.tsx

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/components/actors/actors-actor-details.tsx

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/lib/features.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/routes/_context/orgs.$organization/projects.$project/ns.$namespace/deployments.tsx

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/routes/_context/orgs.$organization/projects.$project/ns.$namespace/logs.tsx

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/src/content/docs/connect/rivet-compute.mdx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ skill: true
55
---
66

77
<Note>
8-
Rivet Cloud is currently in beta.
8+
Rivet Compute is currently in beta.
99
</Note>
1010

1111
<Note>
@@ -22,14 +22,23 @@ Using an AI coding agent? Open **Connect** on the [Rivet dashboard](https://dash
2222
- A [Rivet Cloud](https://dashboard.rivet.dev) account and project
2323

2424
</Step>
25-
<Step title="Configure Runner Mode">
25+
<Step title="Configure Serverless Mode">
2626

27-
Rivet Compute runs your app as a long-lived container. Make sure your server calls `startRunner()` instead of `serve()`:
27+
Rivet Compute runs your app as a short-lived, serverless container. Make sure your server `serve()` or uses `handler()` instead of `startRunner()`:
2828

2929
```typescript src/server.js @nocheck
3030
import { registry } from "./actors.js";
31+
import { Hono } from "hono";
32+
import { serve } from "@hono/node-server";
3133

32-
registry.startRunner();
34+
const app = new Hono();
35+
36+
// Mount Rivet handler
37+
app.all("/api/rivet/*", (c) => registry.handler(c.req.raw));
38+
39+
const PORT = parseInt(process.env.PORT);
40+
41+
serve({ fetch: app.fetch, port: PORT });
3342
```
3443

3544
See [Runtime Modes](/docs/general/runtime-modes) for details on when to use each mode.
@@ -147,6 +156,7 @@ If the status shows **Error**, check that your container starts successfully and
147156

148157
- The server file is not calling `registry.startRunner()`
149158
- A runtime crash on startup — test the image locally with `docker run`
159+
- The Dockerfile is not listening on the `PORT` environmental variable
150160

151161
</Accordion>
152162

0 commit comments

Comments
 (0)