Skip to content

Fix dashboard sandbox compile errors and switch smart model to Grok#1476

Merged
mantrakp04 merged 10 commits into
devfrom
fix/dashboard-sandbox-errors-and-grok-model
May 23, 2026
Merged

Fix dashboard sandbox compile errors and switch smart model to Grok#1476
mantrakp04 merged 10 commits into
devfrom
fix/dashboard-sandbox-errors-and-grok-model

Conversation

@mantrakp04
Copy link
Copy Markdown
Collaborator

@mantrakp04 mantrakp04 commented May 22, 2026

Summary

  • Forward Babel/JSX compile errors, runtime throws, and unhandled rejections from the AI dashboard sandbox iframe to the parent composer via postMessage, so users see actionable errors instead of a blank preview
  • Compile AI-generated dashboard source explicitly with Babel.transform + try/catch (stored in text/plain to avoid Babel's auto-handler swallowing parse errors) and add crossorigin="anonymous" on the Babel script for readable cross-origin error messages
  • Switch authenticated smart-tier model from moonshotai/kimi-k2.6:nitro to x-ai/grok-build-0.1

Test plan

  • Generate a dashboard with valid AI code and confirm the preview still renders
  • Generate a dashboard with invalid JSX and confirm the composer shows the compile error (not a blank iframe)
  • Trigger a runtime error in generated dashboard code and confirm it reaches the parent error boundary
  • Verify authenticated smart-tier requests route to x-ai/grok-build-0.1

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes

    • Embedded dashboards now show a clear “Dashboard failed to compile” message on compilation errors instead of a blank iframe.
    • Dashboard runtime errors and unhandled promise rejections are captured earlier and forwarded to the parent for improved visibility.
  • Updates

    • The authenticated AI model used for the "smart" quality has been changed, affecting model selection for authenticated requests.

Review Change Stack

Copilot AI review requested due to automatic review settings May 22, 2026 23:25
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-auth-mcp Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-auth-skills Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-backend Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-dashboard Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-demo Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-docs Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-preview-backend Ready Ready Preview, Comment May 23, 2026 6:54pm
stack-preview-dashboard Ready Ready Preview, Comment May 23, 2026 6:54pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Switch authenticated smart-quality backend model IDs to x-ai/grok-build-0.1 and refactor the dashboard iframe sandbox to embed the AI source as JSON, load Babel with crossorigin, install an early error bridge, compile with Babel.transform, and execute compiled code with scoped globals and a compile-failure UI.

Changes

AI Model and Sandbox Execution

Layer / File(s) Summary
Backend AI model selection
apps/backend/src/lib/ai/models.ts
MODEL_SELECTION_MATRIX.smart authenticated modelId entries changed from moonshotai/kimi-k2.6:nitro to x-ai/grok-build-0.1 for both slow and fast modes; unauthenticated entries unchanged.
Sandbox source JSON-encoding helper
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx
Added helper to JSON-encode the AI runtime source for safe embedding and to avoid literal < in the embedded payload.
Sandbox head: Babel load and early error bridge
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx
Sandbox <head> loads Babel with crossorigin="anonymous", installs window.__postDashboardError to forward error and unhandledrejection to the parent, and embeds the AI runtime source in script#ai-dashboard-source as a JSON payload.
Runtime wiring and duplicate handler removal
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx
Adjusted dependency/token initialization wiring and removed later iframe-level error/unhandledrejection listeners in favor of the early global bridge.
Sandbox compile-then-execute flow
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx
Boot parses ai-dashboard-source, compiles via window.Babel.transform(..., { presets: ['react'] }) in try/catch, posts compile errors to parent and renders fallback UI on failure, and on success executes the compiled output with new Function(...) using explicit scoped globals to obtain and render the Dashboard export.

🎯 4 (Complex) | ⏱️ ~45 minutes

sequenceDiagram
  participant Iframe as Dashboard Iframe
  participant Head as Iframe Head
  participant Babel as window.Babel
  participant Runtime as Bootstrap Runtime
  participant Parent as Parent Window

  Iframe->>Head: load Babel script (crossorigin="anonymous")
  Head->>Iframe: embed `script#ai-dashboard-source` (JSON payload)
  Iframe->>Iframe: install window.__postDashboardError (for error & unhandledrejection)
  Runtime->>Runtime: JSON.parse(ai-dashboard-source)
  Runtime->>Babel: Babel.transform(source, { presets: ['react'] })
  alt Compilation Success
    Babel-->>Runtime: compiledCode
    Runtime->>Runtime: new Function(compiledCode)(React, ReactDOM, DashboardUI, Recharts, stackServerApp)
    Runtime->>Iframe: render Dashboard export
  else Compilation Failure
    Babel-->>Runtime: throw error
    Runtime->>Parent: window.__postDashboardError(postedError)
    Runtime->>Iframe: render "Dashboard failed to compile" UI
  end
Loading

"I hopped to swap a model, tidy the nest,
Babel arrives with crossorigin dressed,
Errors I send so they don't hide,
I compile, I run — dashboard's pride.
— 🐰"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes in the pull request: fixing dashboard sandbox compile errors and switching the smart model to Grok.
Description check ✅ Passed The pull request description includes a clear summary of changes, detailed context about implementation approach, and a comprehensive test plan covering all key aspects of the changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dashboard-sandbox-errors-and-grok-model

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 22, 2026

Greptile Summary

This PR improves error visibility in the AI dashboard sandbox by forwarding Babel compile errors, runtime throws, and unhandled rejections to the parent composer via postMessage, and swaps the authenticated smart-tier model from moonshotai/kimi-k2.6:nitro to x-ai/grok-build-0.1.

  • Sandbox error forwarding: A plain <script> block (before Babel loads) installs window.error and unhandledrejection listeners and exposes window.__postDashboardError, replacing the duplicate listeners that previously lived inside the <script type="text/babel"> block. The AI source is now stored in a <script type="application/json"> tag with JSON encoding (<\u003c) instead of the old text/plain + regex-escape approach, eliminating the </script>-injection risk flagged in earlier review.
  • Explicit Babel compile step: window.Babel.transform is called inside the .then() body with a try/catch; on failure it renders an in-iframe error UI, calls window.__postDashboardError, and returns early. The compiled output is then executed via new Function with React, ReactDOM, DashboardUI, Recharts, and stackServerApp as explicit scope parameters.
  • Model config change: Both slow.authenticated and fast.authenticated under the smart quality now point to x-ai/grok-build-0.1.

Confidence Score: 5/5

Safe to merge — the sandbox changes are a well-scoped improvement to error surfacing with no regressions to the happy path, and the model swap is a single config line.

The two previously flagged issues (duplicate error listeners and </script> injection via text/plain) are both resolved cleanly. The new application/json + JSON-encoding approach is correct and safe. The Babel.transform + new Function execution path scopes variables explicitly and handles the compile-error branch without double-reporting. The model change is a trivial string swap with no surrounding logic touched.

No files require special attention.

Important Files Changed

Filename Overview
apps/backend/src/lib/ai/models.ts Single-line model swap: replaces moonshotai/kimi-k2.6:nitro with x-ai/grok-build-0.1 for both slow and fast authenticated smart-tier paths. No logic changes.
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx Replaces inline JSX injection (escapeScriptContent + IIFE in text/babel) with JSON-encoded source in an application/json tag, explicit Babel.transform with a try/catch compile-error path, and new Function execution with explicit scope parameters. Moves window error/unhandledrejection listeners to an early plain script before Babel loads, addressing the previous duplicate-listener and </script>-injection issues.

Reviews (3): Last reviewed commit: "Enhance error handling in dashboard sand..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the AI dashboard sandbox preview experience by surfacing compilation/runtime failures from the sandboxed srcDoc iframe back to the dashboard composer, and updates the backend “smart” authenticated model routing to use Grok.

Changes:

  • Add iframe → parent error forwarding for compile/runtime errors, and compile AI-generated JSX explicitly via Babel.transform with a try/catch to surface parse errors.
  • Adjust Babel loading to improve cross-origin error readability (crossorigin="anonymous").
  • Switch authenticated smart-tier model selection from moonshotai/kimi-k2.6:nitro to x-ai/grok-build-0.1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx Enhances sandbox iframe error reporting and changes how AI code is compiled/executed.
apps/backend/src/lib/ai/models.ts Updates smart-tier authenticated model ID selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Duplicate error event listeners cause duplicate error messages to be sent to parent component

Fix on Vercel

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx (1)

486-501: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Duplicate error/unhandledrejection listeners.

These event listeners are duplicates of the ones installed earlier at lines 362-369 in the IIFE block. Both register handlers for 'error' and 'unhandledrejection' that post the same 'dashboard-error-boundary' message to the parent. This causes each error to be reported twice.

Remove these duplicate listeners since the early IIFE (lines 350-371) already covers this case and runs before any AI code.

Proposed fix
-      // Forward uncaught runtime errors (async throws, unhandled rejections) that never
-      // reach the React boundary. React ErrorBoundary alone misses these, so without this
-      // the parent has no way to observe e.g. a fetch() that rejected inside useEffect.
-      window.addEventListener('error', (event) => {
-        const err = event?.error;
-        window.parent.postMessage({
-          type: 'dashboard-error-boundary',
-          message: err?.message || event?.message || 'Unknown runtime error',
-          stack: err?.stack,
-        }, '*');
-      });
-      window.addEventListener('unhandledrejection', (event) => {
-        const reason = event?.reason;
-        window.parent.postMessage({
-          type: 'dashboard-error-boundary',
-          message: (reason && (reason.message || String(reason))) || 'Unhandled promise rejection',
-          stack: reason?.stack,
-        }, '*');
-      });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`
around lines 486 - 501, Remove the duplicate global error handlers that post
'dashboard-error-boundary' to the parent: delete the second pair of
window.addEventListener calls for 'error' and 'unhandledrejection' in
dashboard-sandbox-host.tsx (the handlers that extract event?.error /
event?.reason and call window.parent.postMessage with type
'dashboard-error-boundary'); rely on the existing IIFE-installed listeners (the
earlier IIFE block that already registers 'error' and 'unhandledrejection') so
each runtime error or promise rejection is reported only once.
🧹 Nitpick comments (1)
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx (1)

566-570: 💤 Low value

Add defensive check for missing source element.

If ai-dashboard-source element is somehow missing, aiSource becomes an empty string, which would then fail during execution with a confusing "Dashboard component not found" error rather than a clear message about the missing source.

Proposed improvement
         const aiSourceEl = document.getElementById('ai-dashboard-source');
-        const aiSource = aiSourceEl ? aiSourceEl.textContent : '';
+        if (!aiSourceEl) {
+          throw new Error('AI dashboard source element not found');
+        }
+        const aiSource = aiSourceEl.textContent || '';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`
around lines 566 - 570, The code assumes
document.getElementById('ai-dashboard-source') exists; add a defensive check
after retrieving aiSourceEl (and before calling window.Babel.transform) to
handle a missing element or empty source: if aiSourceEl is null or aiSource is
empty, throw or log a clear error like "Missing ai-dashboard-source element or
empty dashboard source" and bail early (so compiledSource isn't attempted);
update the block that references aiSourceEl, aiSource and compiledSource and
ensure any downstream logic that expects compiledSource handles this early-exit
path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`:
- Around line 486-501: Remove the duplicate global error handlers that post
'dashboard-error-boundary' to the parent: delete the second pair of
window.addEventListener calls for 'error' and 'unhandledrejection' in
dashboard-sandbox-host.tsx (the handlers that extract event?.error /
event?.reason and call window.parent.postMessage with type
'dashboard-error-boundary'); rely on the existing IIFE-installed listeners (the
earlier IIFE block that already registers 'error' and 'unhandledrejection') so
each runtime error or promise rejection is reported only once.

---

Nitpick comments:
In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`:
- Around line 566-570: The code assumes
document.getElementById('ai-dashboard-source') exists; add a defensive check
after retrieving aiSourceEl (and before calling window.Babel.transform) to
handle a missing element or empty source: if aiSourceEl is null or aiSource is
empty, throw or log a clear error like "Missing ai-dashboard-source element or
empty dashboard source" and bail early (so compiledSource isn't attempted);
update the block that references aiSourceEl, aiSource and compiledSource and
ensure any downstream logic that expects compiledSource handles this early-exit
path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a00205d3-1555-41e9-8755-7a696aa186dc

📥 Commits

Reviewing files that changed from the base of the PR and between 9355c86 and f2d62da.

📒 Files selected for processing (2)
  • apps/backend/src/lib/ai/models.ts
  • apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx

Forward Babel/JSX parse failures from the AI dashboard iframe to the parent composer instead of showing a blank preview, and use x-ai/grok-build-0.1 for authenticated smart-tier requests.
Updated the dashboard sandbox to replace script closing tags in the source code to prevent parsing issues. Removed redundant global error listeners, as uncaught runtime errors and unhandled rejections are now handled by an early listener installed before Babel loads.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx (1)

486-501: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Duplicate error listeners cause double error reporting.

These error and unhandledrejection listeners duplicate the ones installed earlier (lines 362-369). Both fire for the same event, so onRuntimeError is invoked twice per error. Remove this block since the early listener already covers runtime errors.

Proposed fix: remove duplicate listeners
-      // Forward uncaught runtime errors (async throws, unhandled rejections) that never
-      // reach the React boundary. React ErrorBoundary alone misses these, so without this
-      // the parent has no way to observe e.g. a fetch() that rejected inside useEffect.
-      window.addEventListener('error', (event) => {
-        const err = event?.error;
-        window.parent.postMessage({
-          type: 'dashboard-error-boundary',
-          message: err?.message || event?.message || 'Unknown runtime error',
-          stack: err?.stack,
-        }, '*');
-      });
-      window.addEventListener('unhandledrejection', (event) => {
-        const reason = event?.reason;
-        window.parent.postMessage({
-          type: 'dashboard-error-boundary',
-          message: (reason && (reason.message || String(reason))) || 'Unhandled promise rejection',
-          stack: reason?.stack,
-        }, '*');
-      });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`
around lines 486 - 501, Remove the duplicate runtime error handlers: delete the
window.addEventListener('error', ...) and
window.addEventListener('unhandledrejection', ...) blocks that post messages
with type 'dashboard-error-boundary' (the block that constructs message/stack
and posts to window.parent). Those listeners duplicate the earlier installed
handlers (which call onRuntimeError), so removing this block will stop
double-reporting; ensure no other code depends on these specific registrations.
🧹 Nitpick comments (1)
apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx (1)

566-570: ⚡ Quick win

Add defensive check for Babel.transform result.

window.Babel.transform(...) returns an object with a code property, but if Babel fails to load or the transform returns unexpectedly, accessing .code could throw. A defensive check aligns with the coding guidelines.

Proposed fix
         let compiledSource;
         try {
-          compiledSource = window.Babel.transform(aiSource, { presets: ['react'] }).code;
+          const transformResult = window.Babel.transform(aiSource, { presets: ['react'] });
+          if (!transformResult || typeof transformResult.code !== 'string') {
+            throw new Error('Babel transform returned invalid result');
+          }
+          compiledSource = transformResult.code;
         } catch (err) {

Based on coding guidelines: "Use defensive coding with ?? throwErr(...) over non-null assertions and fallback values".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`
around lines 566 - 570, The code directly accesses
window.Babel.transform(...).code which can throw if Babel is missing or
transform returns unexpectedly; change the block to first capture the transform
result (e.g., const transformResult = window.Babel.transform(aiSource, {
presets: ['react'] })) and then set compiledSource = transformResult.code ??
throwErr('Babel transform returned no code') (or throw a descriptive error) so
you defensively handle a missing transform result; update references to
compiledSource and the window.Babel.transform call in dashboard-sandbox-host.tsx
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`:
- Around line 486-501: Remove the duplicate runtime error handlers: delete the
window.addEventListener('error', ...) and
window.addEventListener('unhandledrejection', ...) blocks that post messages
with type 'dashboard-error-boundary' (the block that constructs message/stack
and posts to window.parent). Those listeners duplicate the earlier installed
handlers (which call onRuntimeError), so removing this block will stop
double-reporting; ensure no other code depends on these specific registrations.

---

Nitpick comments:
In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`:
- Around line 566-570: The code directly accesses
window.Babel.transform(...).code which can throw if Babel is missing or
transform returns unexpectedly; change the block to first capture the transform
result (e.g., const transformResult = window.Babel.transform(aiSource, {
presets: ['react'] })) and then set compiledSource = transformResult.code ??
throwErr('Babel transform returned no code') (or throw a descriptive error) so
you defensively handle a missing transform result; update references to
compiledSource and the window.Babel.transform call in dashboard-sandbox-host.tsx
accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 75da2d4b-f29a-40b2-abfc-9567320469ad

📥 Commits

Reviewing files that changed from the base of the PR and between f2d62da and 8685ca0.

📒 Files selected for processing (2)
  • apps/backend/src/lib/ai/models.ts
  • apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx
✅ Files skipped from review due to trivial changes (1)
  • apps/backend/src/lib/ai/models.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx`:
- Around line 541-546: The current JSON.parse swallow hides parse errors for
aiSource causing misleading downstream failures; update the parsing around
aiSource/aiSourceEl so that instead of setting aiSource = '' on parse failure
you throw a descriptive error (or rethrow the original) that includes the
invalid aiSourceEl.textContent and the parse exception; locate the block that
declares aiSource and uses JSON.parse and replace the silent catch with code
that constructs and throws a new Error (or rethrows) containing both context
("Failed to parse aiSource from aiSourceEl") and the original exception/message
so callers fail fast with a clear diagnostic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 512b93af-2c05-448c-b146-f7e3d1e5261b

📥 Commits

Reviewing files that changed from the base of the PR and between b5b70a1 and 84f21fe.

📒 Files selected for processing (1)
  • apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx

…xtraction and improving JSON parsing feedback.
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

1 issue found across 4 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/backend/src/route-handlers/smart-request.tsx
mantrakp04 and others added 2 commits May 23, 2026 11:45
Copy link
Copy Markdown

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

User fetching logic removed the fallback to getUser() for non-hosted sourceOfTruth, causing auth.user to be undefined for authenticated requests on projects with external databases

Fix on Vercel

Copy link
Copy Markdown

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

User fetching logic removed the fallback to getUser() for non-hosted sourceOfTruth, causing auth.user to be undefined for authenticated requests on projects with external databases

Fix on Vercel

@mantrakp04 mantrakp04 merged commit 10df9b2 into dev May 23, 2026
34 of 39 checks passed
@mantrakp04 mantrakp04 deleted the fix/dashboard-sandbox-errors-and-grok-model branch May 23, 2026 19:34
@mantrakp04 mantrakp04 mentioned this pull request May 23, 2026
7 tasks
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.

3 participants