Do not react on already observed buffer edits' versions#46308
Merged
SomeoneToIgnore merged 1 commit intomainfrom Jan 8, 2026
Merged
Do not react on already observed buffer edits' versions#46308SomeoneToIgnore merged 1 commit intomainfrom
SomeoneToIgnore merged 1 commit intomainfrom
Conversation
da5db93 to
860b6fb
Compare
860b6fb to
f941e61
Compare
baldwindavid
added a commit
to baldwindavid/zed
that referenced
this pull request
Jan 8, 2026
* main: (349 commits) component_preview: Fix license symlink (zed-industries#46379) Do not react on already observed buffer edits' versions (zed-industries#46308) Fix EP CLI output flicker (zed-industries#46313) vim: Fix bug where repeat operator could lead to unrecoverable replaying state (zed-industries#46376) vim: Implement text-based matching bracket logic for Vim '%' motion to correctly find pairs within comments (zed-industries#45559) Improve LSP button error message (zed-industries#46377) agent: Make reject/accept keybindings consistent with restore/stage (zed-industries#46373) Enable test-support features for some dev dependencies (zed-industries#46370) Capture terminal output when thread is interrupted (zed-industries#46306) Inline assistant tools: no more feature flag (zed-industries#46107) Add `ep split` subcommand for dataset splitting (zed-industries#46364) lsp_button: Fix long LSP version label (zed-industries#46359) remote: Introduce a proper mock remote connection (zed-industries#46337) ep: Allow matching patches against files without trailing newlines (zed-industries#46357) docs: Update "Custom Keybindings for Extension-Based Agents section" to include a troubleshooting note for defining an agent name (zed-industries#46144) Fail early if clangd is downloaded on aarch Linux (zed-industries#46346) ep: Handle errored requests in Anthropic batches (zed-industries#46351) settings_ui: Fix settings search missing results when BM25 finds partial matches (zed-industries#46349) workspace: Unpreview active tab when closing other tabs (zed-industries#46294) terminal: Skip SHLVL when loading login shell environment (zed-industries#46273) ...
rtfeldman
pushed a commit
that referenced
this pull request
Jan 8, 2026
If I apply ```diff diff --git a/crates/action_log/src/action_log.rs b/crates/action_log/src/action_log.rs index 404fb36..ece063c34f 100644 --- a/crates/action_log/src/action_log.rs +++ b/crates/action_log/src/action_log.rs @@ -223,6 +223,7 @@ impl ActionLog { futures::select_biased! { buffer_update = buffer_updates.next() => { if let Some((author, buffer_snapshot)) = buffer_update { + dbg!(&author); Self::track_edits(&this, &buffer, author, buffer_snapshot, cx).await?; } else { break; ``` on top of `main`, `User` and `Agent` will always interleave. This happens because `action_log` does updates on `Entity<Buffer>` which is a current editor's buffer, tracked, and updated by agent output (acp or regular threads) — those updates come back as `BufferEvent::Edited` event after each agent's edit and forces unnecessary computations. Instead, update tracked buffer's version after each agent update report to only react on one, `Agent`-authored, edit events. Release Notes: - N/A
rtfeldman
pushed a commit
that referenced
this pull request
Jan 9, 2026
If I apply ```diff diff --git a/crates/action_log/src/action_log.rs b/crates/action_log/src/action_log.rs index 404fb36..ece063c34f 100644 --- a/crates/action_log/src/action_log.rs +++ b/crates/action_log/src/action_log.rs @@ -223,6 +223,7 @@ impl ActionLog { futures::select_biased! { buffer_update = buffer_updates.next() => { if let Some((author, buffer_snapshot)) = buffer_update { + dbg!(&author); Self::track_edits(&this, &buffer, author, buffer_snapshot, cx).await?; } else { break; ``` on top of `main`, `User` and `Agent` will always interleave. This happens because `action_log` does updates on `Entity<Buffer>` which is a current editor's buffer, tracked, and updated by agent output (acp or regular threads) — those updates come back as `BufferEvent::Edited` event after each agent's edit and forces unnecessary computations. Instead, update tracked buffer's version after each agent update report to only react on one, `Agent`-authored, edit events. Release Notes: - N/A
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…es#46308) If I apply ```diff diff --git a/crates/action_log/src/action_log.rs b/crates/action_log/src/action_log.rs index 404fb36..ece063c34f 100644 --- a/crates/action_log/src/action_log.rs +++ b/crates/action_log/src/action_log.rs @@ -223,6 +223,7 @@ impl ActionLog { futures::select_biased! { buffer_update = buffer_updates.next() => { if let Some((author, buffer_snapshot)) = buffer_update { + dbg!(&author); Self::track_edits(&this, &buffer, author, buffer_snapshot, cx).await?; } else { break; ``` on top of `main`, `User` and `Agent` will always interleave. This happens because `action_log` does updates on `Entity<Buffer>` which is a current editor's buffer, tracked, and updated by agent output (acp or regular threads) — those updates come back as `BufferEvent::Edited` event after each agent's edit and forces unnecessary computations. Instead, update tracked buffer's version after each agent update report to only react on one, `Agent`-authored, edit events. Release Notes: - N/A
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…es#46308) If I apply ```diff diff --git a/crates/action_log/src/action_log.rs b/crates/action_log/src/action_log.rs index 404fb36..ece063c34f 100644 --- a/crates/action_log/src/action_log.rs +++ b/crates/action_log/src/action_log.rs @@ -223,6 +223,7 @@ impl ActionLog { futures::select_biased! { buffer_update = buffer_updates.next() => { if let Some((author, buffer_snapshot)) = buffer_update { + dbg!(&author); Self::track_edits(&this, &buffer, author, buffer_snapshot, cx).await?; } else { break; ``` on top of `main`, `User` and `Agent` will always interleave. This happens because `action_log` does updates on `Entity<Buffer>` which is a current editor's buffer, tracked, and updated by agent output (acp or regular threads) — those updates come back as `BufferEvent::Edited` event after each agent's edit and forces unnecessary computations. Instead, update tracked buffer's version after each agent update report to only react on one, `Agent`-authored, edit events. Release Notes: - N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If I apply
on top of
main,UserandAgentwill always interleave.This happens because
action_logdoes updates onEntity<Buffer>which is a current editor's buffer, tracked, and updated by agent output (acp or regular threads) — those updates come back asBufferEvent::Editedevent after each agent's edit and forces unnecessary computations.Instead, update tracked buffer's version after each agent update report to only react on one,
Agent-authored, edit events.Release Notes: