Repository navigation
feat(frontend): add pallet clusters - #5851
Conversation
|
🚅 Deployed to the rivet-pr-5851 environment in rivet-frontend
|
860b668 to
af5c047
Compare
| const palletClusterQueryOptions = (opts: { cluster: string }) => | ||
| queryOptions({ | ||
| queryKey: [opts, "v2", "cluster"], |
There was a problem hiding this comment.
🟠 Medium · Scope Pallet detail caches to the organization
These detail keys include only the cluster slug, although every v2 request is authorized against the session's active organization. If a user opens prod in org A and then switches to a prod cluster in org B, fetchQuery can reuse A's fresh response and the page initially exposes A's domain, topology, and admin token; the sibling region/build/pool/node keys have the same collision and can also feed A's configuration into a mutation against B. Include organization in every Pallet detail query key (prefer current-org wrappers that close over it), as the list and existing project queries already do.
| beforeLoad: async ({ context, params }) => { | ||
| if (!features.byoc) { | ||
| if (features.byoc) { |
There was a problem hiding this comment.
🟠 Medium · Resolve Pallet clusters before BYOC clusters
When both flags are enabled and a Pallet cluster shares a slug with a BYOC cluster, this branch returns byoc before the Pallet lookup runs. Every Pallet card and switcher entry uses this shared URL, so the Pallet cluster becomes impossible to open; this also contradicts the feature contract added in this PR, which says Pallet is checked first. Query Pallet first and fall back to BYOC only on its not-found result.
| return navigate({ | ||
| to: "/orgs/$organization/clusters/$cluster", | ||
| params: { organization, cluster: data.cluster }, | ||
| }); | ||
| }, | ||
| }); | ||
|
|
There was a problem hiding this comment.
🟠 Medium · Persist the selected plan instead of discarding it
The submit path removes plan and sends only its node count. Consequently Free and Pro produce identical API requests, as do Team and Enterprise, even though the checkout promises different prices and SLAs; nothing records which agreement the user selected. Pass a backend-supported plan/billing identifier and persist it atomically with cluster creation, or remove the plan choices and plan-specific pricing until that API exists.
@rivet-gg/cloudto the build with the v2 cluster endpoints