Repository navigation
fix: support signals in the website playground - #1021
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
leonidaz
marked this pull request as ready for review
September 9, 2026 18:14
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Signal test omits required scopeKey
- The playground signals e2e payload now calls createScope({ scopeKey: 'shared' }), which satisfies the required nonempty scopeKey so the sandbox can mount.
Or push these changes by commenting:
@cursor push ac8a6097df
Preview (ac8a6097df)
diff --git a/website/tests/ssr-hydration.e2e.test.ts b/website/tests/ssr-hydration.e2e.test.ts
--- a/website/tests/ssr-hydration.e2e.test.ts
+++ b/website/tests/ssr-hydration.e2e.test.ts
@@ -2600,7 +2600,7 @@
name: 'App.tsrx',
source: `import { createScope } from 'octane/signals';
import { useSignal$ } from 'octane/signals/client';
-const scope = createScope();
+const scope = createScope({ scopeKey: 'shared' });
const shared$ = scope.signal$('count', 0);
export default function App() @{
const local$ = useSignal$(10);You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 32121a0. Configure here.
Contributor
|
Vercel previews for
|
14 of 21 tasks
This branch was previously deployed
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.


Summary
The playground rejected
octane/signalsandoctane/signals/clientas unavailable. Bundle both entries alongside the existing runtime, allow their imports, and map them to sandbox-local blobs so signal hooks share the preview's runtime singleton.Add a Signals example under Basics in both TSRX and TSX, demonstrating shared state, a derived value, and a component-local signal. Import-policy regressions cover both entry points, and the browser scenario selects the actual example from the dropdown and checks its interactive values.
Validation
Targeted playground tests: 46 passed across
playground-modules.test.ts,playground-runtime.test.ts, andplayground.test.ts(website-unit). Both new import tests failed before the fix with the reported rejection.Scoped
tsrx-tsccheck for the five changed files, including the browser harness declaration file.Formatting check for all changed files.
pnpm sync.Full repository tests and typechecking were not run locally. The new browser scenario was added but its local run was stopped before completion at the user's request; CI will validate it.
Signals example checks: 5 passed (
playground-examples.test.ts -t signals).Focused Chromium smoke check using the actual preview engine and sandbox: both TSRX and TSX variants render and update shared, derived, and local signals. The full website dropdown scenario remains for CI.
Scoped typecheck and formatting for the example and updated browser test.
Risk / follow-ups
The playground runtime manifest grows from 127,533 to 137,338 gzip bytes (+9,805 bytes), measured consistently across three builds of each version. Both entries use the existing code-split bundle; no core runtime or compiler source changes.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Scoped to website playground bundling, import policy, and examples; sandbox boundary rules are tightened with tests and no auth or data-path changes.
Overview
The website playground now supports
octane/signalsandoctane/signals/clientinstead of rejecting those imports.The playground runtime build adds both as code-split esbuild entries (alongside
octane,octane/react, etc.), and the sandbox import map wires them to the same local blob singletons as the rest of the runtime. The module graph allowlist and docs comments are updated so only client signal entry points pass the security boundary (octane/signals/serverstays blocked).A new Signals Basics example (
createScope, shared/derived signals,useSignal$) is in the dropdown in TSRX and TSX. Unit tests assert bare specifiers for the two paths; a Playwright scenario selects that example and checks shared, derived, and local counters update on click.The shipped runtime manifest grows by ~10KB gzip; no changes to core Octane compiler packages.
Reviewed by Cursor Bugbot for commit 3ceb3e8. Bugbot is set up for automated code reviews on this repo. Configure here.