Skip to content

perf(desktop): chat selection and deletion become very slow with large chat lists #575

Description

@0xSolarPunk

What and why

On desktop, selecting a chat/sidebar row and opening its actions feels very slow. Confirming Delete is also extremely slow before the chat disappears. The behavior feels like UI/main-thread or memory pressure when the workspace contains many dense chats, but the exact split between frontend rendering and backend deletion needs profiling.

Evidence

A 9.28-second screen recording shows:

  • delayed sidebar interaction/row action-button selection;
  • Delete confirmation appearing, followed by a visibly slow delete completion;
  • a dense chat list and large transcript content in the same workspace.

Reproduction

  1. Open Garcon desktop with a workspace containing many chats and at least one large transcript.
  2. Move across/select chat rows and open the row action menu.
  3. Choose Delete and confirm.
  4. Measure click-to-menu response and confirm-to-chat-removed response.
  5. Repeat with a small workspace or after reducing the loaded transcript size.

Expected

  • Chat row selection and action-menu opening respond within one frame / feel immediate.
  • Delete removes the chat from the visible registry immediately after the durable registry mutation.
  • Heavy provider/native transcript cleanup does not block the user-visible delete response.
  • Memory and long-task usage remain bounded as chat count/transcript size grows.

Actual

  • Sidebar button/row selection is noticeably delayed.
  • Delete confirmation and completion feel extremely slow.
  • Suspected large-list/transcript rendering or memory pressure, possibly compounded by synchronous backend/provider cleanup.

Investigation / acceptance criteria

  • Capture Chrome Performance trace and heap snapshot while reproducing selection/menu delay.
  • Measure chat-list render/update cost, event-handler latency, long tasks, DOM node count, and retained heap by chat count/transcript size.
  • Measure DELETE request phases separately: request admission, registry removal/flush, ledger removal, provider transcript release, and response completion.
  • Ensure delete response is not blocked by slow provider transcript release once durable deletion intent and registry removal are committed.
  • Reduce unnecessary sidebar rerenders and verify virtualization/memoization boundaries for large chat lists.
  • Add regression coverage and before/after measurements for both selection latency and delete response latency.
  • Verify delete cleanup remains durable/retryable across provider timeout, restart, and failure.

Notes

Do not hide projection duplicates by modifying native Codex/Claude JSONL or carry-over storage. Preserve delete correctness, shares, metadata, project settings, and transcript cleanup semantics while improving responsiveness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions