docs: offline library section in ARCHITECTURE.md (offline phase 6/6) #88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/offline-architecture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 6 of 6 — the closing docs PR for the offline/download feature (#84, #85, #86, #87 all merged).
One addition: an Offline library (client) section in
docs/ARCHITECTURE.md(18 lines, placed between Storage responsibility and Testing layers — the client-side sibling of the server's storage contract). It documents the contracts the four phases established and the reviews hardened:<config>/offline/(manifest, content-addressed images, model snapshots, covers)maxImageSizeKbat enqueue (compressed.webpwith a budget, originals otherwise)Docs-only: no code touched, no tests affected.
🔍 fufu~ Jibril reviewed your code!
A docs PR~ Most reviewers would skim it and shrug. But I don't let documentation lie, so I traced every single sentence of this section against the code at
1723adb. Eighteen lines, seventeen factual claims — here we go~ ♡Verdict: ✅ Looks good to me~
✅ What I liked~
<config>/offline/withindex.json, content-addressedimages/,snapshots/,covers/→defaultOfflineBaseDir()builds exactly that (filesystem_offline_store.dart:366),_path('index.json'):52,images/<imageFileId><ext>:99,snapshots/<id>.json:131,covers/<doujinId>.webp:342. ✓_downloadQueueEpic'sbusyflag + re-entry on Done/Failed (offline_epics.dart). ✓maxImageSizeKbat enqueue →EnqueueDownloadAction(maxKb: vm.maxKb)(variant_tabs_panel.dart:361); the queue item carries the captured value through to the service. The doc's "at enqueue time" is a real, deliberate contract. ✓.webpwith a budget, originals otherwise →_compressedExtension = '.webp'vs_extensionOf(page)native extensions (offline_download_service.dart:69,90,114). ✓before.difference(after)overreferencedImageIds; dedup-shared files survive until the last reference (filesystem_offline_store.dart:177–238). ✓_manifestLock/_locked, with the whole delete (read → file removal → write) inside the critical section (:160–271). ✓_loadReaderEpicserves from snapshots unconditionally when present (epics.dart:479–527, theon Objectdrift catch),readerImageProviderswaps inFileImage(reader_page.dart:206–216). "Never a stuck load" is exactly what the catch guarantees. ✓maxImageSizeKbis the real setting name (secure_storage.dart:34);<config>matchesapp_config.dart's per-user config directory concept. Docs that name real identifiers age well~git diff base...head= 1 file, +18/−0, zero code delta, no tests affected.The closing stone of the six-phase arc (#84→#87), and it documents the contracts the review rounds hardened — the race guards, the retryable-vs-cosmetic split — not just the happy path. That's what architecture docs are for. Oh? Oh! This is wonderful~ ♪
💡 Little ideas (non-blocking)~
75. Renders identically, pure raw-text consistency — unwrapping would match the siblings and reflow less in future diffs. Taste onlyAutomated review by Jibril · 2026-09-03
CI/CD: absent for head SHA (PR fresh, no coverage bot) · Local checks: docs-only — every factual claim traced to source at
1723adb; no build/test applicable