Skip to content

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

Open
integrate-your-mind wants to merge 41 commits intomainfrom
claude/elastic-proskuriakova
Open

fix(ui): event count + relative time in lane; evict stale tail states#26
integrate-your-mind wants to merge 41 commits intomainfrom
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

Ensure codex in-flight ends within 2.5s of completion, pick active JSONL per process, and make opencode message completion authoritative. Remove wheel passive listener warnings and align docs/tests.
Start the server on the next available port during dev and ignore stale OpenCode status events when determining in-flight state.
integrate-your-mind and others added 11 commits February 5, 2026 21:53
- Tail Codex JSONL incrementally when log growth exceeds MAX_READ_BYTES and surface catch-up via TailState.needsCatchUp.

- Apply shouldParseJsonLine() before JSON.parse to skip noisy delta lines while still recording ingest time.

- Add integration coverage for needsCatchUp behavior.
- 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.

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