Title: feat(consent): manage cookies from Settings, not from a card in the workspace by waleedlatif1 · Pull Request #6835 · simstudioai/sim · GitHub
Open Graph Title: feat(consent): manage cookies from Settings, not from a card in the workspace by waleedlatif1 · Pull Request #6835 · simstudioai/sim
X Title: feat(consent): manage cookies from Settings, not from a card in the workspace by waleedlatif1 · Pull Request #6835 · simstudioai/sim
Description: Summary Follow-up to #6832. The consent banner mounted in the root layout, so it appeared on every page — including inside the product. This moves in-app consent to Settings and fixes the theme mismatch the banner was working around rather than papering over it. The banner never appears in the workspace ConsentProvider returns before the dynamic() boundary on any /workspace path, so the product pays neither the consent chunk nor its init request — the surface with the most hard page loads. Gating inside the lazily-loaded module would still have downloaded it. Consent inside the product is managed from Settings → Privacy instead, which is the documented pattern for authenticated surfaces: a floating card is the wrong shape once someone is signed in. One store, structurally The banner sits behind an ssr: false boundary that cannot wrap the app, so nothing reaches its store through React context. Both surfaces therefore mount their own provider — but getOrCreateConsentRuntime caches manager and store by the option values, so they share one of each. CONSENT_OPTIONS now lives inside ConsentStoreProvider and is not exported, which makes that invariant unbreakable rather than conventional. Verified directly rather than trusting the docs: same store instance: true same manager instance: true different backendURL -> different store: true The theme fix, at the cause The banner previously pinned the light token layer with a comment explaining why. The actual problem is that LandingShell pins light on a wrapper inside the page while keeps the visitor's theme, so any landing route missing from ThemeProvider's hand-written list rendered a light page under dark root chrome — scrollbars, color-scheme, and anything portalled to . LANDING_ROUTES becomes one source of truth in lib/landing/routes.ts, read by both next.config.ts (COEP exemptions) and ThemeProvider (forced light). That is the same drift that let /cookie-policy ship without its COEP exemption in the last PR. The banner now simply inherits the theme. Two pre-existing gaps closed along the way: /cli/auth and /credential-groups/complete both render AuthShell (which pins light) and were in neither list. Type of Change New feature Bug fix Testing type-check, lint:check, all 29 check:audits, and 155 tests pass. Diffed forced-light behavior old vs new across every real route: 16 landing routes gain the correct theme, nothing regresses in the other direction. Browser-verified the theme inheritance: /pricing under a dark system theme renders with a light card; /playground renders with a #1b1b1b card. The banner no longer decides for itself. /workspace needs auth, so the gate is covered by tests asserting the dynamic loader is never invoked on /workspace, /workspace/abc, /workspace/abc/logs — verified those fail when the gate is removed. Reviewers should focus on the ThemeProvider change: it moves from startsWith prefix matching to first-segment set membership, and that route-classification diff is the riskiest part of this PR. Known gap (unchanged from #6832) Prior blocking is still not implemented — GTM, GA, and PostHog load before consent. This PR makes that more load-bearing, not less: a visitor who reaches the workspace with no consent record is now never prompted. It closes properly when the analytics scripts move behind consent, since nothing non-essential loads without a record at all. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Follow-up to #6832. The consent banner mounted in the root layout, so it appeared on every page — including inside the product. This moves in-app consent to Settings and fixes the theme mis...
X Description: Summary Follow-up to #6832. The consent banner mounted in the root layout, so it appeared on every page — including inside the product. This moves in-app consent to Settings and fixes the theme mis...
Opengraph URL: https://github.com/simstudioai/sim/pull/6835
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fac6c618-798e-7ea9-88c5-6671089a4c31 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8518:F138D:E25616:135D1AC:6AFB5D55 |
| html-safe-nonce | c4ebb9769c3ee3a4e8800e8f6cf5de6ad6606509f2b7b72279b969ca432ecf4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTE4OkYxMzhEOkUyNTYxNjoxMzVEMUFDOjZBRkI1RDU1IiwidmlzaXRvcl9pZCI6IjY2NDcxMTEyOTE0MTAwMTM1MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 28b7dc0100f0d276e9d9483cb785958c2be6b079d0f831f553a7f0bd102c5564 |
| hovercard-subject-tag | pull_request:4309694015 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6835/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Follow-up to #6832. The consent banner mounted in the root layout, so it appeared on every page — including inside the product. This moves in-app consent to Settings and fixes the theme mis... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width