Skip to content

fix(dashboard): keep SSE live after event log compaction - #888

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
ydflow:fix/dashboard-watch-after-compaction
Sep 29, 2026
Merged

jeff-r2026 merged 1 commit into
Tencent:mainfrom
ydflow:fix/dashboard-watch-after-compaction

Conversation

@ydflow

@ydflow ydflow commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The dashboard watches events.jsonl directly, but compaction atomically replaces that file. On Linux and macOS, Node's fs.watch remains attached to the old inode after replacement, so later appends stop reaching existing /events SSE connections (Node.js fs.watch inode caveat).

Watch the containing directory and filter notifications to events.jsonl, keeping the existing debounce and SSE delivery. The built-CLI regression test now atomically replaces the log and checks that a later append reaches the same open stream.

Verification

  • npm run build — passed
  • npx vitest run --config vitest.e2e.config.ts src/__tests__/e2e/dashboard-unified.test.ts — 3 passed
  • npm run typecheck — passed
  • npm run lint — passed
  • Ran locally on Windows; the repository CI matrix covers Ubuntu and macOS, where file watchers are inode-bound.

@jeff-r2026 jeff-r2026 self-assigned this Sep 28, 2026
@github-actions

Copy link
Copy Markdown

No findings.

The PR description documents sufficient testing, including a representative built-CLI end-to-end SSE regression test.

@jeff-r2026
jeff-r2026 merged commit c787443 into Tencent:main Sep 29, 2026
13 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
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