PR #224 fixed an AI-chat streaming-render regression by moving the React.memo content signature into the parent: MessageList now snapshots messageSignature(message) per render and passes it to MessageItem as the immutable `signature` prop. The existing memo tests only SIMULATED that parent half by hardcoding `signature={messageSignature(message)}` in their harness; the real MessageList was never exercised (chat-thread.test.tsx mocks it out, and there was no message-list.test). Add message-list.test.tsx that mounts the REAL MessageList (without mocking MessageItem or messageSignature) and asserts that an in-place mutation of a reused message object surfaces on re-render. This guards the parent-side contract: re-caching the signature on message identity (stable across deltas while parts mutate) would refreeze the row, and this test would fail. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist