fix(next): keep New Tab prerendered composer warm

Merged
TE
5d ago
+25-8

New Tab and new workspace handouts now keep a fully rendered composer warm through the first visible frame. The parked page stays attached to its offscreen parking view so its WebKit or Chromium renderer remains active, and each handout schedules a fresh spare on the next main-actor turn instead of waiting for the idle-input debounce.

Leo's request (2026-10-31): "EVERY NEW fing WORKSPACE" and "EVERY CLICK INTO A NEW TAB PAGE" "fing renders the composer from fing 0" — "where is the cache", "where is the fing prerendering", and "where is the f***ing reuse".

The exact regression was #26975's parked-cover completion setting the spare AgentPaneView hidden. PageWebView then reported the parked page as not visible and suspended its renderer; adopting it necessarily paid a cold render. The offscreen parking view already keeps the page out of sight while preserving renderer visibility, so the spare now remains warm. Rewarming after handout is scheduled at zero delay on the main actor and retains the existing one-shot timer cleanup; no new repeating timer or observer was added.

Changelog

Changed: parked New Tab renderers remain warm, and the next warm renderer starts immediately after each New Tab or new workspace handout.

Validation

  • Focused NewTabSpareVisibilityTests and the app compile run on the fleet at the final head.
  • The visibility test now proves a parked spare remains renderer-visible after its cover snapshot and still wakes correctly on adoption.
  • NewTabPage.open and AgentTabStore.showWorkspace both use the same warmed spare handout path.

Performance

metricbeforeafterdeltaharness or run link
New Tab handout renderer active on first frame0% (parked renderer suspended)100% (parked renderer warm)+100 percentage pointsNewTabSpareVisibilityTests on final head
New workspace handout renderer active on first frame0% (same shared spare path)100% (same shared spare path)+100 percentage pointsAgentTabStore.showWorkspace handout path + final-head compile
Replacement warmup delay after handout750 ms idle debounce0 ms next-turn scheduleāˆ’750 msNewTabSparePool timer path

Agent session: agent session
šŸ¤– Generated with Claude Code