Adjust new task button to create new task#4063
Adjust new task button to create new task#4063TheodoreSpeaks wants to merge 6 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@BugBot review |
PR SummaryMedium Risk Overview The tasks list API now returns Reviewed by Cursor Bugbot for commit 2ba89a7. Bugbot is set up for automated code reviews on this repo. Configure here. |
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
|
@BugBot review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2ba89a7. Configure here.
| }, [hasMessages]) | ||
|
|
||
| if (!hasMessages && !chatId) { | ||
| if (!hasMessages && isHistoryReady) { |
There was a problem hiding this comment.
Greeting screen flashes on task page navigation
Medium Severity
The condition changed from !hasMessages && !chatId to !hasMessages && isHistoryReady. The messages state is initialized as [] via useState and only populated from chatHistory via a useEffect that runs after the render. When navigating to a task page with existing messages, isHistoryReady becomes true (cache hit) before the effect populates messages, so for at least one render frame !hasMessages && isHistoryReady evaluates to true, causing the "What should we get done?" greeting to flash. The old !chatId guard prevented this because chatId is always set on the task page.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2ba89a7. Configure here.
| ) | ||
| router.replace(`/workspace/${workspaceId}/task/${parsed.chatId}`) | ||
| abortControllerRef.current?.abort() | ||
| streamGenRef.current++ |
There was a problem hiding this comment.
Router navigation aborts active SSE message stream
Medium Severity
Replacing window.history.replaceState with router.replace causes a full Next.js route transition that unmounts the component during active streaming. The stream is explicitly aborted and the generation counter incremented, interrupting the assistant's response mid-generation. The task page must then reconnect from event 0, replaying the entire response from scratch, causing a visible disruption where the partial response disappears and then rapidly replays.
Reviewed by Cursor Bugbot for commit 2ba89a7. Configure here.


Summary
Adjust create task behavior to create a new task instead of redirecting to home to be in line with create workflow
Type of Change
Testing
Checklist
Screenshots/Videos