Commit Graph

6 Commits

Author SHA1 Message Date
gnanam1990
2c6ec0119e fix: prevent keyboard freeze when MCP notification effects fire
React 19 requires `supportsMicrotasks: true` in the reconciler host
config so it can flush state updates from passive effects via
queueMicrotask. Without this, state updates triggered inside
useMcpConnectivityStatus were silently dropped, corrupting React's
internal executionContext and causing all keyboard input to freeze
after the "N MCP server(s) need auth" notification appeared.

Root cause (three-part fix):

1. reconciler.ts: declare supportsMicrotasks + scheduleMicrotask so
   React 19 schedules passive-effect flushes correctly.

2. useMcpConnectivityStatus.tsx: wrap the MCP auth notification effect
   in try/catch so any unexpected throw does not propagate into
   flushPassiveEffects and permanently corrupt executionContext.

3. notifications.tsx: wrap addNotification, removeNotification, and
   processQueue in try/catch for the same reason — these are called
   from 12+ notification hooks across passive effects.

Also fixes a pre-existing test isolation bug in context.test.ts where
assigning `undefined` to process.env produced the string "undefined",
polluting the env for subsequent test files.

Resolves: #169, #205, #77
2026-04-03 07:41:53 +05:30
Kevin Codex
1ce19b9a39 Merge pull request #59 from Vasanthdev2004/gpt4o-max-tokens-test
test: cover OpenAI max token caps for gpt-4o and GPT-5.4
2026-04-02 08:24:25 +08:00
Vasanthdev2004
9951da5397 ci: add PR smoke and provider test checks 2026-04-02 00:00:12 +05:30
Vasanthdev2004
f0f6f1b285 test: add GPT-5.4 token coverage 2026-04-01 22:07:56 +05:30
Vasanthdev2004
29493bde1a test: cover gpt-4o max token limits 2026-04-01 21:59:21 +05:30
Vasanthdev2004
7ef085c605 test: cover deepseek max token limits 2026-04-01 19:17:58 +05:30