Skip to content

Fix batched file move watcher events#10217

Open
gabrimatic wants to merge 1 commit intowarpdotdev:masterfrom
gabrimatic:gabrimatic/file-tree-move-events
Open

Fix batched file move watcher events#10217
gabrimatic wants to merge 1 commit intowarpdotdev:masterfrom
gabrimatic:gabrimatic/file-tree-move-events

Conversation

@gabrimatic
Copy link
Copy Markdown

Description

Fixes stale file tree entries after batched file move events. Linux can report multiple rename sources before their matching targets, and the watcher previously kept only one pending source path.

This queues pending rename sources and pairs them with rename targets in order, so multi-file mv file1 file2 subdir/ batches remove each old path and add each new path correctly.

Linked Issue

Fixes #9592

Testing

  • cargo fmt --package watcher -- --check
  • cargo test -p watcher pairs_batched_rename_from_and_to_events_in_order
  • cargo test -p watcher
  • cargo clippy -p watcher --all-targets -- -D warnings

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@gabrimatic

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This change factors the watcher event merge logic so it can be unit-tested against raw notify events, then queues RenameMode::From paths and consumes them FIFO when matching RenameMode::To events arrive. The added test covers the Linux-style batched from/from/to/to ordering described in the PR.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested review from a team and vkodithala and removed request for a team May 6, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File tree panel shows stale file locations after git mv / mv operations

1 participant