wmj 9cb0793347 fix: Qibla not detecting device compass on iOS and Android
Two real bugs, both explaining 'didn't detect compass':

1. iOS: DeviceOrientationEvent.requestPermission() was called *after*
   the async geolocation round-trip resolved. Safari's user-activation
   grant for sensor permissions expires almost immediately, so by the
   time a GPS fix comes back (often several seconds), the permission
   call silently fails with no prompt ever shown. Now requested
   synchronously inside the button's click handler, before geolocation
   starts.

2. Android: the heading was only accepted when e.absolute === true, but
   many Android browsers fire plain 'deviceorientation' with
   absolute:false even though alpha is a perfectly usable heading —
   compass detection silently never succeeded on those devices at all.
   Now accepts alpha regardless of the absolute flag, falling back to
   it when webkitCompassHeading (iOS) isn't present.

Also fixed a duplicate-listener bug: clicking 'Refresh location'
repeatedly re-registered deviceorientation listeners without removing
the previous ones, stacking duplicates on every retry.

Verified live: dispatched a synthetic non-absolute deviceorientation
event (the exact Android failure shape) against the deployed app —
compass detection now activates correctly where it previously stayed
silently stuck on the no-sensor fallback. Added as a permanent
regression assertion in e2e-khairat-lifestyle.cjs (16/16).
2026-08-14 15:23:17 +08:00

Nur Falah — Estate & Waqf Suite

Horizon 1 (Prevention Suite) + Horizon 2 (Unlock Programme, pre-pilot demo) from the Nur Falah PRDs, built as a standalone Svelte 5 + Vite PWA, styled to match the visual system of the live moslem03.falahos.my (Nur Falah Muslim Companion) app.

Modules

Module Horizon Status
Faraid Calculator 1 Shared calc core, 14 classical cases passing (src/lib/calc/faraid.test.js)
Asset Registry 1 Local-first, feeds every other module's estate total
Wassiyah Generator 1 1/3 meter, heir-exclusion block, jurisdiction-aware export
Hibah Tracker 1 Shared marad al-mawt guardrail
Family Waqf Designator 1 Built ahead of scholarly sign-off — see below
Digital Beneficial Claims 2 Pre-pilot demo only — see below

Important: two governance gates were overridden for this build

Per explicit product direction, this build proceeded past two gates stated in the project's own PRDs and review log:

  1. Family Waqf Designator (Horizon 1 PRD §8.5) is gated on scholarly sign-off. scholarly-review-log.md (in the digital-waqif docs repo) tracks OPEN-01 — whether a healthy-state waqf is subject to the one-third cap — as unresolved. This module ships anyway; the in-app copy states the open question rather than presenting invented certainty.
  2. Horizon 2 (Digital Beneficial Claims) PRD states: "No engineering work begins until Phase 0 (legal opinion + signed institutional partner agreement) is complete." No confirmation of Phase 0 completion was available. The Claims module ships as a local, non-custodial demonstration of the data model and transfer restriction only — no real legal wrapper, no institutional integration, no real claims issued. It carries a persistent in-app banner saying so.

Both are flagged here, in deploy/DEPLOY.md, and in the relevant module's source comments so this isn't silently presented as production-ready.

Development

npm install
npm run dev       # http://localhost:5173
npm run test      # classical faraid test suite
npm run build

Deploy

See deploy/DEPLOY.md. Target: moslem04.falahos.my.

S
Description
Nur Falah Horizon 1 Prevention Suite + Horizon 2 Unlock demo. Deploy target moslem04.falahos.my
Readme 1.1 MiB
Languages
Svelte 51.9%
JavaScript 47.9%
HTML 0.1%