fix(environments): revoke library blob urls only after their replacement lands - #40
Merged
Merged
Conversation
…ent lands
refreshEnvLibrary revoked the previous folder's blob urls on its first line and
then awaited the replacement, so between the two the stage and the picker still
referenced urls that no longer resolved. Revocation does not blank an image that
already decoded, so nothing looked wrong — but a fresh load of those urls failed,
which is exactly what remounting the accordion does.
Hold the previous list in a local and drop it once the replacement is in state.
The cancelled path deliberately does not revoke it: a newer run captured the same
list and is responsible for retiring it, so revoking here would reintroduce the
early-revoke window one level up.
Verified with a probe that hooks URL.revokeObjectURL and tests every blob url the
DOM and --holo-image reference for liveness. Same folder switch, same protocol,
only this change differing:
before t+42ms referenced=1 dead=1 | fresh <img> for a dead url FAILED
window ended: CONFIRMED — the ui referenced revoked urls
after t+10ms referenced=1 dead=0
t+10319ms referenced=1 dead=0
window ended: clean — referenced urls stayed alive throughout
The reference now also survives the whole load rather than vanishing once React
falls back to a bundled environment, so the old background stays visible until
the new folder is ready.
Closes ARPAHLS#39.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… changelog Also revoke the just-loaded blob list when error/empty paths clear the library, and add an Unreleased Fixed entry for the revoke-after-replace ordering (ARPAHLS#39, ARPAHLS#40).
rosspeili
force-pushed
the
fix/env-blob-revoke-order
branch
from
August 7, 2026 11:07
03c91ff to
9436620
Compare
Contributor
|
Thanks @AUDOSt0ck1ng, also confirmed. Pushed a small follow-up on this branch: |
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.
Closes #39.
refreshEnvLibraryrevoked the previous folder's blob URLs on its first line andthen awaited the replacement, leaving the stage and the picker pointing at URLs
that no longer resolved. Already-decoded images survive revocation so nothing
looked wrong on screen, but a fresh load of those URLs failed — which is what
remounting the accordion does.
The previous list is now held in a local and dropped once the replacement is in
state. The cancelled path deliberately does not revoke it: a newer run captured
the same list and owns retiring it, so revoking there would just move the
early-revoke window up a level.
Verification
Probe hooks
URL.revokeObjectURLand tests every blob URL the DOM and--holo-imagereference for liveness. Identical folder switch and protocolacross both runs; this change is the only variable:
<img>for a dead urlCONFIRMED — the ui referenced revoked urlsclean — referenced urls stayed alive throughoutThe reference also survives the whole load now instead of disappearing once
React falls back to a bundled environment, so the old background stays visible
until the new folder is ready.
Scope
Only the environments library path. Does not touch #22 — that investigation ruled
out the main thread and is waiting on reporter info.
🤖 Generated with Claude Code