Follow-up to #91 (root cause, deferred)
#91 split the ResearchPage streaming tests into their own file so they run from a clean environment — this resolved the CI red but isolates the symptom rather than fixing the root.
Root cause
ResearchPage.test.tsx's first ~80 tests leave accumulated async residue (pending timers / un-awaited promises from rendering ResearchPage and triggering effects). Each test passes, but the residue builds up and breaks the next file's timing-sensitive streaming tests' rendering. Verified: the streaming tests pass in isolation and as a group; they fail only when run after the first 80; no single discrete polluter (a suspected polluter + a victim pass together — it's cumulative).
What a real fix looks like
Make the offending tests drain their async before completing — e.g. await/waitFor all in-flight effects, ensure searchExecutor (runs real, not mocked) abort timers are cleared, and confirm nothing schedules work past test teardown. Likely several tests need tightening rather than one fix.
Priority
Low — not a product bug, CI is green via the split. Worth doing so the two files can eventually recombine and so the pattern doesn't recur in new ResearchPage tests.
Follow-up to #91 (root cause, deferred)
#91 split the ResearchPage streaming tests into their own file so they run from a clean environment — this resolved the CI red but isolates the symptom rather than fixing the root.
Root cause
ResearchPage.test.tsx's first ~80 tests leave accumulated async residue (pending timers / un-awaited promises from renderingResearchPageand triggering effects). Each test passes, but the residue builds up and breaks the next file's timing-sensitive streaming tests' rendering. Verified: the streaming tests pass in isolation and as a group; they fail only when run after the first 80; no single discrete polluter (a suspected polluter + a victim pass together — it's cumulative).What a real fix looks like
Make the offending tests drain their async before completing — e.g.
await/waitForall in-flight effects, ensuresearchExecutor(runs real, not mocked) abort timers are cleared, and confirm nothing schedules work past test teardown. Likely several tests need tightening rather than one fix.Priority
Low — not a product bug, CI is green via the split. Worth doing so the two files can eventually recombine and so the pattern doesn't recur in new ResearchPage tests.