v0.6.62: fix new copilot chat creation and selection on refresh#4342
v0.6.62: fix new copilot chat creation and selection on refresh#4342TheodoreSpeaks merged 1 commit intomainfrom
Conversation
TheodoreSpeaks
commented
Apr 29, 2026
- fix(copilot): fix new task error (fix(copilot): fix new task error #4341)
* fix(copilot): fix new task error * Keep recent copilot chat open on refresh
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview The auto-select effect now waits for a non-empty list before selecting a default chat, and Reviewed by Cursor Bugbot for commit 8d042f7. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR correctly addresses two interlinked bugs in the copilot panel. Bug 1: Confidence Score: 5/5Safe to merge — targeted, well-reasoned fixes with no regressions introduced. Both changes are minimal and correct: the auto-select guard reordering is straightforwardly sound, and the optimistic cache seed matches the exact CopilotChatListItem shape. No new state is introduced and the subsequent invalidateQueries reconciles the cache with the server. No P0 or P1 findings. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant C as handleCopilotNewChat
participant QC as QueryClient Cache
participant S as setCopilotChatId
participant E as Auto-select Effect
participant API as /api/copilot/chats
U->>C: clicks "New Chat"
C->>API: POST /api/copilot/chats
API-->>C: { id: "new-chat-id" }
Note over C: Before fix: setCopilotChatId then loadCopilotChats
C->>QC: setQueryData — seed new chat into list cache
C->>S: setCopilotChatId("new-chat-id")
S-->>E: triggers auto-select effect
E->>QC: reads copilotChatList (contains seeded chat)
Note over E: copilotChatId set AND found in list → no deselect
C->>QC: invalidateQueries (loadCopilotChats)
QC->>API: GET /api/copilot/chats
API-->>QC: updated list (includes new chat)
Reviews (1): Last reviewed commit: "fix(copilot): fix new task error (#4341)" | Re-trigger Greptile |