syncthing: Syncthing status & control (port of the v4 syncthing-status plugin) - #71
syncthing: Syncthing status & control (port of the v4 syncthing-status plugin)#71rylos wants to merge 6 commits into
Conversation
Port of the v4 syncthing-status plugin (by Pir0c0pter0) to the v5 Luau plugin API. Talks to the Syncthing REST API directly via noctalia.http (no helper scripts). Bar widget, Folders|Devices panel with per-folder and per-device pause/resume and rescan, sync progress, transfer rates, event notifications, /st launcher provider, global-pause shortcut, and a desktop widget. en + it translations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The curl fallback interpolates cfg.apiKey and cfg.baseUrl directly into a command executed through /bin/sh -c. Double quotes still permit command substitutions such as $() and backticks, while embedded quotes can escape the intended argument. syncthing/service.luau:142 and the GUI opener at syncthing/service.luau:564 have the same unsafe interpolation problem. Noctalia main now provides allow_insecure_tls through noctalia.http at plugin API 7. Remove the curl branch and use noctalia.http for every request, passing allow_insecure_tls = cfg.insecure. Update syncthing/plugin.toml:9 to plugin_api = 7 and remove the curl-specific claims from syncthing/README.md:61, syncthing/README.md:82, and syncthing/translations/en.json:25. The remaining GUI opener must robustly shell-quote cfg.baseUrl or use a shell-free opener API.
The manifest declares only syncthing, but syncthing/service.luau:564 spawns gio and xdg-open. Repository policy requires external commands to be declared and documented under Requirements. After migrating insecure TLS to noctalia.http, curl no longer needs to be declared. Declare the remaining opener commands, or simplify the implementation to one safely invoked and declared opener. |
|
Review follow-up on noctalia-dev#71: - every REST request now goes through noctalia.http with allow_insecure_tls (plugin_api 3 -> 7); the curl branch that interpolated the API key, base URL and body into a shell command line is gone, and the GUI opener shell-quotes its URL. - declare gio and xdg-open in dependencies and document all three commands in the README Requirements section. - format the last-check time with strftime, seed bar and desktop widgets from the current snapshot instead of waiting for the next publish, and give the panel room for four device rows without a border on each.
The root column's height is measured inside its padding, so pinning it to the manifest height pushed the footer past the panel edge; subtract the padding instead. publish() was the only place clearing `busy`, so an HTTP callback that never fired left the poller stuck with no further updates and a frozen last-check time. Restart the poll after a grace period.
Four devices needed a scrollbar. The idle summary line repeated what the header and the device tile already say, so it now shows only for the states that add information; the column gap is tighter and the content leaves slack for the panel frame so the footer is not flush against it.
|
You need to fill the template and fix you plugin. (I restored the PR template for you to fill) |
Plugin
<author>/<plugin>plugin.toml)What it does
External dependencies
Testing
Screenshots / Videos
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.