Skip to content

fix: animate agent status in Zellij tabs - #220

Merged
raine merged 5 commits into
raine:mainfrom
Nsttt:fix/zellij-tab-status
Aug 8, 2026
Merged

fix: animate agent status in Zellij tabs#220
raine merged 5 commits into
raine:mainfrom
Nsttt:fix/zellij-tab-status

Conversation

@Nsttt

@Nsttt Nsttt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Display workmux agent status directly in Zellij tab titles. Working agents now use an animated Braille spinner; waiting and done retain their configured status icons.

Changes

  • animate the working state with the Braille sequence used by Zellij-style spinners
  • keep one detached, tab-scoped worker per active spinner and reuse it across repeated working updates
  • preserve manual tab renames and marker-delimited canonical tab identity across working, waiting, done, and clear transitions
  • serialize updates so failed replacement commands leave the current spinner running instead of freezing a frame
  • bind workers to the exact Zellij session socket incarnation and stop safely after session recreation or persistent CLI failures
  • document the animated Zellij status behavior while retaining the experimental/source-build warning

Zellij test build

  • source commit: zellij-org/zellij@5254e4fc1dd784ef872644190dc5e2bcb0981bed
  • commit title: Fix tab close size (#5444)
  • reported version: zellij 0.45.0

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets (passes; seven existing unrelated warnings)
  • GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 cargo test --bin workmux --quiet (1,432 passed, 4 ignored)
  • env -u ZELLIJ -u ZELLIJ_PANE_ID -u ZELLIJ_SESSION_NAME GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 just itest (437 passed)
  • Ruff formatting/lint and Pyright (clean)
  • VitePress production build
  • isolated live Zellij validation: animated frames, repeated-worker reuse, failed replacement recovery, manual rename preservation, waiting/done replacement, concurrent updates, and clear cleanup
  • autoreview: clean, no accepted/actionable findings

@Nsttt Nsttt changed the title fix: update agent status in Zellij tabs fix: animate agent status in Zellij tabs Aug 7, 2026
Nsttt and others added 2 commits August 7, 2026 17:45
Zellij status animation required a background process per working tab and
continuously spawned CLI commands to read and rename tabs. This imposed
substantial process, IPC, redraw, and lifecycle overhead for a cosmetic effect.

Render the configured working, waiting, and done icons when status hooks fire,
matching tmux behavior. Keep stable tab-ID targeting, marker-based suffix
replacement, tmux style stripping, and canonical tab-name handling. Remove the
spinner command, runtime state, socket validation, and animation process.

Zellij waiting and done icons remain visible until the next status update
because Zellij does not provide an equivalent to tmux's focus hook.
@raine

raine commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Hey, thanks for the PR. Looks good to me, but I'd rather not add the animated spinner to main.

It needs a background process for every working tab, with each repeatedly calling Zellij commands every 100 ms. That's roughly 20 Zellij processes per second per working tab, along with quite a bit of lifecycle and stale-state handling for a cosmetic animation. Doesn't feel like a responsible thing to add to a relatively widely used tool as a default.

The static 🤖, 💬, and ✅ icons are also in tmux so it's more consistent.

@raine
raine merged commit 02d1c7c into raine:main Aug 8, 2026
@Nsttt
Nsttt deleted the fix/zellij-tab-status branch August 8, 2026 11:45
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.

2 participants