Skip to content

feat: compare generated output with an esnext baseline - #480

Merged
Dunqing merged 6 commits into
mainfrom
feat/compare-output
Nov 13, 2026
Merged

Dunqing merged 6 commits into
mainfrom
feat/compare-output

Conversation

@Dunqing

@Dunqing Dunqing commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Add Compare beside Run output. Run output executes the generated code; Compare executes the same source as an esnext baseline alongside the configured output. Each side has an independent sandbox, console, and status. Compare stays active, so it reads Recompare after a comparison, and Run output returns to the single output console.

The baseline shares the parser settings, lowers TypeScript/JSX, and disables minification, define/inject replacements, and optional transforms. It is compiled only while Compare is active. The active mode is saved in share URLs.

Builds on the runner merged in oxc-project/playground#478. Run remains available without pre-run validation. The manifest and lockfile are unchanged.

Validation:

  • Formatting, lint, Vue type checking, and the production build pass.
  • Verified in Chrome that Run output and Rerun execute the output alone, Compare and Recompare execute both sides and keep the comparison, Run output returns to the single console, Stop cancels both sandboxes, and a saved Compare URL does not execute code.
  • Manually verified define isolation, TypeScript baseline execution, independent runtime errors, generated helpers, clear and collapse/expand, the 500-entry history cap, URL persistence, and tablet/desktop layouts in Chrome.

AI assistance was used for implementation and verification.

@github-actions

Copy link
Copy Markdown
Contributor

Wait for baseline compilation and updated props before starting both
sandboxes. Opening a saved Compare URL still waits for a user action.
@Dunqing
Dunqing force-pushed the feat/compare-output branch from a33a570 to 5f0f915 Compare November 12, 2026 14:35
@github-actions

Copy link
Copy Markdown
Contributor

Clicking Compare always starts a comparison and stays active, so it
reads Recompare once a comparison has run. Run output executes the
output alone and returns to the single console, replacing the mode
toggle that cleared the results when clicked a second time.
@github-actions

Copy link
Copy Markdown
Contributor

Render the output console once across execution modes, derive completion
from activity messages, and avoid deep-cloning baseline defaults on
every source edit.
Keep the previous result visible while buffering the current run. Replace
it on completion, failure, or Stop, and discard unfinished results when
source edits invalidate the run. Clear removes displayed and buffered
entries.

Hide running and waiting labels and delay transient execution controls
so quick reruns do not flash intermediate states.
@github-actions

Copy link
Copy Markdown
Contributor

Show a spinner and Running or Comparing on the active action after
150ms, without adding running indicators to the output consoles.
Give both actions a pressed response and accessible busy state while
preserving the previous output until execution finishes.
@github-actions

Copy link
Copy Markdown
Contributor

@Dunqing
Dunqing merged commit c9c098f into main Nov 13, 2026
4 checks passed
@Dunqing
Dunqing deleted the feat/compare-output branch November 13, 2026 02:29
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