mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
130e780418
* fix openModal crash when action has no thread context Home tab actions (e.g. Change Team) have no thread → openModal closure crashed accessing thread.channel on null. Guard thread access in the openModal closure and pass undefined to storeModalContext. Add test for empty threadId action → openModal works with null thread. * add changeset * make ActionEvent.thread nullable, remove unsafe cast - Change `ActionEvent.thread` type from `Thread` to `Thread | null` - Remove `null as unknown as Thread` unsafe cast in handleActionEvent - Update test files to use null guards and optional chaining Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Integration Tests
Integration tests for the Chat SDK that verify real-world webhook payloads are handled correctly.
Test Categories
- Unit tests (
slack.test.ts,teams.test.ts,gchat.test.ts) - Test adapter functionality with mock payloads - Replay tests (
replay*.test.ts) - Replay actual production webhook recordings
Replay Tests
Replay tests use recorded webhook payloads from production to verify the SDK handles real interactions correctly.
See fixtures/replay/README.md for:
- How to record new fixtures
- Fixture format documentation
- SHA-based recording workflow
- Platform-specific webhook formats
Running Tests
# Run all integration tests
pnpm --filter @chat-adapter/integration-tests test
# Run with watch mode
pnpm --filter @chat-adapter/integration-tests test:watch