Skip to content

syncthing: Syncthing status & control (port of the v4 syncthing-status plugin) - #71

Draft
rylos wants to merge 6 commits into
noctalia-dev:mainfrom
rylos:add-syncthing
Draft

syncthing: Syncthing status & control (port of the v4 syncthing-status plugin)#71
rylos wants to merge 6 commits into
noctalia-dev:mainfrom
rylos:add-syncthing

Conversation

@rylos

@rylos rylos commented Jul 21, 2026

Copy link
Copy Markdown

Plugin

  • Id: <author>/<plugin>
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

External dependencies

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Noctalia version tested against:
  • Plugin API level:

Screenshots / Videos

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

rylos and others added 3 commits July 21, 2026 10:12
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>
@ItsLemmy

Copy link
Copy Markdown
Contributor
  1. blocking - syncthing/service.luau:134

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.

  1. blocking - syncthing/plugin.toml:12

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.

@ItsLemmy

Copy link
Copy Markdown
Contributor
  1. Use the thumbnail generator, and use the proper PR template. you skipped all the checklist and important stuff

@ItsLemmy
ItsLemmy marked this pull request as draft July 22, 2026 03:57
rylos added 3 commits July 27, 2026 00:19
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.
@ItsLemmy
ItsLemmy marked this pull request as ready for review July 27, 2026 02:25
@ItsLemmy
ItsLemmy marked this pull request as draft July 27, 2026 02:25
@ItsLemmy

Copy link
Copy Markdown
Contributor

You need to fill the template and fix you plugin. (I restored the PR template for you to fill)

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.

2 participants