Skip to content

Commit 3eefadb

Browse files
committed
fix(tui): default animations off inside herdr panes
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.
1 parent f023f7c commit 3eefadb

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎packages/tui/src/config/index.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ export type Resolved = Omit<Info, "attention" | "cursor" | "keybinds" | "leader"
267267
keybinds: TuiKeybind.BindingLookupView
268268
leader: { timeout: number }
269269
mouse: boolean
270+
animations: boolean
270271
cursor?: {
271272
style: "block" | "underline" | "line" | "default"
272273
blinking: boolean
@@ -315,6 +316,7 @@ export function resolve(
315316
}),
316317
leader: { timeout: input.leader?.timeout ?? 2000 },
317318
mouse: input.mouse ?? true,
319+
animations: input.animations ?? (options.environment ?? process.env).HERDR_ENV !== "1",
318320
cursor: input.cursor
319321
? {
320322
style: input.cursor.style ?? "block",

‎packages/tui/test/config-v2.test.tsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ test("resolves automatic tabs from the terminal environment", () => {
9191
).toMatchObject({ mode: "on", enabled: true })
9292
})
9393

94+
test("resolves animations off by default inside herdr panes", () => {
95+
expect(resolve({}, { terminalSuspend: true, environment: {} }).animations).toBe(true)
96+
expect(resolve({}, { terminalSuspend: true, environment: { HERDR_ENV: "1" } }).animations).toBe(false)
97+
expect(resolve({ animations: true }, { terminalSuspend: true, environment: { HERDR_ENV: "1" } }).animations).toBe(
98+
true,
99+
)
100+
expect(resolve({ animations: false }, { terminalSuspend: true, environment: {} }).animations).toBe(false)
101+
})
102+
94103
test("shows resolved tab defaults in settings", () => {
95104
expect(settings.find((setting) => setting.path.join(".") === "tabs.mode")).toMatchObject({
96105
default: "auto",

‎packages/tui/test/mini/footer.view.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1930,7 +1930,7 @@ test.each([8, 12])("production footer grows for wrapped instructions in %i rows"
19301930
test("an oversized queue shortcut prevents backfilling shorter work and identity hints", async () => {
19311931
const app = await renderFooter({
19321932
width: 32,
1933-
tuiConfig: createTuiResolvedConfig({ keybinds: { "session.queued_prompts": "ctrl+shift+alt+q" } }),
1933+
tuiConfig: createTuiResolvedConfig({ animations: false, keybinds: { "session.queued_prompts": "ctrl+shift+alt+q" } }),
19341934
queuedPrompts: [{ messageID: "queued", prompt: { text: "later", parts: [] }, delivery: "queue" }],
19351935
subagents: {
19361936
tabs: [subagent({ sessionID: "s-1", label: "Explore", description: "Inspect" })],

0 commit comments

Comments
 (0)