fix: reload open buffer via checktime when server edits a file - #71
fix: reload open buffer via checktime when server edits a file #71tamercuba wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new buffer-refresh behavior is user-visible but isn’t covered by a regression test in the existing sidebar test suite.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR addresses eca-nvim issue #70 by ensuring Neovim buffers don’t remain stale after the ECA server applies an on-disk file edit that originates from within the same Neovim session (so no FocusGained/autoread autocmd would fire).
Changes:
- On
toolCalledevents withdetails.type == "fileChange", resolvedetails.pathto an absolute path and call:checktimefor the corresponding loaded buffer (if any). - Continue appending the changed file’s basename to the tool-call summary text, now derived from the absolute path.
File summaries
| File | Description |
|---|---|
| lua/eca/sidebar.lua | Refreshes already-loaded buffers via checktime when a server-confirmed tool call reports a file change, preventing stale buffer content. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The change is scoped, directly addresses the reported issue, and is backed by targeted automated tests covering the key behavioral cases.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
@joaopluigi Im aware of the eca-nvim refactor, but IMO this is a fast-to-ship and simple feature that will improve a lot the user experience of eca-nvim :) |
Summary
Problem
When a tool call edits a file on the server side, neovim kept showing stale content for already open buffers until manual
:eor:checktimeEvidences
Before
After
#70