fix: stop readability blank page, flashing, and misapplicable toggle - #848
Merged
Conversation
Toggling readability on left the localStorage-cached page state stale, so a refresh right after enabling it could apply readability before the reader actually mounted, leaving the tab blank. Also hardened the reader-mount chain (unawaited promises, no fetch timeouts) so a stall there can't blank the page either. Separately: cache the last-used theme so the loading screen no longer flashes white before switching to sepia/dark; parse a clone of the live document instead of re-fetching the page over XHR; wait for the actual web font to load (via the Font Loading API) before revealing the reader instead of flashing a fallback font; and reset the page's own body border/box-shadow behind the loader. The popup's readability toggle is now disabled on pages the reader can't apply to (e.g. a site's homepage), using the same applicability check the reader runs before mounting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019wgboauYExwrGNwKvDii92
4 tasks
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.
Summary
Test plan
yarn lintyarn jest(130 tests passing)yarn build🤖 Generated with Claude Code