Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit: Flush diffs on apply #2304

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Edit: Flush diffs on apply #2304

merged 1 commit into from
Dec 12, 2023

Conversation

umpox
Copy link
Contributor

@umpox umpox commented Dec 12, 2023

closes #2082

Description

Diffs can be scheduled - these update decorations, but this can conflict with removing the decorations when a task is applied.

So we have a race condition where it is possible that:

  1. The task is applied, and decorations are removed
  2. Later, a scheduled diff updates and re-applies the old decorations

To work around this, we just ensure that any scheduled diff updates are ran before we finally remove all decorations

Test plan

  1. Run an edit

  2. Confirm that decorations are not shown on apply

  3. Run the /doc command

  4. Confirm that decorations are not shown on apply

@umpox umpox requested review from toolmantim, a team and kalanchan December 12, 2023 14:04
Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

Friends Clap

@umpox umpox merged commit 2f12f38 into main Dec 12, 2023
15 checks passed
@umpox umpox deleted the tr/flush-diff-on-apply branch December 12, 2023 15:42
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.

bug: /doc command leaves code decorations after edits are applied
2 participants