103 Commits
Author SHA1 Message Date
catarrh f534fe6006 docs: language model + liturgical content policies, fix ru/services drift
- .ai-specs/PROJECT_CONTEXT.md: new 'Language Model (UI vs. Content)' section
  (serviceLang ru->cu, fallback chain, scripture, Bible tab independence,
  fonts, calendar authority) + content-policy pointer in Critical Invariants.
- .ai-specs/WORKING_POLICIES.md: new 'Liturgical Content Policies' —
  never translate service/Bible texts (sourced only), cu texts verbatim
  (no normalisation/latinisation), service assembly follows the Typicon.
- DATA_EN.md/DATA_RUS.md: ru/ holds enriched lives only; services fall back
  to cu; cu is the authoritative calendar + service texts.
2026-10-04 17:47:33 +03:00
catarrh 69f3533c41 test(validate): cover cu prayers, shared marker-type constant
- validate-data now scans cu/services/prayers (349 files; 331 -> 680 total).
- marker types (TROPARION/KONTAKION/THEOTOKION/LITANY/COMMUNION) factored
  into PRAYER_NODE_TYPES with a keep-in-sync comment.
- COMMUNION marker (cu COMMUNION/SUN.json) added per the same convention.
2026-10-04 17:36:31 +03:00
catarrh 4f9f55b3f3 fix(validate): allow LITANY/THEOTOKION prayer markers
Both node types are bare classification markers with no payload
(content lives in TEXT/HEADER nodes, matching the TROPARION/KONTAKION
convention already in the allowlist). Clears the 13 pre-existing
validate errors; no data or rendering change.
2026-10-04 17:26:06 +03:00
catarrh d0affe4e83 chore(service): trim dead bibleVersion() entries, drop impossible shared bible fallback
bibleVersion() is only ever indexed with serviceLang (en|cu), so the
fr/el/la/zh/ar entries were unreachable; the shared fallback URL
(/data/shared/bible/...) does not exist on disk. No behavior change.
2026-10-04 17:18:49 +03:00
catarrh 8c442bf7b6 fix(offline): surface degraded/missing preloads, join re-entrant runs, cache manifest to IDB
- loadManifest() goes through DataCache.fetchWithFallback: the file list is
  written to IDB and survives SW-cache eviction; a run with the reduced
  fallback set is flagged and shown as degraded (new i18n en/ru/cu).
- 404 answers are counted as 'missing' (deployment drift) with a
  preload-missing diag entry, instead of silently reporting Done.
- preload() is re-entrancy safe: concurrent calls join the in-flight run.
- versions.json is loaded once per session (was fetched per translation).
- Write-through failures in fetchWithFallback()/fetch() log idb-write-fail.
- preload-manifest.json SW route is NetworkFirst (fresh coverage online).
- Manifest now also covers the shared/lives + shared/commands fallbacks.
2026-10-04 17:14:33 +03:00
catarrh 1201e16d5e fix(cache): complete preload coverage + surface silent write failures
Root cause of 'pre-cache done but offline data missing':
1. Preload manifest never listed the services/{prayers,texts,headers,var}
   subtrees the Service view dereferences (CommonPrayers->prayers, etc.),
   plus only 13 hardcoded commands. Generator now enumerates all of them
   (en 1500->1740, ru->1333, cu 1500->2108 files).
2. DataCache.set silently resolved on IDB write failure (quota exceeded),
   so preload counted un-stored files as success and reported 100% done.
   set() now returns boolean; preload treats failed writes as failures
   that feed the existing circuit breaker (visible abort + diag entry).
3. No persistence request: added best-effort navigator.storage.persist()
   before preload, diag-logged.
4. Dropped dead manifest weight (menaion-common/add, horologionadd) -
   never referenced by any view.
2026-09-08 08:04:13 +03:00
catarrh 4f11e8ca6c feat: bump UI chrome font scale (xs->sm, sm->base)
- text-sm -> text-base (14px -> 16px), then text-xs -> text-sm (12px -> 14px)
  across 75 usages in 8 UI files; nav dropdown links 0.875rem -> 1rem
- Liturgical content untouched (var-based size); verse-number superscripts
  and text-[10px] micro-labels intentionally kept
2026-08-25 00:04:41 +03:00
catarrh 4f6461efad feat: default liturgical text size 16px -> 18px (new installs only) 2026-08-24 23:48:19 +03:00
catarrh 9cef9130cc fix: auto-load first library section on open
PrayerView's select displayed the first option natively while activeSection
stayed null, so content only appeared after manually changing selection.
Initialize to first section and load it on render for all 8 collections.
2026-08-24 23:42:00 +03:00
catarrh f49735b360 feat: explicit PWA update prompt with build stamp
- registerType 'prompt' + skipWaiting/clientsClaim false: new SW waits
  instead of silently hijacking running sessions
- main.ts registers via virtual:pwa-register; onNeedRefresh shows
  dismissible toast (i18n en/ru/cu) with Update button -> updateSW(true)
- No polling — update check only on navigation, zero extra traffic
- Settings About shows __BUILD_DATE__ build stamp for remote debugging
2026-08-24 11:39:47 +03:00
catarrh a005e386a6 feat: serve all precached data offline via DataCache fallback
- DataCache.fetchWithFallback: network-first with IDB write-through under
  the same url: keys the preload writes; falls back to precached IDB copy
  when offline — closes the preload(IDB) vs read(SW cache) gap that made
  the Bible reader (and every other view) fail offline despite precaching
- Convert all 33 raw /data fetches across bible/service/menaion/prayer/
  calendar/settings views; in-memory caches and notFound maps preserved
- fetchCommandText: switch to lowercase services/commands/ (already in
  preload manifest); tolerate both TEXT/text node casings per migrate-data
- Remove stale duplicate static/data/en/services/Command/ (15 files)
- fetchLives: fix misc fallback to real lives/misc/{N}.json bundles
2026-08-24 09:50:07 +03:00
catarrh 623c56a96f fix: robust first-launch auto-preload (mobile bible/download)
- OfflineManager.preload accepts bibleTranslations: 'all' and resolves
  translation ids internally from versions.json (single source), removing
  the fragile settings-side fetch that could throw and abort the whole
  download on mobile first launch
- Decouple trigger from '#settings/autopreload' route param via one-shot
  requestAutoPreload()/consumeAutoPreload() flag
- Auto-expand + tick Bible variant checkboxes for UI consistency
- Offer modal sets the flag and navigates to plain '#settings'
2026-08-23 22:05:58 +03:00
catarrh 142b95d226 refactor: address code-review findings for install detection and diag log
- pwa-install.ts: permanent 'ponomar-ever-installed' marker keeps install
  button hidden on Firefox/Safari after appinstalled clears the offer flag;
  isPwaInstalled moved to core for reuse
- diag-log: self-heal corrupted storage, show MM-DD in tail
- settings: refresh diag panel after clear-cache; uniform completion style
- data-cache.has: plain count(key); document HTML-as-failure intent
2026-08-23 10:23:36 +03:00
catarrh 193038a671 fix: hide install button when PWA already installed
- Button hidden by default; async isPwaInstalled() check (standalone mode,
  ponomar-installed flag, getInstalledRelatedApps) unhides only if installable
- Click hint 'already installed' branch uses same multi-signal detection
- manifest id '/' for getInstalledRelatedApps matching on desktop Chrome
2026-08-22 23:14:25 +03:00
catarrh 8c4f60d635 feat: precache resilience — circuit breaker, forensic diag log, safe version check
- Circuit breaker: abort preload after 5 consecutive network failures
  (success or 404 resets streak) instead of grinding doomed retries
- localStorage diag ring buffer (survives cache wipes): preload-start/
  done/abort, manifest-unavailable, version events; shown in Settings
- checkDataVersion: no longer wipes IDB on transient read errors
  (DataCache.has tri-state probe); logs old value on real migrations
- loadManifest: null result no longer cached forever (per-session fallback lock-in)
2026-08-22 22:39:37 +03:00
catarrh ee5fb17c6b feat: install hints for non-Chromium browsers; preload 404 hardening
- Install button without beforeinstallprompt now shows inline per-platform
  instructions (Firefox/iOS/generic) instead of silent no-op
- Preload: 404s no longer counted as failures nor retried
- PreloadProgress.failedFiles (up to 10) surfaced in completion message
2026-08-22 21:51:38 +03:00
catarrh c652183a24 feat: Bible reader bookmarks
- Version-specific bookmarks (version/book/chapter/verse) in localStorage
- Toolbar 🔖 button with dropdown: add, jump, rename, delete
- Default names include version display name, e.g. 'John 3:16 (Елисаветинская)'
- Verse anchors id='v{chapter}-{verse}' for scroll-to-verse jumps
- Theme-safe panel styling (header-text on dropdown bg) with distinct
  tap zones: divider + chip buttons for edit/delete, touch press feedback
2026-08-22 20:24:02 +03:00
catarrh b4ebd37cc3 fix: unstretched PWA icons, maskable purpose, theme-aware favicon
- generate-icons.py: preserve SVG aspect ratio (was stretched 1.49x), art at 80% for maskable safe zone, emit transparent cross-gold.png
- manifest icons: purpose 'any maskable'
- applyTheme(): compose favicon per app theme (chrome bg + gold cross)
2026-08-22 11:36:14 +03:00
catarrh 610cdca3ad fix: eliminate guaranteed 404s (ru menaion-bundle, unmapped commemorations)
- loadMenaionBundle: ru resolves to cu bundle (no RU liturgical texts by design)
- autoPreload: fetch cu bundle once; keep ru+cu lives for current month
- calendar view: fetch shared commemorations only for mapped feast CIds
2026-08-22 00:18:15 +03:00
catarrh c8e11f0af7 feat: Gregorian default calendar, Hymnal label, day header cleanup
- Default calendar type julian -> gregorian (new installs only)
- EN nav 'Sbornik' -> 'Hymnal', section title -> 'Liturgical Hymnal'
- Day header: text-sm on date lines, weekday dropped from Julian line,
  order: Julian / day-title / Gregorian
2026-08-21 23:58:35 +03:00
catarrh ea09993df9 fix: IDB resilience, direct autopreload, nav delegation, Bible bounds 2026-08-21 23:05:23 +03:00
catarrh c10c219736 fix: Bible reader toolbar & select dark theme; service tab scroll jump
- Bible reader toolbar: bg-navy->bg-surface/50, selects: appearance-none bg-surface
- Prayer view select: appearance-none bg-surface (match settings style)
- Service view: preserve content height before loading to prevent scroll jump
2026-08-04 04:42:35 +03:00
catarrh cb63254b2f fix: save and restore last used Bible version across sessions 2026-08-04 04:23:10 +03:00
catarrh 73fac73248 feat: sort Bible translations by interface language (en/ru/cu priority) 2026-08-04 04:13:08 +03:00
catarrh 47017e7f4f fix: fill empty Bible book files (Brenton Mal + NKJV Jude/Philip) 2026-08-04 04:02:43 +03:00
catarrh b78e6ac09e fix: actually use preload manifest, remove dead calendarDataFiles (was never wired) 2026-08-04 03:42:10 +03:00
catarrh 094b883759 fix: remove 14 phantom Bible book entries from versions.json, regen manifest 2026-08-04 03:16:39 +03:00
catarrh d1d43a5b57 feat: preload manifest for accurate offline caching 2026-08-04 02:48:11 +03:00
catarrh 9fb4d182e2 fix: singleton IndexedDB connection to prevent cache check failures 2026-08-04 02:21:45 +03:00
catarrh fdbfcd4911 feat: unified offline preload — Calendar & Services + Bible, 3 checkboxes → 1 2026-08-04 02:16:15 +03:00
catarrh e4ddee924b offline: Infinity TTL, skip cached files, data version, first-launch preload offer, cache stats 2026-08-04 01:18:29 +03:00
catarrh ea947ede7a fix: mobile dropdown bg uses --color-dropdown-bg for dark theme 2026-08-02 23:56:01 +03:00
catarrh f45791579b feat: color themes, dark mode, HC/sepia themes, moon tooltip, docs update 2026-08-02 23:45:56 +03:00
catarrh 857adce5da resolve all Composite_* paremia placeholders to real Bible refs 2026-08-02 22:24:59 +03:00
catarrh 0769271f98 UX: comm chevron, lang fix, PWA cache control, Bible expand, app title 2026-08-02 21:47:31 +03:00
catarrh cb812fe4fe add English Exapostilarion1-11 and Compline files from external sources 2026-08-02 16:57:03 +03:00
catarrh 42ed5e7143 add English Theotokia VESPERST1-8 from Theotokia.pdf 2026-08-02 16:21:21 +03:00
catarrh 2e5515499c add English service texts: 25 Divine Liturgy prayer files from EPUBs 2026-08-02 15:49:51 +03:00
catarrh c2d5bd3093 feat: Bible translation preloading with translation picker 2026-08-02 14:42:34 +03:00
catarrh 04eaa7058c center calendar detail panel content with mx-auto 2026-08-02 13:10:41 +03:00
catarrh 7c602e25ca center nav links and calendar two-panel layout on wide screens 2026-08-02 13:04:56 +03:00
catarrh 4d0268cbab readme: add astronomy feature (sunrise/sunset, moon phase) 2026-08-02 03:29:13 +03:00
catarrh 4ddec5289f remove unused phaseToFraction import 2026-08-02 03:27:38 +03:00
catarrh b095a26a99 fix: nav right-aligned via ml-auto instead of justify-end 2026-08-02 03:20:50 +03:00
catarrh f4db817d13 fix: ecclesiastical moon day with alternating 29/30-day months 2026-08-02 03:14:26 +03:00
catarrh ec366f5681 i18n: moon day label 2026-08-02 02:59:27 +03:00
catarrh c91302adf1 moon trend, day number, and fraction display 2026-08-02 02:57:05 +03:00
catarrh 3f8d2c454c fix: nav justify-end on header with max-w-full to prevent overflow 2026-08-02 02:51:57 +03:00
catarrh accd5cf48c reduce spacing across all views; i18n for cache info text 2026-08-02 02:47:31 +03:00
catarrh 33d69f001e move astro panel above commemorations 2026-08-02 02:34:22 +03:00