Skip to content

fix(tui): default animations off inside herdr panes - #60111

Open
sulthonzh wants to merge 1 commit into
anomalyco:devfrom
sulthonzh:animations-off-herdr
Open

sulthonzh wants to merge 1 commit into
anomalyco:devfrom
sulthonzh:animations-off-herdr

Conversation

@sulthonzh

@sulthonzh sulthonzh commented Oct 29, 2026 •

Copy link
Copy Markdown

Issue for this PR

Related to #57462 (animated tabs cause high CPU/GPU use) and #57676 (lag with the session sidebar visible). Not claiming to close either — this is the multiplexer-specific slice of that work.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

tabs.enabled is already resolved environment-aware: inside herdr panes (HERDR_ENV=1) the animated tab rail stays off by default, because a multiplexer re-composites pane output at its own cadence and a continuous animated repaint stream turns into continuous full-region recomposites on the multiplexer's client — felt as flicker/shaking, especially over remote or slow links.

This extends the same policy to animations: resolve() now fills animations (like mouse/tabs) with input.animations ?? (HERDR_ENV !== "1"). An explicit animations setting always wins, and the app.toggle.animations command keeps working (it writes an explicit value). Outside herdr, behavior is unchanged (default on).

How did you verify your code works?

  • New unit test in packages/tui/test/config-v2.test.tsx mirroring the existing tabs-environment test: default on normally, default off under HERDR_ENV=1, explicit true/false override in both directions. Red on the old code, green with the change.
  • Full packages/tui test suite passes; bun run typecheck clean.
  • End-to-end capture harness (herdr 0.9.5 client + opencode pane, byte-level VT stream analysis): with animations on, live panes keep the renderer emitting frames continuously; animations: false collapses idle repaint output to zero, which removes the repaint pressure that multiplexer clients re-composite.

Screenshots / recordings

Config-default change only; no visual artifact beyond fewer repaints.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Fixes #52577

Related: #57462, #57676

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to merge. I ran resolve() with HERDR_ENV=1: on the base branch animations is left undefined, so animations run. With this change it is false, and an explicit animations: true still wins. Outside herdr nothing changes, because every consumer already treated a missing value as on.

Since the settings dialog reads the resolved config, /settings now shows Animations correctly ("on" by default, "off" under herdr). Before, it showed "off" while animations were running, which is what #52577 reports. The footer.view.test.tsx edit is needed: the test helper used to turn animations off only when the value was missing, and it is now always filled in.

Tests: config-v2 and mini/footer.view pass, and tsc -b is clean.

Public API: unchanged. There are no new config keys or environment variables; only the default of the existing animations key now depends on HERDR_ENV, and explicit settings behave as before.

Fixes #52577
Related: #57462, #57676

Before

After

Multiplexer panes re-composite pane output at the multiplexer's own
cadence, so the TUI's animated repaint stream (tab pulse, marquee,
shimmer, tween ticks) turns into continuous full-region recomposites
on the multiplexer client, visible as flicker and shaking on remote
or slow links (anomalyco#57462, anomalyco#57676).

Resolve animations in resolve() the same way tabs.enabled is already
environment-aware: default off when HERDR_ENV=1, on otherwise; an
explicit animations setting always wins.

The mini footer queue test pinned its expected statusline glyph via
the test harness coercing unresolved animations to false; resolve()
now always defines the field, so the test declares animations: false
explicitly for its still-glyph assertion.
@sulthonzh
sulthonzh force-pushed the animations-off-herdr branch from 3eefadb to e8b19b1 Compare October 29, 2026 05:20

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new push is a rebase onto a newer dev; the change itself is identical to what I reviewed before, so there is nothing new to raise. On the new head I re-ran config-v2 and mini/footer.view (all pass) and tsc -b (clean). I also re-checked /settings, which shows Animations as "on" by default.

Public API: unchanged. There are no new config keys or environment variables; only the default of the existing animations key now depends on HERDR_ENV.

Before

After

@sulthonzh

Copy link
Copy Markdown
Author

Friendly nudge — happy to rebase on the latest dev or adjust anything if it helps the review. The change is small (resolve-time default only, mirroring the maintainer-requested tabs precedent from #50456) and the test suite is green on it.

This branch has not been deployed

No deployments
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.

tui: settings dialog shows Animations as off while animations are enabled by default

1 participant