Skip to content

perf(tui): drive motion with Timeline and drop the sticky poll - #1467

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-10640-tui-perf-timeline-culling-buffering
Oct 16, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-10640-tui-perf-timeline-culling-buffering

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Sticky and animation setIntervals are gone; motion uses the renderer Timeline; idle snow is a post-process; shell tails repaint from feed appends on one frame.
  • Glyph math stays in mark-raster and ramp-glyphs because Timeline easings cannot reproduce markFrame, rampPulse, or advanceRevealChars.
  • Idle host arms no interval; a feed append schedules one frame.
  • The rename and import rewrites are the base branch, not this diff.

Verification

  • Pre-commit on this branch ran tsc --noEmit and bun build ./src/index.ts; both passed.

Fixes CL-10640

@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

CL-10640

@corbits-triage

corbits-triage Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios
TheGreatAxios force-pushed the cl-10640-tui-perf-timeline-culling-buffering branch from 92ba02f to 043d497 Compare October 16, 2026 22:20
@TheGreatAxios
TheGreatAxios changed the base branch from main to cl-10640-rename-mark-ramp October 16, 2026 22:21
@TheGreatAxios
TheGreatAxios changed the base branch from cl-10640-rename-mark-ramp to main October 16, 2026 22:41
@TheGreatAxios
TheGreatAxios merged commit 189d964 into main Oct 16, 2026
13 checks passed
@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Independent perf verification for this PR (measure-only lane, no source touched). Post-merge absolute behavior + structural proof (honest caveat at the end).

  • 200ms sticky poll: gone. Bounded grep for setInterval|clearInterval|setTimeout|clearTimeout in src/tui/product-host.ts returns zero matches (pre-merge had setInterval(..., 200) firing paint+sync 5×/s at idle). One 250ms watchdog remains in runtime-bridge.ts:188-194 but arms only while a turn/quota is live — quota-retry/stall-recovery, never paint. Out of claim scope.
  • Timeline ownership: frame-timeline.ts (createTimeline/getTimelineEngine, unregister on stop) adopted at 5 sites; clock arms only while lane/linger visible, dispose() stops clock + unsubscribes feed + cancels rAF.
  • Feed bounding, measured: 200 chunks × ~1033 B (~206.8 KiB in) → retained 7238 B / 7 lines, bound (8192 B) holds, oldest-dropped-first. Single 100 KiB chunk → truncated to 6400 B tail. Empty append → 0 notices.
  • Frame coalescing, measured: 50 synchronous appends → exactly 1 rAF; tail preview + elision correct; idle second frame → 0 rAF; post-dispose append → no throw, 0 rAF. Frame latency over 25 bursts: p50 0.30 ms, p95 0.86 ms (headless harness).
  • viewportCulling:true present on transcript + overlay viewport (verified present; note it pre-dates this CL via earlier commits).
  • Caveat: comparative before/after wall-clock is UNMEASURABLE in the headless harness (old path needed a live timer; old feed API has no subscribe). Everything above is post-merge absolute + pre/post structural diff.

Claims verified as stated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant