Skip to content

pi: cache tmux window status badges - #69

Merged
cmpadden merged 1 commit into
mainfrom
pi/cache-tmux-status
Nov 10, 2026
Merged

cmpadden merged 1 commit into
mainfrom
pi/cache-tmux-status

Conversation

@cmpadden

Copy link
Copy Markdown
Owner

Summary

  • Move Pi pane aggregation and lease checks out of synchronous tmux status-format expansion into a background helper.
  • Use tmux's built-in #() job cache to retain the last badge while a refresh runs, without cache files or a daemon.
  • Keep the existing pane-local Pi status protocol and priority ordering unchanged.
  • Add control-client regression coverage for blocked refreshes, expired badges, and preserved window labels.

Context

Investigated intermittent window-label flickering. tmux 3.7c shares a 100 ms format-expansion budget across nested window rendering; artificially exceeding that budget reproduced missing labels, though the live flicker was not directly captured. This change removes repeated pane scans from that rendering path.

Validation

  • All seven tmux-status tests pass, including the real-tmux integration test.
  • make format and the helper's shfmt check pass.
  • make lint and commit hooks pass with ShellCheck supplied through an ephemeral uvx --from shellcheck-py environment.

Rollout

Reload tmux with prefix+r. Existing Pi processes do not need to reload; badge updates normally appear within about a second.

@cmpadden
cmpadden merged commit c9cc33b into main Nov 10, 2026
1 check passed
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.

1 participant