WIP: Apocalypse Mode - optional offline Wikipedia via Kiwix/ZIM - #2776
WIP: Apocalypse Mode - optional offline Wikipedia via Kiwix/ZIM#2776alectimison-maker wants to merge 5 commits into
Conversation
|
@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the initial implementation. The product direction is now documented in #2735 and in this PR description: a fully optional Settings > Advanced > Apocalypse Mode entry that opens a dedicated management page (like Traces or Chat History) for user-selected Kiwix/ZIM language and archive installations. Please do not merge the current 999-English-introduction design as-is; rework the implementation toward that specification, including safe cancellation, retry backoff, durable storage/import behavior, progress and lifecycle UI, and Chrome/Firefox tests. I marked the PR as draft. No maintainer code changes were made to your branch. |
00615b1 to
6d78250
Compare
6d78250 to
0a38092
Compare
Direction and status
The current patch proves that local Wikipedia fallback is feasible, but its bounded corpus of 999 English vital-article introductions is not the intended final product. Please rework this PR toward the fully optional Apocalypse Mode described below and in #2735. The proposer should own the implementation; this update changes the specification only.
Product goal
Add an opt-in Settings → Advanced → Apocalypse Mode entry for worst-case offline or severely disconnected use. Selecting that entry must open a dedicated, full management page—at the same product level as Traces or Chat History—where the user installs, imports, monitors, updates, and removes offline knowledge archives. Archive management should not be squeezed into the Settings panel itself.
When explicitly enabled, WebBrain should let the user download or import a Kiwix-compatible Wikipedia archive and search it locally.
This is offline knowledge retrieval, not a promise that the entire agent works without a network. Cloud-hosted LLMs will still require connectivity; fully offline agent operation also requires a local model.
Why the current 999-article English cache is insufficient
A tiny collection may remain available as a clearly named optional starter pack, but it must not be presented as full “offline Wikipedia.�
Information architecture and user experience
When enabling or installing content, let the user choose:
.zimfile.Before downloading, show the current exact download size, available-space implications, archive date, language, content tier, and source/license. Require explicit confirmation. Provide visible progress, pause/resume, failure recovery, update, and complete deletion controls.
For scale, the official Kiwix archive index currently lists English Wikipedia at roughly 12 GB for all introductions, 49 GB for all articles without images, and 115 GB for the largest archive. These values are examples only; the UI must obtain and display current metadata rather than hard-code them.
Technical direction
Reliability and review requirements
The reworked implementation must also address these issues identified during review:
mainand rerun Chrome, Firefox, security, and relevant lifecycle tests.Acceptance criteria
.zimarchives can be imported where supported.Current patch (to be replaced or substantially reworked)
The existing commits download a pinned English catalog of 999 vital-article introductions into IndexedDB in alarm-driven batches, opportunistically cache live Wikipedia responses, and use lexical fallback when Wikipedia is unavailable. That work can inform the provider/search interface, provenance handling, and interruption tests, but it should not set the final corpus, language, storage, download, or UI architecture.
Closes #2735