fix(fleet): derive pane idle from window activity fallback #651

Merged
jason.woltje merged 1 commits from fix/fleet-pane-idle-activity into main 2026-06-24 06:37:46 +00:00
Owner

Summary

  • Extend tmux list-panes format to emit pane, window, and session activity timestamps while preserving the first three fields.
  • Derive idleSeconds from the first populated finite positive source, ordered pane_activity -> window_activity -> session_activity.
  • Clamp future activity epochs to 0 and keep idleSeconds null only when all sources are absent.

Why

On tmux 3.4, #{pane_activity} is empty in the mosaic-fleet socket while #{window_activity} is populated. Feeding window_activity restores the existing classifyReadiness idle/stuck path without changing classifier thresholds or rendering.

Tests

  • npx turbo build --filter=@mosaicstack/mosaic^...
  • pnpm typecheck
  • pnpm lint
  • pnpm format:check
  • pnpm --filter @mosaicstack/mosaic exec vitest run src/commands/fleet.spec.ts (176 tests)

Review

  • ~/.config/mosaic/tools/codex/codex-code-review.sh --uncommitted: approve, 0 findings

No self-merge: orchestrator/reviewer route.

## Summary - Extend tmux list-panes format to emit pane, window, and session activity timestamps while preserving the first three fields. - Derive idleSeconds from the first populated finite positive source, ordered pane_activity -> window_activity -> session_activity. - Clamp future activity epochs to 0 and keep idleSeconds null only when all sources are absent. ## Why On tmux 3.4, #{pane_activity} is empty in the mosaic-fleet socket while #{window_activity} is populated. Feeding window_activity restores the existing classifyReadiness idle/stuck path without changing classifier thresholds or rendering. ## Tests - npx turbo build --filter=@mosaicstack/mosaic^... - pnpm typecheck - pnpm lint - pnpm format:check - pnpm --filter @mosaicstack/mosaic exec vitest run src/commands/fleet.spec.ts (176 tests) ## Review - ~/.config/mosaic/tools/codex/codex-code-review.sh --uncommitted: approve, 0 findings No self-merge: orchestrator/reviewer route.
jason.woltje added 1 commit 2026-06-24 06:30:08 +00:00
fix(fleet): derive pane idle from window activity fallback
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
eaf5c17dc7
jason.woltje merged commit 70661e3fab into main 2026-06-24 06:37:46 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#651