Standardize all playground pages on the interactive runtime - #247
Merged
Conversation
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/e0636dcd-c168-47cf-96f3-cdf613c61e56 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix playgrounds formatting and add tests for functionality
Standardize all playground pages on the interactive runtime
Apr 29, 2026
mrjf
marked this pull request as ready for review
April 30, 2026 05:35
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.
Of 130 pages under
playground/, only 31 used the working interactive template. The other 99 were broken in two distinct ways: 79 referenced a non-existentstyle.css/runtime.js(no styles → "single-row" layout, no execution), and 20 loadedplayground-runtime.jsbut never created any.playground-blockmarkup (light theme, non-interactive).Changes
tests/playground.test.ts— new conformance suite asserting everyplayground/*.html(except the landing page) loadsplayground-runtime.js, has a#playground-loadingoverlay, contains.playground-block/.playground-editor/.playground-run/.playground-output, uses the dark-theme CSS variables, and does not reference the legacy missingstyle.cssor./runtime.js.<pre>,<pre><code>,<div class="code-block">, and<textarea>containers and re-emitted each page with the canonical dark-theme styles, loading overlay, per-snippet.playground-blockeditors, and the shared<script type="module" src="playground-runtime.js">.import { … } from "tsb"):const { X, Y } = tsb;→import { X, Y } from "tsb";(anchored so destructuring likeconst { codes } = tsb.factorize(...)is left for the next rule)tsb.foo(...)→ collect referenced names, prepend a singleimport { foo, … } from "tsb";, strip thetsb.prefixdate_range.html,timestamp.html,benchmarks.html): seed a starter.playground-blockwith imports/constructors discovered in the page's own scripts, keeping the page interactive.The conformance test now covers all 130 pages with 1162 assertions; running it with the previous content surfaced 666 failures across the broken pages, which is the regression guard going forward.