Skip to content

Install reviewed community plugins from a plugin hub - #34

Merged
CodySimonds65 merged 22 commits into
feature/web-pluginsfrom
feature/plugin-hub
Oct 3, 2026
Merged

CodySimonds65 merged 22 commits into
feature/web-pluginsfrom
feature/plugin-hub

Conversation

@CodySimonds65

@CodySimonds65 CodySimonds65 commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Part 3 of the plugin system: the plugin hub. It merges into part 2 (#33), not main.

Authors keep a plugin in a public GitHub repository and submit it by pull request to the hub repository, FourFoldAccountManager-plugin-hub. A maintainer reviews it. Users then search and install it inside FourFold. FourFold never installs a plugin from a file.

  • Plugin hub page: the plugin list (the wrench) has a Plugin hub button. The page has a search box and one row per plugin with Install, Details, Source and Uninstall.
    • Details shows the description, the sites the plugin can contact, the cards it adds and when it was reviewed.
    • A plugin cleared for any website says "Can contact any website" in gold before you install it.
    • The page shows the first 50 matches; searching narrows it.
    • Opening the page checks the hub, at most once a minute. The Refresh button beside the search box checks at once.
  • Installing: FourFold downloads the catalog and the package from fixed addresses on GitHub. A package is installed only when its size and SHA-256 match the catalog, it unpacks cleanly, and its plugin.json matches the catalog entry (id, version, sites).
  • Updating: when the catalog names a newer reviewed commit, FourFold installs it without asking, at start and every 6 hours while something is installed. The plugin's saved data is kept.
  • Pulled plugins: a plugin the maintainers remove from the hub is switched off on every machine that has it. Its data is kept, and the plugin list shows the reason with an Uninstall button.
  • Uninstalling: FourFold asks first, then deletes the plugin's files, saved data and browser storage.
  • The community bar: every community plugin's panel has a 24 px bar on top with the plugin's name, its author and a COMMUNITY tag (DEV for dev-folder plugins).
  • Opening links: openExternal now opens a link only on a site the plugin declared (any public site for a plugin cleared for any website).
  • The hub tool: src/FourFoldAccountManager.HubTool, a small console program the hub repository's workflows run. check validates one submission with the app's own rules, builds its package and writes the summary a maintainer reads. publish builds the catalog and the packages.
  • Author guide: PLUGIN_AUTHORS.md gains "Getting on the hub", with every rule a submission meets.

Trust

  • No signing key. Trust is: the catalog came over HTTPS from the fixed address, and each package matches the catalog's size and hash.
  • Any-website access needs both the plugin's plugin.json to ask for it and the hub entry to clear it, at the exact commit that is installed. A clearance that is revoked takes effect at the next check, without a restart.
  • A dev-folder copy stands in for a hub plugin with the same id only while developer mode is on.
  • A declared site must be a plain host name: letters, digits, dots and dashes after conversion; an international name is stored in its xn-- form. This also closes a hole in part 2, where a crafted site name could add text to a plugin page's content security policy.

Behavior to know about

  • New saved files under %LOCALAPPDATA%\FourFoldAccountManager: plugins\<id>\ (installed plugins), hub\installed.json (what is installed, at which commit) and hub\catalog.json (the last catalog, used offline).
  • No request to the hub is made until the hub page is opened or a hub plugin is installed.
  • Offline: installed plugins keep running from the last catalog. The hub page says it couldn't be reached and offers Try again.
  • A plugin whose host name has an underscore can no longer declare that site, in dev plugins too.
  • Hub downloads give up after two minutes.
  • Known limits:
    • Updates install without asking, including ones that add sites. The maintainers' review is the gate.
    • A pulled plugin that is listed again at a new commit can run its old version, with its declared sites only, until that machine installs the new one.
    • The catalog has no serial number: an older catalog served from the fixed address moves plugins back.
    • An entry an older FourFold can't read counts there as unlisted, and that plugin is switched off on that machine.
    • A half-failed uninstall can leave the plugin's folder behind, unrecorded; installing it again replaces it.
    • A GitHub release holds 1,000 files; old packages are pruned by hand.

Test plan

  • dotnet build FourFoldAccountManager.sln -c Debug: 0 warnings, 0 errors.
  • Core tests (309) and Desktop tests (28) pass. New tests cover the catalog reader, the download limits, packaging and unpacking (hostile zips), the install store (swap, rollback, corrupt record), the hub policy, the submission check and its summary, and the agreement between the tool, the catalog and the app.
  • Leaderboard tests were not run here (8 of them need Docker).
  • With nothing installed, starting FourFold makes no request to the hub.
  • Plugin hub lists Goal tracker; search filters as you type; Details and Source work; focus stays on the row.
  • Install shows "Working…", then "Installed"; the plugin appears in the strip with the bar on top.
  • The goal survives a restart. With the network off the plugin still runs, and the hub page offers Try again.
  • An update installs by itself and keeps the goal.
  • A pulled plugin stops, shows the reason, and comes back with its data when listed again.
  • Uninstall asks first; Yes removes the files and the saved data; with the tools window open the question appears over it.
  • Developer mode on: a dev copy stands in for the hub copy. Off: the hub copy is back.
  • A link opens only on a declared site.
  • Built-in plugins, the strip, cards and F5 behave as before for a user who never opens the hub.

Review notes: every task was reviewed on its own and the branch was reviewed as a whole, with one fix wave afterwards. The reviews used probes on scratch copies (fuzzed zips, 1.5 million crafted site names, the real sidebar rendered at 250 px, a stalling download server). The hub flow has not been run in the app against a real hub: the manual checks above are that first run, and they need the hub repository to be live.

@CodySimonds65
CodySimonds65 merged commit 0529a73 into feature/web-plugins Oct 3, 2026
@CodySimonds65
CodySimonds65 deleted the feature/plugin-hub branch October 4, 2026 00:01
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