Summary
UI testing is blocked by slow chat loading: the home page rescans Cursor's full global KV index across all projects on every load (often 1–2+ min), and opening a workspace assembles every conversation with full bubble bodies before the sidebar renders. There is no summary cache.
Problem
GET /api/workspaces runs list_workspace_projects(), which loads all composerData, all bubbleId rows, and all messageRequestContext rows from global storage on every request—even though the UI only needs project cards (id, name, conversationCount, lastModified).
GET /api/workspaces/<id>/tabs runs assemble_workspace_tabs(), which loads all global bubbles then builds full tab payloads for every conversation in the project before first paint.
- No application-level cache for derived summaries.
Proposed solution
- Summary-only list endpoints (no full global
bubbleId scan on list paths).
- Lazy-load full conversation content when a tab is selected (split API + workspace UI).
- Optional mtime-keyed cache for summaries.
Acceptance criteria
- Home and workspace sidebar usable in < 3 s on a large local fixture.
- List routes do not full-scan global bubbles (test or documented audit).
- Export/full assembly paths remain correct.
- Tests + optional warnings for partial/stale summary builds.
Summary
UI testing is blocked by slow chat loading: the home page rescans Cursor's full global KV index across all projects on every load (often 1–2+ min), and opening a workspace assembles every conversation with full bubble bodies before the sidebar renders. There is no summary cache.
Problem
GET /api/workspacesrunslist_workspace_projects(), which loads allcomposerData, allbubbleIdrows, and allmessageRequestContextrows from global storage on every request—even though the UI only needs project cards (id,name,conversationCount,lastModified).GET /api/workspaces/<id>/tabsrunsassemble_workspace_tabs(), which loads all global bubbles then builds full tab payloads for every conversation in the project before first paint.Proposed solution
bubbleIdscan on list paths).Acceptance criteria