Skip to content

fix(ui): event count + relative time in lane; evict stale tail states#26

Draft
integrate-your-mind wants to merge 1 commit into
fix/activity-statefrom
claude/elastic-proskuriakova
Draft

fix(ui): event count + relative time in lane; evict stale tail states#26
integrate-your-mind wants to merge 1 commit into
fix/activity-statefrom
claude/elastic-proskuriakova

Conversation

@integrate-your-mind

Copy link
Copy Markdown
Owner

Summary

  • AgentListItem: active agents show current "doing" text; idle agents fall back to N events · Xm ago so the lane is never blank
  • formatRelativeTime: new helper — just now / Xm / Xh / Xd ago
  • AgentLane: shows 3 animated skeleton items while WebSocket is connecting instead of an empty list
  • evictStaleTails: removes TailState map entries for session paths no longer seen in the scan — prevents unbounded memory growth; matches the pattern already used for activityCache / pidSessionCache / opencodeSessionByPidCache
  • scan.ts: calls evictStaleTails(tailTargets) at end of each full scan

What was already correct (no changes needed)

  • Page refresh: full WS snapshot is pushed immediately on reconnect
  • Duplicate sessions: dedupeAgents + pickBetterAgent already handles this
  • Race conditions in session assignment: reuseBlocked + markOpenCodeSessionUsed guards already in place

Test plan

  • Build passes: tsc --noEmit
  • Unit tests: 74 tests, 71 pass, 0 fail
  • Idle agents in the lane now show N events · Xm ago instead of blank meta
  • Connecting state shows 3 skeleton items with shimmer animation
  • evictStaleTails is called after each scan; old sessions freed from memory

🤖 Generated with Claude Code

- AgentListItem: active agents show current "doing" text; idle agents
  fall back to "N events · Xm ago" so the lane is never blank
- formatRelativeTime: new helper (just now / Xm / Xh / Xd ago)
- AgentLane: show 3 animated skeleton items while WS is connecting
  instead of an empty list
- evictStaleTails: remove tail state entries for session paths no
  longer seen in the scan, matching the cleanup pattern already used
  for activityCache / pidSessionCache / opencodeSessionByPidCache
- scan.ts: call evictStaleTails(tailTargets) at end of each full scan

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Owner Author

Backlog triage: this PR is a valid stacked follow-up to #6, not a duplicate. Commit comparison shows it is one commit ahead of 92321259cb17fd8dc574092339087959db5c6184 and its unique delta is limited to AgentLane/AgentListItem UI feedback, relative-time formatting, connecting skeletons, and stale Codex tail eviction. Retargeting the base to fix/activity-state so this PR displays only its unique changes. After #6 merges, this PR should be rebased or retargeted to main.

Copy link
Copy Markdown
Owner Author

Returning this stacked PR to draft while #6 is blocked. Its base is fix/activity-state, so it cannot become the next merge target until #6's Codex expiry bug is fixed, tested, and merged. After that, retarget this PR to main; its review surface should remain one commit and seven files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants