v0.8.22: ui fixes, library, env resolution hardening - #7473
Merged
Conversation
…hrough one client reader (#7461) * fix(config): resolve the deployment shape on the server and read it through one client reader Client-side deployment flags (`isHosted`, `isBillingEnabled`, `isChatEnabled`, provider-configured flags, and the enterprise feature set) were module constants computed once from the `NEXT_PUBLIC_*` transport the root layout emits. A document that never runs the root layout — Next's bare `__next_error__` 404 shell, or `global-error` after the root or workspace layout throws — leaves every one of them unset for the life of the tab, including after `retry()` or a client-side navigation recovers the app in place. Sim Cloud then rendered as self-hosted: an API Key field on every hosted-model block, no Auto model, no billing sections, "Self hosting" in settings. Project the deployment shape into the workspace host context, resolved on the server per request (`resolveDeploymentShape`), and give browser code one reader: `useDeploymentShape()` for components and `getDeploymentShape()` for block conditions, sub-block visibility, stores, and helpers. The host provider seeds the reader during its own render, ahead of any workspace child, so the first paint already reads the server value; outside a workspace, where the root layout always runs, the env constants remain the fallback. Parameterize the settings catalog on the shape instead of module constants: `selfHostedOverride` names a feature key resolved by `isSelfHostedOverrideEnabled`, `buildUnifiedSettingsCatalog` is unfiltered so `/settings/self-host` redirects to General on hosted instead of 404ing, and the server section gate passes the same shape. Retire the browser-hostname fallback for `isHosted` (superseded) and the module-scope env reads in the catalog. Tests cover the resolver, the env-less document with and without a seeded shape, provider seeding order, catalog resolution on both deployment kinds, and the billing gate reading the host context; four component suites move from partial `env-flags` factories to `setEnvFlags`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(config): re-evaluate option lists when the host shape lands after mount A host context served by an app version that predates the deployment field leaves the browser on the env fallback until a refetch carries the shape. Block option builders read the shape outside React, so the sub-block combobox now subscribes to it and keys its option memo on it; the reader hands out one stable fallback object per document so that dependency only changes when the shape does. The host-provider test now renders without query data first and then lets a refetch land, so the effect path that follows a later host context is exercised rather than the initial seed twice. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(chat): preserve literal code around source chips * fix(chat): scope delimiter pairing to paragraphs * fix(chat): preserve tilde-fenced citations
Co-authored-by: Sim Pi Agent <pi@sim.ai>
…uilds (#7464) * fix(desktop): render the offline page and server picker in packaged builds * fix(desktop): keep retrying the origin past a broken offline page and drop the font copy
…gate (#7465) * fix(docs): describe which surfaces the NEXT_PUBLIC_ flag twins still gate The workspace host context now carries the server-resolved deployment shape, so settings sections and block fields inside a workspace follow the server variable. The NEXT_PUBLIC_ twins still gate the login page's SSO entry point and the Function block's Sandbox selector, and sim-setup doctor checks each pair. Update the sentences that said the twin decides what the settings UI shows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(docs): correct the Sandboxes settings state and the setup doctor scope The Sandboxes settings entry keeps its sidebar row and shows an upgrade notice until the server's readiness check passes, so say that instead of claiming the section is hidden, and add a troubleshooting bullet for that state. Describe NEXT_PUBLIC_SANDBOXES_ENABLED as an assertion the operator makes rather than a copy of readiness, invoke the setup doctor as npx sim-setup doctor throughout, and qualify its diagnostic mentions to Compose installs and source checkouts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(docs): account for the enterprise master switch and the doctor's Sandbox check ENTERPRISE_ENABLED resolves data drains and the Sandbox entitlement on without the per-feature flag, so describe the off state as the feature resolving off rather than the flag being unset. The setup doctor compares NEXT_PUBLIC_SANDBOXES_ENABLED with the selected provider's readiness rather than with SANDBOXES_ENABLED, so say that instead of promising a pair check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(docs): state the resolved flag conditions and the Sandbox selector exception Describe the Sandbox entitlement by how the flags resolve, since an explicit SANDBOXES_ENABLED=false overrides the master switch. Say an unset or false twin hides the login page's SSO entry point and the Sandbox selector, name that selector as the one block field that still reads the browser's own configuration, and scope the remaining setup doctor mentions to Compose installs and source checkouts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…#7466) * feat(analytics): add the Google Ads conversion tag to the gtag loader Adds AW-17916292239 as a second `config` destination on the existing GA4 gtag.js loader rather than a second `gtag/js` script tag, which is Google's documented pattern for sending one page to multiple Google products. It loads on every hosted route through GLOBAL_CONSENT_SCRIPTS, so conversion attribution is not split across a partial page set. Consent is unchanged in shape: Consent Mode v2 already maps ad_storage, ad_user_data, and ad_personalization to the `marketing` category, so a visitor who accepts measurement but declines marketing gets a cookieless ping instead of conversion tracking. Also allows the googleadservices/doubleclick origins the Ads tag reaches in script-src, connect-src, and frame-src; without them the tag would load and its conversion pings would be silently blocked. * fix(csp): gate the Google Ads frame origins behind isHosted The script-src and connect-src entries for the Ads tag were already inside the hosted-only branch, but the frame-src ones were not. The consent provider that loads the tag never mounts off hosted, so a self-hosted or dev deployment was permitting frames it can never use.
…render (#7468) React Flow v12 resolves a child node's absolute position in a single pass over the nodes array, against parents it has already adopted. A child listed before its container has its container-relative offset treated as absolute, so a block nested in a Loop or Parallel jumped out of the container on any click and only returned once a re-measurement corrected it. Blocks arrive in database row order, so a block created before the container it was later dragged into precedes that container. Sort parents first on the array each ReactFlow mount adopts, and reuse the helper for the preview's own sort.
Contributor
|
Too many files changed for review (113 files, 100 file limit). Bypass the limit by tagging |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 113 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
6 tasks
… the sidebar does (#7476)
…cy (#7474) * docs(consent): add the Google Ads cookie inventory to the Cookie Policy * docs(consent): state the regional retention of the Google Ads IDE cookie
…7475) * docs(data-drains): describe the resolved feature, not the bare flag Two things were wrong in the self-hosted flag paragraph. The first sentence attributed the page and the endpoints to `DATA_DRAINS_ENABLED` alone, which the next sentence then contradicted. `enterpriseFeatureEnabled` resolves `explicit ?? (ENTERPRISE_ENABLED || legacy default)`, and the legacy default for data drains is `false` — so the feature is on with the variable unset whenever `ENTERPRISE_ENABLED` is set, and an explicit `false` always wins. The paragraph now leads with that resolution. The rationale given for the public twin was also wrong. Inside a workspace `WorkspaceHostProvider` seeds the deployment shape from the server-resolved host context, `useDeploymentShape()` returns that seeded value, and the settings sidebar gates `data-drains` on `features.dataDrains` from it — so the page follows the server regardless of the twin, and "set it so the browser matches the server" misdescribed what the browser reads. The twin still backs `browserFallbackShape()` where nothing has seeded the shape, and it is what `sim-setup doctor` compares, so the advice to set it stands with the real reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs(data-drains): say the master switch must be true, not merely set `isEnterpriseEnabled` is `isTruthy(env.ENTERPRISE_ENABLED)`, so `ENTERPRISE_ENABLED=false` is set and still resolves off. "Is set" would have implied an unset `DATA_DRAINS_ENABLED` turns drains on there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.