Skip to content

fix(ui): bound progressive fill idle so long transcripts settle - #2259

Merged
Astro-Han merged 1 commit into
mainfrom
fix/progressive-fill-bounded-idle
Aug 5, 2026
Merged

fix(ui): bound progressive fill idle so long transcripts settle#2259
Astro-Han merged 1 commit into
mainfrom
fix/progressive-fill-bounded-idle

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Main CI was failing on e2e/prompt-rail.spec.tsthe active tick stays visible once the rail overflows: expected 90 .maka-turn nodes, received ~54–58 while the progressive fill was still climbing in steps of four.

Root cause: progressive mount and turn-size warm-up schedule work with bare requestIdleCallback (no deadline), so a busy CI main thread can starve fill for >10s. The prompt-rail settled() helper only raced turn count against Playwright’s default 10s expect timeout and did not wait on the published data-progressive-fill end state.

This PR:

  • extracts a shared createBrowserWarmupScheduler with { timeout: 100 } on idle callbacks (fill + warm-up)
  • waits for data-progressive-fill="complete" in prompt-rail before asserting turn count / warm-up
  • corrects the overflowing-rail fixture comment (90 turns, not 60)

Verification

  • npm run build -w @maka/core && npm run build -w @maka/ui
  • node --test packages/ui/dist/__tests__/browser-warmup-scheduler.test.js packages/ui/dist/__tests__/turn-size-warmup.test.js packages/ui/dist/__tests__/chat-view-progressive-mount.test.js → pass
  • npm run lint / npm run format:check → pass
  • Full Playwright prompt-rail suite not run locally (Electron E2E); relies on CI e2e_shard

Root cause

Unrelated main merges (#2198, #2214) were canaries: the flake is progressive-fill scheduling + a test that ignored the fill’s own completion attribute.

Bare requestIdleCallback could starve under CI load, leaving a 90-turn
overflowing rail mid-fill past Playwright's 10s count timeout. Share one
browser scheduler with an idle deadline and wait on data-progressive-fill
in prompt-rail instead of racing chunk count.
@Astro-Han
Astro-Han marked this pull request as ready for review August 5, 2026 16:13
@Astro-Han
Astro-Han merged commit 44a883d into main Aug 5, 2026
12 checks passed
@Astro-Han
Astro-Han deleted the fix/progressive-fill-bounded-idle branch August 5, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant