Skip to content

Fix ghost session created by Ping health-check event#19

Merged
kosinal merged 1 commit intomasterfrom
feature/18-unknown-session-ping-at-start
Feb 25, 2026
Merged

Fix ghost session created by Ping health-check event#19
kosinal merged 1 commit intomasterfrom
feature/18-unknown-session-ping-at-start

Conversation

@kosinal
Copy link
Owner

@kosinal kosinal commented Feb 25, 2026

Summary

  • Ignore Ping health-check events in handleEvent() so they don't create phantom sessions with unknown cwd
  • Fixes Unknown - session ping - at start #18: Unknown session appearing on dashboard at startup

Changes

  • src/state.ts: Added early return null for Ping events, right after the existing SessionEnd check
  • src/state.test.ts: Added 2 test cases covering Ping on non-existing and existing sessions

Test plan

  • npm test — all 76 tests pass including 2 new Ping tests
  • npm run lint — no lint errors on changed files
  • npm run build — builds successfully

🤖 Generated with Claude Code

Ignore Ping events in handleEvent() so the health check doesn't create
a phantom session with unknown cwd.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kosinal kosinal merged commit ee81cc6 into master Feb 25, 2026
6 checks passed
@kosinal kosinal deleted the feature/18-unknown-session-ping-at-start branch February 25, 2026 07:21
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.

Unknown - session ping - at start

1 participant