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
fix(settings): resolve deployment shape from the server, not module env
The settings sidebar decided which sections exist from `NEXT_PUBLIC_*`-derived
module constants. Those are frozen at module init, and a 404 renders from Next's
`__next_error__` document, which never runs the root layout — so `window.__ENV`
is unassigned and every read comes back undefined. On any 404 page `isHosted`
and `isBillingEnabled` both read false, and Sim Cloud's sidebar rendered as a
self-hosted deployment: "Self hosting" appeared while the eleven `requiresHosted`
sections plus Subscription vanished.
Read both from the server-resolved workspace host context instead, with the
module constants kept as a fallback for a context that predates the field.
`/settings/self-host` also no longer 404s on hosted — the catalog keeps every
section this build can render, so the page gate redirects it to General like any
other unavailable section, and only a genuinely unknown segment 404s.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,16 @@ import { SettingsIntentLink } from '@/components/settings/settings-intent-link'
0 commit comments