Add structured headers to the PHP pages layer

Documents each tab's purpose, what it renders, and which endpoints it polls.
Pages that start with markup get the header in a <?php ?> block so it never
reaches the browser.

Also corrects the layer diagram in README-unraid.md: eight of eleven pages hold
no PHP logic and poll api/ for everything — only auth, monitor and scheduler
require an include/ file directly.
This commit is contained in:
Gmer4Lfe
2026-08-02 00:51:41 -04:00
parent 0b4ff27be4
commit ccc6c742ee
12 changed files with 414 additions and 5 deletions
+38
View File
@@ -1,3 +1,41 @@
<?php
// ═══════════════════════════════════════════════════════════════════════════════════════════════
// PURPOSE
// Partnership tab. The mesh view — which nodes exist, whether they are reachable over
// Tailscale, their system summary, sync history, and the onboarding controls that deploy
// stacks to a partner.
//
// DESIGN PRINCIPLES
// Pure view — all node data comes from api/partnership.php; actions are separate endpoints.
// Reachability, SSH and system collection live in include/partnership.php.
//
// Reachability is probed on demand as well as polled, because "is my partner up right now"
// is the question this page exists to answer.
//
// OPERATIONAL SAFEGUARDS
// Every action that changes a partner is confirmed first — this page can deploy stacks and
// provision credentials on a machine 50 miles away, and there is no undo for that.
//
// Long-running operations go through api/run.php rather than blocking the page, so a deploy
// that takes minutes does not leave the browser hanging on a request.
//
// An unreachable partner degrades to its own card only; the rest of the mesh still renders.
//
// Values from remote nodes are escaped on render — this page displays strings originating
// on another machine.
//
// RENDERS
// Node cards with identity, reachability, system summary, sync history
// Onboarding and stack-deploy controls, API key provisioning, partnership settings
//
// DEPENDS ON
// api/partnership.php polled every 10s → include/partnership.php
// api/partnership_ping.php on-demand reachability probe
// api/partnership_settings.php settings writes
// api/create_api_key.php credential provisioning
// api/run.php long-running deploy operations
// api/confform.php inline conf edits
?>
<style>
.vv-pt-grid { display:grid; gap:12px; }
.vv-pt-node { background:#161616; border:1px solid #2a2a2a; border-radius:6px; padding:12px; min-width:0; }