Files
openbot/scripts
NB😈andClaude Opus 5 56401c104f Stop the two animations that burn idle CPU, and add dev:cpu to measure it
Users reported high CPU usage when the app does nothing. A profile of an idle
window found 17.4% of one core, and it did not fall when the window lost focus
or was minimized.

Two causes, both animations that nobody can see:

- Every sidebar row shows an `idle` avatar, and the sidebar is not virtualized,
  so each row morphed an SVG for as long as the list was on screen. `idle` now
  rests with `hover` and plays on pointer or focus. `working` and `connecting`
  still play, because motion is the only sidebar signal that an agent runs.
- A finished image generation leaves its canvas mounted at `opacity: 0`, and the
  glow inside it kept two infinite keyframes on `mask-size` and `mask-position`,
  which the compositor cannot take. One old image repainted every frame for as
  long as the conversation stayed open.

`bun run dev:cpu` is the read-only command that found them. It reads cumulative
CPU time from CDP and from `ps` and reports the difference over a known
interval, because `ps -o %cpu` is an average over process lifetime and would
give a confident wrong answer. It adds no IPC channel and ships nothing into
the product.

Measured on one machine, idle, with 4 agents in the sidebar:

  focused    17.4% -> 0.1%   (renderer 11.3 -> 0, gpu 5.9 -> 0.1)
  blurred    18.5%
  minimized  16.3%

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 12:22:35 +02:00
..
2026-08-25 11:10:31 +02:00
2026-08-25 16:40:20 +02:00