Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; the previous multi-window update bug is fixed. SummaryAdds plugin watches that trigger polls and refresh file details, with a bundled Dropbox watch.
Reviews (6) · Last reviewed commit: "Keep an early answer early until a fresh..." · Reviewed by Greptile |
Contributor
|
Thanks for this, and for writing up #77 first. The interface reads well, but it's a new piece of the plugin API (a long-running command per plugin, restarts, process groups, and a change to how details are forgotten), and nothing bundled uses it yet, so it needs a product decision before it goes in. What would make it mergeable:
Happy to look again once it's there. |
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 watch's last error line A watch printing a line every half second had each details command's answer dropped before it came, so a command slower than that showed nothing for a file until the watch went quiet, while the dropped commands kept running. A command still running when its plugin's state changes is now left to finish, its answer shown, and run once more after, as a poll is. F5 still drops the answers on their way. A watch ending on a line of standard error without a newline has it printed too, as other commands do, since it can be the only reason it stopped. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
While a watch kept printing, every answer was an early one, and its callers were kept for the command's next run while each change added another, so the list grew for as long as the watch went on. Callers are now let go once told, the next run starts without any, and whoever shows the file is told to read it again when that run had nobody waiting. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
cornedor
force-pushed
the
plugin-watch
branch
from
November 22, 2026 17:46
17304e3 to
71f6077
Compare
A details command whose plugin's state changed while it ran used to run itself once more, carrying along what its callers had asked so it could tell whether the file was still shown. The early answer is now kept and shown but stays marked, and whoever still shows the file asks again the usual way; a file nobody shows isn't asked about until it's shown again. A watch's standard error is split into lines by the same code as other commands', and its held lines are acted on the way its first is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
cornedor
force-pushed
the
plugin-watch
branch
from
November 22, 2026 18:07
c2c7bab to
d7955e4
Compare
Contributor
Author
|
Thanks for the look. All three are in now:
|
Whether an answer came early was kept with the command still running, and forgotten when the first window asked again. A second window showing the same file then took the early answer for the plugin's latest and wasn't told of the fresh one, and a follow-up skipped because its caller had moved on left the early answer looking current. It's now kept with the answer itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #77.
A manifest's
watchis a command Folio starts when the plugins are read and leaves running. Each line it prints has the plugin polled at once and its details asked for again, so a change the plugin learns about shows in the details column when it happens, not at the next poll or F5.The first line is acted on at once and those within half a second after it together, so a watch can print one per change. One that ends is started again every 5 seconds; it ends with Folio or its plugin, with everything it started, and F5 leaves a running one be. Unlike the other commands it isn't waited for in a pool: its lines come in as events on Folio's own thread. A details command still running when a line comes finishes and its answer is shown; whoever still shows the file then asks again, so a file nobody shows isn't asked about until it's shown again.
The bundled Dropbox plugin uses it. Its watch stays on
~/.dropbox/iface_socket, the socket Dropbox's own Nautilus extension (and Nemo's and Caja's) listens on, and prints a line for eachshell_touchDropbox sends there, and when Dropbox stops or starts. It's sh with the python3 that dropbox-cli already needs, so there's nothing new to install; without Dropbox or python3 it waits quietly and the plugin works as before, at the poll's pace.Tried against Dropbox 274.4.4905 (x86_64, in a VM, on my own account):
shell_touchonly for files a client has asked about.filestatusasks about the file whose details are shown, so that's the one the watch hears about: of two files changed on dropbox.com, only the one asked about was touched.The asking after each touch was done by a probe keeping Folio's timing (one ask per touch, half a second of settling), not by Folio's window itself.
🤖 Generated with Claude Code