Skip to content

Conversation

@Wendong-Fan
Copy link
Contributor

Description

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Wendong-Fan and others added 5 commits November 20, 2025 16:25
Resolve merge conflicts in src/store/chatStore.ts by combining:
- Connection retry logic for SSE errors from main branch
- Cleanup logic for AbortController from pause_task_fix branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@Wendong-Fan Wendong-Fan merged commit bfcc500 into main Nov 20, 2025
2 checks passed
Comment on lines 1668 to 1679
onerror(err) {
console.error("Error:", err);
console.error("SSE Error:", err);
// Clean up AbortController on error
try {
if (activeSSEControllers[newTaskId]) {
delete activeSSEControllers[newTaskId];
}
} catch (error) {
console.warn('Error cleaning up AbortController on SSE error:', error);
}
throw err;
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we targetting for skip to behave like stop? @Wendong-Fan
🤔 If so I think we can re-implement the new on "error" message logic on #663.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is almost done @Wendong-Fan

Comment on lines +424 to -432

try {
// Skip the current task
// First, try to notify backend to skip the task
await fetchPost(`/chat/${projectStore.activeProjectId}/skip-task`, {
project_id: projectStore.activeProjectId
});

// Update task status to finished
chatStore.setStatus(taskId, 'finished');
// Only stop local task if backend call succeeds
chatStore.stopTask(taskId);
chatStore.setIsPending(taskId, false);

// toast.success("Task skipped successfully", {
// closeButton: true,
// });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wendong-Fan in this PR #735, it just makes the skip task == stop task.

  • Replay proof, where the skip task can be replicated with the replay api.
  • But maybe can borrow your idea of activeSSEControllers as it still suffers from ghost SSEs (i.e. Post stop)

Wendong-Fan added a commit that referenced this pull request Nov 20, 2025
This reverts commit bfcc500, reversing
changes made to 2bf89fd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants