Skip to content

[Bug] rejectAll() does not await asynchronous cleanup #725

Closed

Description

@akramcodez

Description

rejectAll() invokes the asynchronous rejectChange() method without awaiting its completion, allowing multiple rejection operations to execute concurrently. This may lead to overlapping cleanup when several pending diffs are rejected at once.

Environment

  • OS: Any
  • Node version: Any
  • Nanocoder version: Latest
  • Provider: N/A
  • Model: N/A

Steps to Reproduce

  1. Open multiple pending diffs.
  2. Trigger Reject All.
  3. Observe how the pending changes are rejected and cleaned up.

Expected Behavior

Each pending change should be rejected and cleaned up reliably before moving to the next one.

Actual Behavior

rejectChange() is invoked without awaiting completion, allowing multiple cleanup operations to run concurrently.

Logs/Screenshots

N/A

Additional Context

  • If rejectChange() performs asynchronous cleanup that depends on shared editor state, concurrent execution could result in race conditions.
  • Note: This behavior should be verified to ensure concurrent execution is intentional before changing it to sequential execution.
  • Note: This issue is intentionally kept small and is suitable for first-time contributors. If you're interested in working on it, please leave a comment below and ask to be assigned before opening a pull request.

Activity

  1. added
    bug
    good first issue
    on Jul 31, 2026
  2. jmdlrg commented on Jul 31, 2026

    @jmdlrg
    Contributor

    Hi! I'd like to work on this — could you assign it to me? @akramcodez

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

Metadata

Metadata

Assignees

Labels

buggood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions