Skip to content

Have the Nextcloud plugin watch its client - #1

Open
cornedor wants to merge 3 commits into
nextcloud-plugin-shfrom
nextcloud-watch
Open

cornedor wants to merge 3 commits into
nextcloud-plugin-shfrom
nextcloud-watch

Conversation

@cornedor

Copy link
Copy Markdown
Owner

An example of what omacom#78 (a plugin's watch) is for: the Nextcloud plugin on nextcloud-plugin-sh, with a watch added.

Without it, a file's row in the details pane says "syncing" until F5, because nothing the plugin's poll prints changes when a sync ends. The Nextcloud client says on its socket when something in a folder it syncs changed (UPDATE_VIEW:<folder>), so the watch is two lines: stay on the socket with socat and pass on what comes.

This branch has three commits beyond its base: the merge of the watch API from omacom#78, which is not part of this change, and "Have the Nextcloud plugin watch its client", which is. That last commit is the one to read:

  • plugins/nextcloud/watch: the watch itself.
  • plugins/nextcloud/manifest.json: "watch": { "command": ["./watch"] }.
  • plugins/nextcloud/socket.sh: where the client listens, shared by ask and watch.
  • A test against the stand-in client, and the plugin's paragraph in docs/plugins.md.

Not for merging as it is: it waits on omacom#78.

cornedor and others added 3 commits November 11, 2026 20:59
A poll asks on a timer, and a file's details are asked for once and kept, so
a plugin whose state changes on its own (a sync finishing) showed it late, or
not until F5. A manifest's "watch" is a command Folio leaves running; each
line it prints has the plugin polled at once and its details asked for again.
Lines that come close together are acted on once, a watch that ends is
started again every 5 seconds, and it ends with Folio or its plugin, with
everything it started.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A file's row in the details pane said "syncing" until F5, since nothing the
poll prints changes when a sync ends. The client says on its socket when
something in a folder it syncs changed, so the plugin's watch stays on the
socket and passes that on, and Folio asks again as the sync goes.
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.

1 participant