Skip to content

v0.8.22: ui fixes, library, env resolution hardening - #7473

Merged
waleedlatif1 merged 13 commits into
mainfrom
staging
Sep 4, 2026
Merged

v0.8.22: ui fixes, library, env resolution hardening#7473
waleedlatif1 merged 13 commits into
mainfrom
staging

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

icecrasher321 and others added 10 commits September 3, 2026 16:34
…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.
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner September 4, 2026 02:50
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review (113 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 4, 2026 3:42am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 113 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/consent/scripts.ts
Comment thread apps/sim/app/workspace/[workspaceId]/settings/navigation.ts
Comment thread apps/docs/content/docs/platform/enterprise/data-drains.mdx Outdated
Comment thread apps/sim/lib/core/config/deployment-shape.ts
…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>
@waleedlatif1
waleedlatif1 merged commit 7945b29 into main Sep 4, 2026
64 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants