Skip to content

Development

Nick Hamze edited this page Sep 1, 2026 · 6 revisions

Development

Requirements

  • PHP 7.4 or newer
  • zip
  • shellcheck for the packaging script
  • A WordPress 6.5+ HTTPS hub with OpenStation
  • A separate, publicly reachable HTTPS WordPress site

Fleet has no Composer package, npm package, JavaScript framework, custom database, hosted-service, or target-site plugin dependency.

Repository layout

fleet-for-openstation.php
includes/class-fleet-for-openstation.php
assets/admin.css
assets/admin.js
uninstall.php
readme.txt
tests/smoke.php
bin/build.sh
  • fleet-for-openstation.php contains the plugin header and bootstrap.
  • includes/class-fleet-for-openstation.php contains the UI, encrypted credential storage, installation flow, and REST orchestration.
  • assets/admin.css styles the bounded hub, workspaces, and setup progress screen.
  • assets/admin.js runs only the post-approval setup request and visible progress handoff.
  • uninstall.php removes local Fleet user metadata and the scheduled check.
  • tests/smoke.php checks URL validation, plugin-state inspection, secret-box storage, capability discovery, REST URL construction, attention logic, and authorization URL encoding without a framework.
  • bin/build.sh lints PHP, runs the smoke check, and builds the installable ZIP.

Build and test

./bin/build.sh
shellcheck bin/build.sh

The package is written to dist/fleet-for-openstation.zip. Inspect the archive whenever a runtime asset is added; both admin.css and admin.js must be present.

Manual two-site acceptance pass

Use two distinct HTTPS WordPress installations.

  1. Install OpenStation and Fleet on the hub. Leave OpenStation absent from the managed site.
  2. Confirm Fleet identifies the hub and opens in a centered window no wider than 1040 pixels.
  3. Enter the managed site's URL and confirm WordPress opens its native Application Password approval.
  4. Approve while signed into an administrator account.
  5. Confirm Fleet returns promptly to a visible setup screen rather than a blank callback.
  6. Confirm the progress screen installs official OpenStation, checks site capabilities, and opens the managed-site workspace.
  7. Confirm the managed site has exactly one named Fleet Application Password and the hub stores an encrypted secret plus its UUID.
  8. Connect the same URL again; confirm Fleet focuses the existing workspace without creating another credential.
  9. Open two connected sites; confirm the shell contains two distinct os-frame-fleet-site-* windows and each keeps its own navigation state.
  10. Open Explorer, confirm its route count matches the managed REST index, choose a read-only route, and confirm the response belongs to that site.
  11. Exercise Overview, Content, Media, Comments, Plugins, Users, Settings, Agency, and a reversible API request.
  12. Confirm Fleet Inbox combines editorial work, comments, connection status, and Site Health findings from both sites. Run Check now and verify the results refresh.
  13. Search for known content, media, comments, and users across both sites. Confirm the client filter narrows the results and every result opens in the owning site's window.
  14. Give both sites the same client name, open that client workspace, and confirm both persistent site windows open without replacing each other.
  15. Test site search, filters, favorites, the attention queue, activity, manual checking, and safe bulk actions.
  16. Disconnect and confirm the exact remote Application Password is deleted before the local record disappears.
  17. Test rejection, expired state, wrong returned origin, malformed JSON, insufficient capability, a stripped Authorization header, an unreachable site, and an installation failure.
  18. Confirm the hub cannot connect to itself and a path-based multisite sibling can connect.

Contribution rules

  • Prefer WordPress Core features over new infrastructure.
  • Treat remote REST permission callbacks as authoritative.
  • Never log credentials, authorization headers, callback query strings, salts, or normal login passwords.
  • Keep credentials per hub user and encrypted at rest.
  • Keep the exact Application Password UUID so disconnect can revoke only Fleet's credential.
  • Keep unsafe-URL rejection and the public-HTTPS boundary intact.
  • Do not add a database table, framework, service, agent, or abstraction without a concrete workflow that Core cannot cover.
  • Run ./bin/build.sh after every implementation change.
  • Fleet must remain independently testable; it must not require changes to the OpenStation repository.

Release checklist

  1. Update the plugin header, readme.txt, and release notes to the same version.
  2. Run the Fleet build, smoke check, diff check, and shell check.
  3. Complete the manual two-site acceptance pass.
  4. Inspect the ZIP and test a clean WordPress upload.
  5. Review the package for plaintext credentials or test-only host exceptions.
  6. Tag the verified Fleet commit and attach the ZIP to the Fleet release.

Clone this wiki locally