You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR scopes two cloud-only features behind isCloud guards: the signup email security settings panel (now hidden on self-hosted) and the payments page (now redirects non-cloud users). It also fixes a TypeError in containerButton.svelte by adding optional chaining to billingPlanDetails access in both branches of the tooltip ternary.
auth/security/+page.svelte: UpdateSignupEmailSecurity is wrapped in {#if isCloud}, preventing it from rendering on self-hosted instances.
account/payments/+page.ts: Adds an early redirect(302, '/') guard so non-cloud users can't access the payments page.
containerButton.svelte: Adds ?. to both billingPlanDetails?.group and billingPlanDetails?.name, resolving the previously flagged null-access risk.
Confidence Score: 5/5
Safe to merge — the three changes are small, well-scoped, and consistent with existing patterns in the codebase.
All three changes are straightforward: optional chaining additions and isCloud conditional guards. The redirect target inconsistency in the payments guard only matters if the app is deployed at a non-root base path, which is an unlikely concern in practice.
src/routes/(console)/account/payments/+page.ts — the redirect target could be aligned with the resolve('/') pattern used elsewhere.
Important Files Changed
Filename
Overview
src/lib/layout/containerButton.svelte
Adds optional chaining for both billingPlanDetails?.group and billingPlanDetails?.name, addressing the previously flagged TypeError risk in both branches of the ternary.
src/routes/(console)/account/payments/+page.ts
Adds an isCloud guard that redirects non-cloud users away from the payments page. The redirect(302, '/') call is correct for SvelteKit 2 but uses a bare '/' instead of resolve('/') from $app/paths as done in other load files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.