Skip to content

Strengthen the playground-ownership decision with technical evidence - #17

Merged
KolesnikovKirill merged 2 commits into
mainfrom
docs/playground-line-ownership
Sep 4, 2026
Merged

KolesnikovKirill merged 2 commits into
mainfrom
docs/playground-line-ownership

Conversation

@KolesnikovKirill

@KolesnikovKirill KolesnikovKirill commented Sep 3, 2026

Copy link
Copy Markdown
Member

What and why

Playground was the last unread item on the "not yet ported" list. This closes the question with evidence, not a new decision — docs/architecture/playground-ownership.md already decided it on 2026-08-13. This branch strengthens that document rather than duplicating it (see below).

Why this isn't "the icon question again"

Every other retained piece turned out to be portable once read closely enough. Icons looked like a 2,135-line rendering engine nobody wanted to duplicate, and turned out to be static data once precomputed — 116 icons, a fixed number of combinations, computed once and shipped to both platforms.

Playground doesn't have that shape:

self.addEventListener('message', (event) => {
  const request = event.data;
  // ... transpiles request.sources with the TypeScript compiler ...
  self.postMessage({ type: 'result', id: request.id, outputs: [] });
});
export function runInIframe(iframe: HTMLIFrameElement, html: string): void {
  iframe.setAttribute('sandbox', 'allow-scripts');
  iframe.srcdoc = html;
}

Worker and HTMLIFrameElement aren't a framework choice Vue happened to make — they're what a live, reactive, sandboxed preview of arbitrary just-typed code requires. A PHP request answers one request with one response; it can't host a running session watching for the next keystroke. An icon's output is a pure function of three known values. Playground's output is a pure function of whatever someone is typing right now — not a harder version of the same precomputation problem, a different one.

Nothing in the CodeMonster line (ui-vue, ui-layouts, ui-runtime, ui-icons) depends on any of the three playground packages — confirmed by grep, not assumed.

A correction made mid-branch

The first version of this PR added a new file, playground-line-ownership.md, without checking whether this question had already been decided. It had — playground-ownership.md, 2026-08-13, with a thorough package-boundary and threat-model argument reaching the same conclusion. A second file saying the same thing under a near-identical name would have fragmented one decision across two documents that don't reference each other, which is exactly the kind of stale-pointer problem this repo has spent the past several branches correcting.

The fix: the new technical evidence (the two snippets above, and the explicit contrast with icons) is now a section inside the existing document, under a Revisited: 2026-09-03 line, rather than a rewrite of reasoning that was already correct.

What's in the PR now

  • docs/architecture/playground-ownership.md gains a "Why this held up under the same test that moved icons and layouts" section.
  • The three retain entries in the maturity backlog get reasons that cite that document.
  • CodeBlock is deliberately left out — it has no comparable browser-only primitive forcing the same conclusion (Shiki already runs server-side in Node during Vue SSR) and is a real, open engineering tradeoff rather than a settled question. It's getting its own read in a follow-up.

Checks

npm run verify passes in full.

…wledgement

Every other piece that was retained turned out to be portable once read closely
enough: icons looked like a rendering engine that would have to be duplicated,
and turned out to be static data once precomputed. Playground is not that shape,
and this writes down why rather than leaving the migration map's "retain" read
as a placeholder for a future branch.

packages/playground-core/src/typescriptWorker.js transpiles with a real Worker.
packages/playground-core/src/runtimes/browserRuntime.ts runs the result in an
HTMLIFrameElement it sandboxes. Neither has a server equivalent, not because of
a framework choice but because the whole premise -- a live, reactive preview of
code someone is still typing -- has no request/response analog. An icon's output
is a pure function of three known values; Playground's output is a pure function
of the next keystroke, which is not a harder version of the same problem.

Nothing in the CodeMonster line depends on any of the three playground packages.
They stay retain in the migration map, now for a documented reason with the
technical evidence behind it, cited from the maturity backlog entries. CodeBlock
is left out on purpose -- syntax highlighting has no comparable browser-only
primitive forcing the same conclusion, and deserves its own reading rather than
riding on this one.

Also removed a stale entry from check:frozen-showcase's acknowledgedChanges.
Its one entry described an import-path fix from the icons branch that has since
merged to main, so the change it acknowledged no longer differs -- exactly the
staleness the check exists to catch, catching itself.
…w file

docs/architecture/playground-ownership.md already decided this on 2026-08-13,
with a thorough package-boundary and threat-model argument. Adding a second file
reaching the same conclusion under a near-identical name would have fragmented
one decision across two documents that don't reference each other -- exactly the
kind of stale-pointer problem this repo has been correcting all week.

The prior document didn't yet have the technical proof (Worker, HTMLIFrameElement
have no server equivalent) or the explicit contrast with icons -- a decision
worth re-checking after icons and layouts both turned out portable once read
closely enough. That's now a section in the existing file under a Revisited
date, not a rewrite of reasoning that was already correct.
@KolesnikovKirill KolesnikovKirill changed the title Record why Playground stays VueForge-only Strengthen the playground-ownership decision with technical evidence Sep 3, 2026
@KolesnikovKirill
KolesnikovKirill merged commit 16ff9ea into main Sep 4, 2026
9 checks passed
@KolesnikovKirill
KolesnikovKirill deleted the docs/playground-line-ownership branch September 4, 2026 12:22
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.

1 participant