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
+39
View File
@@ -1,3 +1,42 @@
<?php
// ═══════════════════════════════════════════════════════════════════════════════════════════════
// PURPOSE
// Rsync tab. Sync profiles, share lists, transfer progress, per-run history, and manual
// sync triggers.
//
// DESIGN PRINCIPLES
// Pure view — profile and status data from api/rsync.php, profile edits through
// api/rsync_profiles.php, manual runs through api/manual_sync.php.
//
// Progress polls fast (2s) while a transfer is live and falls back to the slow interval
// otherwise, so an idle page is not hammering the endpoint.
//
// Profiles are edited as structured data, not as raw rsync flags typed by hand.
//
// OPERATIONAL SAFEGUARDS
// Manual sync is confirmed before it fires. A sync moves real data between two machines and
// is not something to trigger with a stray click.
//
// The page shows the global RSYNC_ENABLED gate alongside the per-tier toggles, so a run
// that will be skipped by the gate is visibly skipped rather than silently doing nothing.
//
// Heavy escaping throughout — share paths, profile names and rsync output all render as
// text, never as markup.
//
// The page does not compose rsync flags. Deletion semantics in particular are owned by
// Rsync/rsync.sh, where the pass-1-must-complete interlock lives.
//
// RENDERS
// Profile editor, share lists, live transfer progress, run history, manual sync controls
//
// DEPENDS ON
// api/rsync.php status, polled 2s live / 30s idle
// api/rsync_profiles.php profile read and write
// api/manual_sync.php manual run trigger
// api/rsync_win_arrays.php share array editing
// api/flag_toggle.php enable/disable toggles
// api/confform.php inline conf edits
?>
<style>
.vv-ry-card { background:#161616;border:1px solid #2a2a2a;border-radius:6px;padding:10px 12px;min-width:0; }
.vv-ry-sec { font-size:10px;font-weight:bold;color:#444;letter-spacing:.07em;text-transform:uppercase;margin-bottom:6px; }