mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 08:22:24 +00:00
Setting CARD_LIVENESS_POLICY=hide-foreign made all foreign/NIP-71 content disappear: a hide-until-verified card starts display:none, which has no layout box, so the IntersectionObserver never fires for it — its liveness probe never runs, it never gets a healthy verdict, and it stays hidden forever (deadlock). Fix: cardNeedsEagerLivenessProbe() identifies cards governed by a hide-until-verified policy (foreign under hide-foreign; all non-owner under hide-all). Both health observers now kick the probe for those cards from onCardRegister — which fires for every card regardless of visibility — instead of waiting for an intersection that a hidden card can never produce. The URL probe is deferred one microtask so attachUrlHealthBadges has wired state.onCheck after observe(). Probes stay concurrency-capped + priority-ordered; show-pending is unchanged (no eager probing). Tests: cardNeedsEagerLivenessProbe predicate coverage in tests/video-card-source-visibility.test.mjs. Co-Authored-By: Claude Opus 4.8 <[email protected]>