open-notebook/frontend
Luis Novo 22d1ae7780
perf(chat): isolate composer state to fix IME lag in long conversations (#1174)
* perf(chat): isolate composer state to fix IME lag in long chats

Move the chat composer input state into a dedicated ChatComposer child so
keystrokes (including IME composition) no longer re-render the whole message
history. Memoize each message row with React.memo and make the reference-click
handler stable with useCallback so historical messages don't re-render on
composer input. Send behavior and the Ctrl/Cmd+Enter shortcut are preserved.

Closes #1147

* fix(chat): stabilize modal callbacks and use realistic shortcut tests

Memoize openModal/closeModal in useModalManager with useCallback so their
identities stay stable across renders. This keeps handleReferenceClick (which
depends on openModal) stable, so the memoized ChatMessage rows no longer
re-render on every ChatPanel render — completing the IME-lag fix.

Split the Ctrl/Cmd+Enter test into two realistic paths (Mac metaKey, non-Mac
ctrlKey) driven by a mocked userAgent, instead of an impossible combined
ctrlKey+metaKey event.
2026-07-19 12:42:09 -03:00
..
public Version 1 (#160) 2025-10-18 12:46:22 -03:00
src perf(chat): isolate composer state to fix IME lag in long conversations (#1174) 2026-07-19 12:42:09 -03:00
test-results feat(i18n): add Turkish (tr-TR) translation (#871) 2026-06-13 08:46:15 -03:00
.gitignore chore: export docs for custom gpt 2025-10-18 20:26:11 -03:00
AGENTS.md chore(frontend): typed locales, drop unused deps, fix AGENTS.md drift (#1061) 2026-07-11 18:45:57 -03:00
CLAUDE.md docs: restructure documentation around AGENTS.md, VISION.md and decision records (#1032) 2026-07-10 15:33:19 -03:00
components.json Version 1 (#160) 2025-10-18 12:46:22 -03:00
eslint.config.mjs Version 1 (#160) 2025-10-18 12:46:22 -03:00
next.config.ts fix: add type assertion for experimental proxyClientMaxBodySize config 2026-01-09 20:44:43 -03:00
package-lock.json chore(frontend): typed locales, drop unused deps, fix AGENTS.md drift (#1061) 2026-07-11 18:45:57 -03:00
package.json chore(frontend): typed locales, drop unused deps, fix AGENTS.md drift (#1061) 2026-07-11 18:45:57 -03:00
postcss.config.mjs Version 1 (#160) 2025-10-18 12:46:22 -03:00
start-server.js fix: use Node.js wrapper for cross-platform PORT fallback 2026-01-14 22:51:39 -03:00
tsconfig.json Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
vitest.config.ts fix: make validate_url() async so DNS resolution doesn't block the event loop (#1011) 2026-07-10 10:43:36 -03:00