Skip to content

Add a pause/play toggle for automatic rendering in the repl - #2281

Merged
NullVoxPopuli merged 2 commits into
mainfrom
nvp/pause-render
Sep 30, 2026
Merged

NullVoxPopuli merged 2 commits into
mainfrom
nvp/pause-render

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a pause button to the editor toolbar. While paused, edits do not compile the output. A Render button, shown only while paused, compiles the current text on demand. Automatic rendering stays the default.

  • The paused state is the query param ?autorender=off, so shared links and embeds keep it. A page that loads paused still renders once.
  • Resuming renders the latest text.
  • While paused, the output reads editor.pausedFile, a snapshot of the text and format. The pause and each Render click set it, so edits do not invalidate the output.

Tests: new tests/application/auto-render-test.gts (6 pass). The full apps/repl suite passes: 73 pass, 7 skipped.

🤖 Generated with Claude Code

The toolbar gets a pause button. While paused (`?autorender=off`), edits
do not compile, and a Render button compiles the current text on demand.
The paused state lives in the URL, so shared links and embeds keep it.

The output input comes from reactiveweb's keepLatest, which holds the
last rendered file while paused. reactiveweb 1.9.4 fixes keepLatest
dropping its initial value, which a page that loads paused needs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
Project Preview URL1 Manage
Limber https://nvp-pause-render.limber-glimdown.pages.dev on Cloudflare
Tutorial https://nvp-pause-render.limber-glimmer-tutorial.pages.dev on Cloudflare

Logs

Footnotes

  1. if these branch preview links are not working, please check the logs for the commit-based preview link. There is a character limit of 28 for the branch subdomain, as well as some other heuristics, described here for the sake of implementation ease in deploy-preview.yml, that algo has been omitted. The URLs are logged in the wrangler output, but it's hard to get outputs from a matrix job. ↩

Comment thread apps/repl/app/services/editor.ts Outdated
#seenRenderRequests = -1;

render = () => {
this.renderRequests++;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

never do this, this is stupid

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed in c90cacd. The Render button now stores a snapshot of the text and format in pausedFile, and the output reads that snapshot while paused.

Comment thread apps/repl/app/services/editor.ts Outdated
@use renderInput = keepLatest({
when: () => !this.autoRender,
value: () => {
if (!this.autoRender && this.renderRequests === this.#seenRenderRequests) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

we don't need to check render requests at all

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed in c90cacd, together with keepLatest. renderInput is now this.pausedFile ?? <current file>. The first edit after a Render click no longer compiles again, so that test is a normal test now.

The Render button and the pause now store the current text and format
in `pausedFile`. While paused, the output reads that snapshot, so edits
do not invalidate it. This replaces the `renderRequests` counter and
`keepLatest`.

The first edit after a Render click no longer compiles the same text
again, so that test is no longer a QUnit `todo`.

Without `keepLatest`, the repl does not need reactiveweb 1.9.4, so the
dependency bump is reverted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@NullVoxPopuli
NullVoxPopuli merged commit a866530 into main Sep 30, 2026
11 checks passed
@NullVoxPopuli
NullVoxPopuli deleted the nvp/pause-render branch September 30, 2026 15:33
@github-actions github-actions Bot mentioned this pull request Sep 25, 2026
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.

2 participants