Skip to content

fix: live-refresh desktop file panel on disk changes - #48448

Open
acehighdan wants to merge 2 commits into
anomalyco:devfrom
acehighdan:live-file-refresh
Open

acehighdan wants to merge 2 commits into
anomalyco:devfrom
acehighdan:live-file-refresh

Conversation

@acehighdan

@acehighdan acehighdan commented Sep 11, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #48451

Type of change

  • Bug fix

What does this PR do?

The desktop "All files" panel did not live-refresh on disk changes made outside the agent Write tool: created files appeared only after an unrelated refresh, and deleted files never disappeared.

Root cause: the filesystem watcher is location-scoped. When a session directory is invalidated, its inotify subscription is torn down and nothing re-subscribes it, so the panel stops receiving change events.

Fix, two parts:

  1. packages/core: watch the workspace directory unconditionally instead of gating it behind the experimental flag + VCS check, so non-git roots get live events too.
  2. packages/app: while the window is visible, poll every expanded/loaded directory every 5s when watcher events are absent. FileSystem.list is cacheless and error toasts are suppressed for polled directories. Watcher events remain the fast path.

How did you verify your code works?

  • bun typecheck clean and 45 file-context unit tests pass in packages/app.
  • Reproduced on the desktop app: external touch and rm now appear/disappear in the panel within one poll cycle.
  • Updated the core watcher test; confirmed it passes for non-git roots.

Screenshots / recordings

n/a (behavior change, verified live rather than visual)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Desktop file panel does not live-refresh on external file changes

1 participant