Review follow-ups: snap-back fix, faster reference orbits, idle PWA reload, cache headers - #92
Merged
Merged
Conversation
Rebase the requested centre onto the new anchor and re-apply any pan, keyboard or wheel movement made since the request, instead of snapping back. Record the requested offset/zoom so the debounce re-requests a reference when the view has moved. Tag worker requests with an id and drop results from superseded requests.
Return only the computed orbit points instead of a zero-padded max_iter buffer, and derive the valid reference length from the orbit size rather than scanning it on the main thread.
Fractious.interact owns centre pin visibility (it also hides it after the debounce), so drop the duplicate toggle in InteractionManager. state.pointers is always a Map, offsets are always defined and the renderer always provides onSubmittedWorkDone, so remove the defensive checks and optional chaining.
…hor's search orbit The anchor search already iterates the winning point in arbitrary precision, so compute_reference records the GPU layout for the likely winners (view centre and refined hotspot) during the search and extends that orbit instead of iterating it again. find_best_anchor/calculate_reference are replaced by one export and the iteration upgrade moves into Rust.
With skipWaiting/clientsClaim the new service worker takes control straight away, but an open page keeps running the old code until it is relaunched. Reload once the page is hidden or the user has been idle for a few seconds; the URL holds the whole view, so it comes back to the same place. Also check for updates whenever the app is resumed.
The /index.html rule did not match requests for /, so the entry page fell back to default caching. Apply no-cache to /, /index.html, /sw.js and /manifest.json so new deployments are picked up promptly; hashed assets stay immutable.
|
Visit the preview URL for this PR (updated for commit 65ad1a8): https://fractious-deep--pr92-fix-review-cleanup-a-2t6ow30m.web.app (expires Fri, 02 Oct 2026 08:04:51 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 348393a9746312ebab7a45ce5eba16e6d119af34 |
Wheel zoom followed the cursor, unlike the zoom buttons, keys and text input. It now zooms on the viewport centre like they do; pinch zoom keeps its midpoint anchor.
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.
Post-feature review clean-up. Each commit can be reverted on its own.
compute_referencereuses the winning anchor's orbit from the search instead of iterating it again, and replacesfind_best_anchor+calculate_reference. Indicative Node timings are about 20% faster at deep zooms, with identical orbits.no-cachefor/,/index.html,/sw.jsand/manifest.json. The old/index.htmlrule didn't match/.Checks: format, eslint, clippy, WGSL lint, depcruise, audit, wasm + vitest tests and size budgets all pass. WebGPU rendering was not visually verified here; benchmarking to follow.