GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Keep callback renders working after repeated updates by Seigiard · Pull Request #165 · WebReflection/uhtml

Conversation

@Seigiard

@Seigiard Seigiard commented Oct 6, 2026

Copy link
Copy Markdown

For non-engineers.

  • Problem: A page could stop refreshing after two updates.
  • Impact: New data could arrive while users still saw the old list or text until they reloaded the page.
  • What was done: Repeated updates now keep the rendering state that owns the displayed content.
  • What you will notice: New list entries and text updates appear without a page reload.

Why

Fix the third and subsequent render(container, callback) calls for an unchanged template so repeated updates remain usable.

Watch out for

Door: two-way. A plain revert restores the broken repeated-render path; this change has no persistent data effects.

  • The browser regression follows the existing HTML tests and must be opened against rebuilt bundles; the current Node test command does not run browser tests.

Shape of the change

The second render updates the initialized cached Hole, but previously stored the fresh callback result instead; the third render then interpreted raw values as prepared update entries.

-    else known[1].update(hole);
+    else {
+      known[1].update(hole);
+      hole = known[1];
+    }
     rendered.set(where, [scope, hole]);

test/render.html checks four text renders, a list changing from empty to restored to prepended entries, and DOM node identity. Serve the repository root and open /test/render.html for the development bundle or /test/render.html?prod for production.

Evidence

  • Before: The browser regression failed in headless Chromium against both unpatched bundles on the third text render: Cannot assign to read only property '2' of string 'second'. In a desktop WebKit application, the list update failed with Node.insertBefore receiving a non-Node value.
  • After: Both rebuilt bundles report PASS: repeated text and list renders for the same browser regression.
  • Visuals: Behavioural DOM assertions are the evidence; no separate screenshots.

npm run test:all and npm run types pass. Development and production bundles were rebuilt with Rollup and tested in Chromium. CI has not run for this branch yet.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Seigiard
Fix repeated callback renders
84c1259
Keep the initialized Hole in the render cache after updating it. Previously,
the second callback render cached a fresh, uninitialized Hole, so the third
render could throw and leave the DOM stale.

Add a browser regression for repeated text and list updates, including DOM
node reuse. Verify it against both development and production bundles.
Seigiard added a commit to Seigiard/scribd-dl that referenced this pull request Oct 11, 2026
@Seigiard
fix(web): keep queue updates working after repeated renders
e21617e
Pin uhtml 5.0.9 and keep its initialized render state with a local Bun
patch until upstream PR WebReflection/uhtml#165 is merged and released.
Route the default export to the patched source with debug mode disabled.
Cover prepending a pasted job after restoring a saved queue.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Seigiard
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.