Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Jan 12, 2026

Description

Wait for the previous edit tool to create its diff in the IDE before the next edit tool.
This caused race conditions because the code required the text editor to be active for the diff to be streamed into the proper file.

resolves CON-5048

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before.mp4
after.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks

Status Task Actions
▶️ Queued Update docs on PR View

Powered by Continue


Summary by cubic

Prevent race conditions when multiple edit tools apply diffs at the same time. We now wait for the previous apply to finish so each diff streams to the correct file.

  • Bug Fixes
    • Added selectApplyStatesInProgress to track in-progress apply states.
    • Updated applyForEditTool to wait if more than one apply is active (1s polling) to serialize diff application.
    • Addresses CON-5048 by preventing diffs from appearing in the wrong file.

Written for commit 2e40292. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner January 12, 2026 15:49
@uinstinct uinstinct requested review from sestinj and removed request for a team January 12, 2026 15:49
@continue-staging
Copy link

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

1 similar comment
@continue
Copy link
Contributor

continue bot commented Jan 12, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 12, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="gui/src/redux/thunks/handleApplyStateUpdate.ts">

<violation number="1" location="gui/src/redux/thunks/handleApplyStateUpdate.ts:172">
P1: Concurrent apply thunks can deadlock: the wait loop counts the current not-started apply state, so two simultaneous calls both wait forever and never call applyToFile.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant