Skip to content

fix(tui): stop disabled tab pulse rendering - #42346

Open
kitlangton wants to merge 1 commit into
v2from
disabled-pulse-live
Open

fix(tui): stop disabled tab pulse rendering#42346
kitlangton wants to merge 1 commit into
v2from
disabled-pulse-live

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Prevent disabled tab pulses from keeping the OpenTUI renderer live after their session becomes active.

Enabled running sweeps, breathing, flashes, and completion animations are unchanged.

Before / After

Before

  1. A tab pulse mounted with animations disabled.
  2. Its session later transitioned to active.
  3. PulseState.live returned true from active without considering enabled.
  4. The invisible pulse propagated liveness to the renderer root, producing continuous frames despite no visual changes.

In the reproduced TUI, four disabled pulses held the renderer at 53–57 FPS while native stats reported zero changed cells.

After

PulseState.live is gated by enabled. A disabled pulse remains non-live through later activity transitions, so it cannot start an invisible render loop.

How

  • packages/tui/src/component/tab-pulse.tsx: require the pulse to be enabled before any active, breathing, or finite envelope state contributes liveness.
  • packages/tui/test/component/tab-pulse.test.tsx: mount a disabled pulse, transition it to active, and assert root liveness remains zero.

Scope

This PR only fixes disabled-animation liveness. It does not change the frame rate or appearance of enabled animations, and it does not address full-root rendering costs while legitimate animations are active.

Testing

  • cd packages/tui && bun run test test/component/tab-pulse.test.tsx — 7 passed
  • cd packages/tui && bun typecheck
  • Repository pre-push hook: all 34 package typechecks passed
  • Diagnostic TUI verification: rootLiveCount dropped from 4 to 0 and frame count stopped advancing after hydration when animations were disabled

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