• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 25647934416

11 May 2026 02:58AM UTC coverage: 82.452% (+0.003%) from 82.449%
25647934416

push

github

web-flow
refactor: extract remaining StateManager forwarding into ClientEventBridge (#1850)

* refactor: extract remaining StateManager forwarding paths into ClientEventBridge

Move all daemon-to-client event forwarding from StateManager into ClientEventBridge:
- Session events (created, deleted, context.updated) via SESSION_BRIDGE_MAPPINGS
- Connection/auth events (api.connection, auth.changed)
- Config events (commands.updated)
- Error events (session.error, session.errorClear)
- Versioned broadcast method triggers via new StateBroadcasts interface

StateManager now only updates caches; ClientEventBridge handles all client projection.
Fix channelVersions cleanup on session.deleted to remove SESSION, SESSION_SDK_MESSAGES,
and SESSION_SDK_MESSAGES.delta channels.

Update tests to reflect the new split architecture.

* refactor: address review feedback for ClientEventBridge extraction

- P1: Add broadcastSessionStateChange trigger for context.updated
  (old handler did both gateway forwarding AND broadcast; extraction
   only preserved the first. Now both are restored.)
- P2: Trim StateBroadcasts interface to only used methods
  (broadcastSystemChange, broadcastSessionStateChange)
- P2: Add console.warn in subscribeBroadcast catch block
- P2: Return promise from subscribeBroadcast so TypedHub awaits
  broadcasts, preserving emit completion semantics
- P3: Call clientEventBridge.stop() in app.ts cleanup
- Update tests: mock supports multiple handlers per event;
  add context.updated broadcast trigger test

* fix: replace console.warn with Logger in ClientEventBridge

8346 of 11648 branches covered (71.65%)

Branch coverage included in aggregate %.

78 of 82 new or added lines in 3 files covered. (95.12%)

1 existing line in 1 file now uncovered.

65467 of 77874 relevant lines covered (84.07%)

290.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.74
/packages/web/src/components/MessageInput.tsx


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc