#1436·OpenAlice

test: NewsPage observer callback can be uninitialized under full-suite load

Author: luokerenx4Created Sep 9, 2026Updated Sep 9, 2026

Full pnpm test on ed078f5a plus the Telegram lifecycle fix failed at ui/src/pages/NewsPage.spec.tsx:100: TypeError: notify is not a function, in “reveals stories once per bottom intersection and resets when the view changes”. The test waits for Story 80 but assumes IntersectionObserver has already constructed its callback. Under full-suite load that callback was not initialized.

Reproduction: run pnpm test; intermittent. Isolated pnpm exec vitest run ui/src/pages/NewsPage.spec.tsx passed all 12 tests immediately afterward. Full run: 765 files passed, 1 failed; 6828 tests passed, 1 failed, 3 skipped.

Suspected owner: NewsPage observer setup/test effect synchronization. Wait for observer registration before invoking the callback, while preserving the real intersection assertions. Deferred because this is outside the Telegram transport fix and no News production files changed.