Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/reference/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ if (features.platform) {
| `datacenter` | Datacenter-related UI. |
| `danger-zone` | Destructive settings actions (`features.dangerZone`). |
| `byoc` | Bring Your Own Cloud (`features.byoc`): the BYOC option in the create-project flow, BYOC clusters in the project lists, and the `/orgs/$org/clusters/$cluster` page. Requires `platform`. |
| `pallet` | v3 dashboard ("pallet") backed by cloud API v2: the single-page create cluster screen that replaces the create-project dialog and the `/orgs/$org/new` page, and pallet clusters on `/orgs/$org/clusters/$cluster` (checked before BYOC). Requires `platform`. |
| `services` | Managed services (`features.services`): the Services section of the onboarding product picker, the Durable Streams onboarding path, and the Services tab on the namespace settings drawer. Independent of `platform` (cloud hands out a managed service URL, self-host runs the worker container). |
| `mcp` | MCP connection settings card on the namespace settings drawer. Flavor-dependent content: `platform` renders the hosted `mcp.rivet.dev` endpoint pinned to this namespace, everything else renders the local stdio (`npx @rivet-dev/mcp`) config. |

Expand Down
1 change: 1 addition & 0 deletions frontend/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Register keyboard shortcuts with `useHotkey` / `useHotkeySequence` from `@tanstack/react-hotkeys`. Do not hand-roll `window.addEventListener("keydown", ...)` handlers. Use the `ignoreInputs` option to skip shortcuts while typing in inputs/textareas/contenteditable instead of checking `e.target.tagName` manually.
- Wrap async user actions (anything with pending/loading/error state) in `@tanstack/react-query` `useMutation`; drive UI with `mutation.isPending` / `mutation.mutate()`. Do not hand-roll a `useState` loading flag with try/catch/setState.
- Show API errors on forms with `showApiErrorOnForm(form, error, fields?)` from `src/lib/form-errors.ts`: set `meta: { hideErrorToast: true }` on the mutation and call it in the submit's `catch`. It puts `errors[].field` on matching fields and toasts the rest. Type the `fields` map with the request's keys (`ApiFieldMap<FormValues, keyof Request>`) so API renames fail to compile.
- Derive state during render instead of syncing it with `useEffect`. Do not use `useEffect` for derived state or as a general escape hatch. If you believe an effect is genuinely unavoidable and cannot find another option, stop and ask the user for guidance before adding one.
- The frontend build embedded into `rivet-engine` must use `pnpm build:engine` / `npx turbo build:engine -F @rivetkit/engine-frontend`, which sets `BASE_URL=/ui/`. Do not compensate for a root `/assets/*` build by adding root asset routes to the engine; fix the embedded build base instead.
- The dashboard serves multiple deployment flavors (cloud / OSS / enterprise) from one build via `features.*`. Test frontend changes in more than one flavor before calling them done. **OSS especially**, since it disables `auth`/`platform`/`acl` and takes different code paths (context switcher, sidebar, onboarding, data providers) that the cloud default never exercises. Switch flavors in the browser console with `localStorage.setItem("FEATURE_FLAGS", "")` (OSS) / `localStorage.removeItem("FEATURE_FLAGS")` then reload. See [Feature flags](../.claude/reference/feature-flags.md#testing-across-flavors-required-for-frontend-changes).
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@radix-ui/react-visually-hidden": "^1.2.3",
"@rivet-gg/cloud": "https://pkg.pr.new/rivet-dev/engine-ee/@rivet-gg/cloud@979",
"@rivet-gg/cloud": "https://pkg.pr.new/rivet-dev/engine-ee/@rivet-gg/cloud@1330",
"@rivet-gg/icons": "workspace:*",
"@rivetkit/engine-api-full": "workspace:*",
"@rivetkit/shared-data": "workspace:*",
Expand Down
64 changes: 56 additions & 8 deletions frontend/src/app/context-switcher.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

144 changes: 143 additions & 1 deletion frontend/src/app/data-providers/cloud-data-provider.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading