Repository navigation
1.16 part 5/18: Reader, offline use and the debug log in the browser - #176
Closed
epheterson wants to merge 1 commit into
Closed
epheterson wants to merge 1 commit into
epheterson wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Sorry @epheterson, your pull request is larger than the review limit of 150,000 diff characters |
Merged
epheterson
force-pushed
the
line/1.16.0-04-home
branch
from
November 23, 2026 10:07
cfb33ea to
ef1e24e
Compare
epheterson
force-pushed
the
line/1.16.0-05-reader-offline
branch
from
November 23, 2026 10:07
8d887d4 to
f2b5371
Compare
epheterson
force-pushed
the
line/1.16.0-04-home
branch
from
November 23, 2026 10:51
ef1e24e to
581db33
Compare
epheterson
force-pushed
the
line/1.16.0-05-reader-offline
branch
from
November 23, 2026 10:51
f2b5371 to
a580fe5
Compare
epheterson
force-pushed
the
line/1.16.0-04-home
branch
from
November 23, 2026 16:37
581db33 to
958e666
Compare
epheterson
force-pushed
the
line/1.16.0-05-reader-offline
branch
from
November 23, 2026 16:37
a580fe5 to
7099487
Compare
epheterson
force-pushed
the
line/1.16.0-04-home
branch
from
November 23, 2026 16:44
958e666 to
bb63006
Compare
epheterson
force-pushed
the
line/1.16.0-05-reader-offline
branch
from
November 23, 2026 16:44
7099487 to
f6877ee
Compare
Owner
Author
|
Reviewed here; included in the release PR #189. |
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.
Part 5 of 18 of Zimi 1.16.0: Reader, offline use and the debug log in the browser. Base:
line/1.16.0-04-home(part 4); the diff shows only this part's files. The PR carries thenot-a-releaselabel and the version stays 1.15.7, so merging it cuts no release. Merge in order (1 to 17, then 18) with a merge commit, not a squash.What this is
The readers, the service worker and the pages that open inside the reader, in the browser. A kept app opens offline with its stylesheet, big PDFs and split or main-page-less books open or say why they cannot, the debug log has its browser half, and Create offers a one-tap install where a capability is missing. Most of the change is in
sw.js,debuglog.jsandcreate.js; the rest is small edits to the readers and app pages.What changes
zimi/static/sw.js:keepShellAssetskeeps the stylesheets and scripts the kept shell names, tries three times, and fails the install when one is still missing, so a worker in charge never serves the header alone offline.refreshShellno longer replaces the kept shell with a shell of another build (it asks the worker to update instead).zimi/static/sw.js,keepOwnAhead: the games and the Almanac are kept ahead of time, only after the page says it is idle and the connection is fine (keep-own-aheadmessage), only with 150 MB of room (OWN_KEEP_HEADROOM_BYTES), and nothing is evicted. Keeping on first opening a game now happens only for a page load (_isPageLoad), not for a picture from the games ZIM.zimi/static/sw.js:/almanac-viewjoinsNETWORK_ONLY_PREFIXES, the routes the worker never answers from cache.zimi/static/debuglog.js(new): fetched only while the server keeps a debug log. Records taps (a control's id, class and visible text, never an input's value), views, errors, rejections, slow frames and navigation, and posts them to/debuglogevery 4 s and on leaving bysendBeacon. Queue capped at 500 events.zimi/static/create.js: where a capability is missing (Browser, SingleFile, video, alive), an admin whose server can add it gets a Get button beside the command (_createFillAddonSlots,_createMissingAddons); the Beta tag on the failing-site link is gone.zimi/static/pdfreader.js,pdfreader.css: bars stay up while reading or turning pages and only a middle tap moves them; a PDF that will not open shows the missing-page card, and a 413 says it is too large to open because it is stored compressed.zimi/static/wiki-reader.js: the map entry for an article with coordinates uses the shared map flow (_mapHere): open the installed map that covers the place or offer the right one.zimi/static/readaloud.js: a wiki main page laid out as a table of headings and lists is read (_ttsLayoutTable).zimi/static/books.html,dictionary.html,tube.html,wiki.html,fieldguide.html: section labels take the shared rule fromtokens.css(part 4); the Bookshelf's place goes into the address and a reload opens it.How to review
keepShellAssetsand the install handler insw.jsfirst. A mistake here leaves installed apps without a working shell or makes every install fail; check the retry and the failure path, and thatrefreshShell's build check cannot loop (registration.update()).keepOwnAhead: the storage check, the idle gate and that a refused write stops quietly.debuglog.jsprivacy. Checkdescribe()takes words only from controls, and that nothing typed or password-like is recorded.NETWORK_ONLY_PREFIXESinsw.js: a per-account route missing from it could be answered from cache (/meand/userdataare listed).pdfreader.jstap zones (TAP_EDGE) on a phone, which share the screen with scrolling and pinch.tests/test_apps_css.py).tests/test_phone_search_field.pyandtests/test_debuglog_flush.cjspass first at this tip (the first reads the bar after the readers change, the second readsdebuglog.js).Tests
tests/test_pwa_offline_after_deploy_browser.py,tests/test_sw_offline.py(scripted network),tests/test_own_zims_offline_browser.py,tests/test_sw_route_classification.py.tests/test_big_pdf_live.py,tests/test_pdf_reader.py,tests/test_no_main_page_live.py,tests/test_reader_view_address.py,tests/test_wiki_reader.py,tests/test_readaloud_main_page_live.py,tests/test_reader_menu_red_live.py.tests/test_reload_state_browser.py,tests/test_apps_follow_language.py.tests/test_debuglog_browser.py,tests/test_debuglog_flush.cjs.tests/test_create_share_link_browser.py,tests/test_creator_made_download.cjs,tests/test_deep_check_live.py,tests/test_split_missing_live.py..cjsand some Python files run in this PR's quick tier.