Skip to content

feat(files): refresh the files list from notify_push file changes - #65393

Draft
skjnldsv wants to merge 1 commit into
feature/node-attribute-sharesfrom
feature/files-live-refresh
Draft

skjnldsv wants to merge 1 commit into
feature/node-attribute-sharesfrom
feature/files-live-refresh

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

With notify_push set up, the Files list now picks up changes made elsewhere (desktop client, other users, WebDAV) without a reload. Instances without notify_push keep the current behavior.

The pushed ids are the changed node and its ancestors. The list fetches the changed children of the open folder, new files and the folder itself, in one request to the nodes API from #65400, then emits the usual files:node:* events. In a home folder with 5.5k shares that's ~200 ms for up to 20 files, where a DAV SEARCH took 2.4 s (numbers in #65395).

Choices worth a look:

  • Children are matched by path, a file listed twice through two shares is updated per path.
  • The current folder is updated in the store without files:node:updated, which would make the list refetch everything.
  • When the parent of the open folder changes, the list checks the folder: it follows it if it moved, and goes to the closest remaining ancestor with a toast if it was deleted.
  • Above 200 changed children, or when only the folder itself is pushed, the list compares a fileid/etag listing instead. The second case covers deletes with the trash bin on notify_push versions without fix: notify the original path of files moved to the trash bin notify_push#776.
  • The nodes API doesn't serve every attribute yet (comments, mount type, owner display name...). Updated nodes keep those from the listing, new nodes don't have them until those providers move.
  • Only the main Files view refreshes for now.

Unit tests cover the matching, the folder checks and the nodes API client. Not tested in a browser yet.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

@github-actions

This comment has been minimized.

When notify_push is available, the files list listens to the ids of
changed files and updates the current folder in place. Only the
changed children, new files and the folder itself are fetched, by id
through the nodes API, scoped to the current folder. When the parent of
the current folder changes, the folder is checked: if it moved the list
follows it, if it was deleted the list goes to the closest remaining
ancestor. A light listing of file ids and etags is compared instead
when more than 200 children changed, when only the folder changed, or
when shares changed in the root folder.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv force-pushed the feature/files-live-refresh branch from de68149 to d82334f Compare October 13, 2026 01:15
@skjnldsv
skjnldsv changed the base branch from master to feature/node-attribute-shares October 13, 2026 01:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Folders not live syncing in browser

1 participant