Case · 2026

AI chat — optimization & evolution

Maintenance and feature work on a large AI chat product: dozens of models, custom assistants, chat folders, rich-formatted messages. Performance work for thousands of messages and heavy markdown.

Client
Under NDA
Year
2026
Scope
Frontend · Performance · Refactor
Duration
Feb 2026 — present
Team
Solo on frontend
GPT-5.5
⌘K
U
*
U
*
+
Ask anything…
GPT-5.5
U
*
U
*
Message

Context

A mature chat application that had grown into a heavy product: many AI models, assistants, chat folders, message formatting. At scale the typical issues piled up — the bundle gained weight, long conversations stuttered on render, duplicated dependencies added kilobytes and unpredictable behavior.

Solution

Virtualized the message list and chat list with dynamic-height cells — smooth scrolling across thousands of items of any size. Split rendering into layers so virtualization handled variable-height content cleanly.

Trimmed heavy list components: pulled markdown utilities out of cells so they didn't load on every re-render or pull extra weight into the chunk.

Dependency dedupe: dropped three parallel date libraries (kept one) and combed through the rest of package.json — pulled out dead and redundant packages left over from old revisions that the code no longer used. Visible bundle savings. Cleaned up duplicated logic between server state and the client store, killed unnecessary re-renders.

Typewriter effect for streamed model responses. Clipboard parsing from Word, Excel and other editors — tables and formatting paste into the chat input without losing structure.

Stack
ReactTypeScriptZustandTanStack QueryTanStack Virtualreact-markdownVite

Outcome

The bundle dropped noticeably after deduping the dependencies. Long conversations — thousands of messages with variable cell heights — scroll smoothly thanks to the virtualization. The typewriter stream and clipboard parsing made working with model output and documents feel more natural.