Commit Graph
160 Commits
Author SHA1 Message Date
josh 3c49437bf9 Add GitHub plugin release imports and update discovery 2026-09-18 01:29:38 -04:00
josh a718efc9e7 Add publisher release versions to plugins 2026-09-18 01:16:45 -04:00
josh 166f039ae6 Add responsive mobile layouts and navigation 2026-09-18 01:09:05 -04:00
josh 453821805a Fix server deletion cleanup and allow failed cleanup to resume 2026-09-18 00:49:30 -04:00
josh 274aedb66e Add House Party Protocol for fleet-wide queued destruction 2026-09-18 00:39:19 -04:00
josh 586133c711 Conform blueprint launches to desired fleet counts 2026-09-18 00:28:17 -04:00
josh 989931a0f2 Add multi-server blueprint collections and atomic launches 2026-09-18 00:08:54 -04:00
josh 782c7c0bda Add deployment blueprints and reviewed launch recipes 2026-09-17 23:43:12 -04:00
josh 4237371360 Fix beta preset selection and improve test plan builder UI 2026-09-17 21:51:25 -04:00
josh a50eae9d21 Add configurable beta test plans and staged rollout 2026-09-17 21:35:28 -04:00
josh 5b5266da3a Add operation flows and activity logs for betas and campaigns 2026-09-17 19:34:26 -04:00
josh 9dcf4ac1d3 Add T6 Zombies fleet support with Plutainer configuration 2026-09-17 18:03:12 -04:00
josh 885abbdffe Use database fleet registry and gate RCON polling on container readiness 2026-09-17 17:28:38 -04:00
josh 3b1c9bf3d9 Rename Server keys page to Keys 2026-09-17 17:19:27 -04:00
josh c2ad5cc95a Queue server creation and verify health and selected map before completion 2026-09-17 17:14:36 -04:00
josh a611850649 new destruction flow 2026-09-17 16:57:08 -04:00
josh 5f8e03c693 Remove campaigns helper text from deployments page 2026-09-17 16:45:10 -04:00
josh 6f83700161 Separate campaigns from server deployment lifecycle tracking 2026-09-17 16:42:37 -04:00
josh 6c6e63fa80 Fix Scripts page to list only scripts 2026-09-17 16:25:26 -04:00
josh 60e44636aa Fix initial artifact deployment and drift file replacement 2026-09-17 16:15:47 -04:00
josh e8e7332365 Automatically deploy the lowest available lobby with exact ID preview 2026-09-17 15:59:29 -04:00
josh ae173517b6 Persist Plutonium keys by server ID and add key management 2026-09-17 15:54:10 -04:00
josh bbb1639184 debug 2 2026-09-17 15:09:27 -04:00
josh 85c238fceb debug 2026-09-17 15:01:39 -04:00
josh 858704bb10 adds round telemetry support 2026-09-17 14:35:42 -04:00
josh 8e04a190b3 Roll deployment restarts through a shared fleet-wide recovery limit 2026-09-17 11:25:06 -04:00
josh 3f0d6dd87d Apply selected server maps automatically without config overlays 2026-09-17 11:05:01 -04:00
josh 5142a672ee Default test-server selection to none on beta open 2026-09-14 21:16:26 -04:00
josh a2d4a38925 Redesign UI with new token system, primitives, and motion
Restraint-first design language: neutral gray surfaces + one blue accent
(cyan/amber/red reserved for state), 8pt spacing, softer radii, one
ambient + one raised shadow, standardized motion tokens. Alfa Slab One
demoted to BrandMark only; Inter carries all page copy.

New primitives (Button, Card, Badge, Stat, SectionHeader, Skeleton,
EmptyState, Tabs, Breadcrumbs, StatusPip, Field, Input, Select, Textarea)
plus motion utilities (tweenNumber, viewTransition) and a global toast
system. All eight route surfaces rewritten on top: Fleet gains an
overview hero, Server detail restructures into tabs, Deployments gets a
collapsible drift summary + per-server pipeline visual, and the
scripts/configs/plugins/betas flows adopt the new form primitives.

Sticky translucent nav with backdrop blur, view-transition cross-fades
between routes, staggered card entrance on Fleet, breathing status pip
halo, tabular-numeric player counts. Gmail-style g-key nav shortcuts.
Mobile stacks below 720px; prefers-reduced-motion neutralizes durations.
Legacy tokens preserved as aliases so any un-migrated code still renders.
2026-09-14 19:48:48 -04:00
josh efd4a4fa66 Fix game timer: cycle-key tracking, wall-clock only, active gate
games_sp.log is not wiped on restart, so old J; lines from prior
sessions were poisoning the anchor. Now the scanner walks the tail
backward to the LATEST InitGame and only considers lines after it,
returning an opaque cycle key (the first J; line) plus a state. The
worker stamps game_started_at/ended_at with Date.now() at observation
time instead of inferring from the log's own timestamps. Same-players
game restarts produce a new key and cleanly re-anchor. When the server
transitions to 0 players, game state is cleared server-side and the
UI also gates the timer display on activeSince.

Adds servers.game_cycle_key column with additive migration.
2026-09-13 22:47:03 -04:00
josh 3d111880d3 Add active/inactive/game-time timers to fleet + server pages
Fleet cards and the per-server detail hero now show three live-ticking
timers: Active (since players > 0), Inactive (since server emptied), and
Game (since InitGame in games_sp.log, back-computed from the log's own
MM:SS prefix so it stays accurate across restarts). Anchors are
persisted on `servers` and fanned out via the SSE bus; a single 1s
ticker feeds every card. Idle map cycles are filtered out so the game
timer doesn't flicker.
2026-09-13 21:45:54 -04:00
joshandClaude Opus 4.7 13a29e5ace Add deploy + destroy server flow; migrate to t5_<mode>_<slug>_<n> naming
Full server lifecycle management from Electric Cherry: pick game/mode/map/pluto
key in the Fleet page, EC provisions the deployment via Komodo, allocates a
port in 28960-28980, creates the 0o777 host dir, and starts the container.
Destroy button tears everything down (Komodo Destroy+Delete, rm -rf host dir,
transactional DB cleanup) and surfaces any partial-failure warnings inline.

Same phase cuts over to the new naming scheme (t5_zombie_cosmodrome_1 etc.).
Komodo entity names now match EC server names 1:1 (no more _/- transform), and
the map catalog carries friendly/slug/canonical for each of the 11 t5 zombie
maps. Server rows gain game_mode, map_slug, host_dir, config_file, game_id,
image, created_by, and destroyed_at columns for provisioning + audit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-13 18:38:42 -04:00
joshandClaude Opus 4.7 8c15cae80d Replace -beta sidecar and .OLD backup with DB snapshots
Beta deploys used to rename foo.gsc -> foo.OLD and write beta bytes to
a foo-beta.gsc sidecar, forcing the mod loader to know the naming
convention. Now the beta content lives at the actual target filename
(same as configs already did) and the pre-beta bytes are captured in
a new beta_file_snapshots table for rollback.

- schema.sql: new beta_file_snapshots(beta_id, server, rel_path,
  prior_content BLOB, prior_sha256, prior_size). Handles scripts,
  plugins, and the composed dedicated_sp.cfg uniformly.
- db/index.ts: assertSnapshotSchemeSafe boot guard refuses to start
  if a legacy running/ready-promote beta is present on first upgrade.
  A settings sentinel (snapshots_v1) makes it one-shot.
- beta.ts openBeta: read prior bytes, insert snapshot, overwrite
  target directly.
- beta.ts rollbackBeta: restore from snapshot if had_original, else
  delete the fresh file. Drop snapshot rows after restore.
- beta.ts promoteBeta: no more rm -beta / rm .OLD calls, pull prior
  content from the snapshot table for the deployment audit, drop
  snapshots after promote.
- files.ts: delete betaFile() and oldFile().
- drift.ts: docstring updated; no special-casing needed since beta
  bytes and inventory now agree on the target rel_path.
- servers/[name]/+page.svelte: drop dead -beta/.OLD row filters.
- tests: plugin write asserts the target filename; unused
  betaFile/oldFile tests removed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-13 17:57:43 -04:00
joshandClaude Opus 4.7 30b0d1d4da Fix delete FK exhaustively; unset-scope surfaces as drift
deleteScript: previous fix missed beta_servers.prior_version_id,
beta_server_scripts.prior_version_id, and deployments.beta_id. Cascade
from betas.script_id -> beta_servers/beta_server_scripts left dangling
prior_version_id refs, and deletions of cascaded betas dangled
deployments.beta_id. Now nulls every NO ACTION reference before the
DELETE inside a single transaction.

Scope unset no longer touches disk from the API. Instead it detaches
inventory rows for scripts/plugins so drift Pass 1 flags the on-disk
copies as untracked; configs rely on drift Pass 2's compose-diff, which
already handles scope=null naturally. The operator reconciles from
/deployments using the existing rescan + reconcile buttons — same
visible flow as any other drift, no more silent synchronous file
removal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 23:59:43 -04:00
joshandClaude Opus 4.7 34dc2ff00f Fix delete-script FK error; trigger drift on scope change
- deleteScript: null out deployments.script_id/script_version_id/prior_version_id
  and deployment_scripts.prior_version_id inside a transaction before the
  cascade. These are historical audit FKs (NO ACTION), so the cascade from
  script_versions was blowing up any delete of a promoted script.
- Scope endpoint fires runDriftDeployment in the background after any scope
  mutation so orphan/missing files from the change get reconciled.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 23:46:56 -04:00
joshandClaude Opus 4.7 f716036d89 Small UI cleanup, auto-refresh, and per-kind artifact routes
- Remove redundant "manage scripts" button and pipeline sidebar from Fleet page
- Bump log tail default 200 -> 1000 lines
- Auto-refresh (5s) on deployments list/detail, betas list, server detail, and artifact detail
- Drift ignores dedicated.cfg (Plutonium MP config; regenerates if deleted)
- Extract ArtifactDetail component; mount under /scripts/[id], /configs/[id], /plugins/[id] so configs and plugins no longer land on /scripts URLs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 23:30:04 -04:00
josh f10f0cefef drift update 2026-09-12 23:15:14 -04:00
josh b86b3d5cc1 config upload fix 2026-09-12 19:34:25 -04:00
josh 6ae9004ed2 Drift now covers all three destinations 2026-09-12 19:16:14 -04:00
josh 8c40bbeff1 config and plugin 2026-09-12 19:11:44 -04:00
josh 85bcb05a7d multi script beta 2026-09-12 18:23:56 -04:00
joshandClaude Opus 4.7 30e59c900c Read-only script detail; move beta creation to /betas
The script detail page is now an informational card (target, scope, matched
servers, current + latest version) with edit-scope and upload-new-version
behind native <dialog> modals. The Open Beta panel is gone from the script
page entirely.

/betas gains an Open a beta section at the top. Its script dropdown filters
to entries that actually have something to test (unpromoted latest version,
no active beta), and pre-populates version + servers on script pick.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 14:40:56 -04:00
joshandClaude Opus 4.7 c78d0c62fd Drop trigger option from beta detail; stack remaining opts vertically
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 14:28:28 -04:00
joshandClaude Opus 4.7 1afdfddc87 Promote as a real deployment; version state and scope dropdowns
Turns promotion into a first-class deployment (action='promote') so it lands
in the deployments UI with before/after content, per-server restart tracking,
and one-click rollback. Non-beta matching-scope servers get restart_state=
pending so the existing sweep drains and restarts them the same way drift does.

Also adds a per-version state (untested/tested/test-failed) so the upload
flow can visibly signal that a beta must land before promotion, and swaps
the scope-value text box for game/map dropdowns populated from the fleet.
Beta rollback at ready-promote is now labelled Reject and marks the version
test-failed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 14:24:35 -04:00
joshandClaude Opus 4.7 edfe4dfc09 Add drift detection and removal as a real deployment
A drift deployment scans each server's sp/ tree for files not in the
server_scripts inventory (untracked scripts left over from before EC was
managing the fleet), deletes them, and records the removed bytes in
deployment_files for audit. The existing sweep then runs the standard
wait-for-empty → Komodo restart cycle on each affected server.

To make that cycle safer, the sweep now has a second phase: after Komodo
restart succeeds we wait for komodoInspectHealthy + RCON to both come
back green before marking the deployment_server row 'done'. If either
stays broken the row stays pending and keeps retrying.

New: /api/drift (GET scan, POST run), drift panel on /deployments.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 13:44:52 -04:00
joshandClaude Opus 4.7 1a0f06403d Drop target rel path field from script upload
Every T5 script lands in the flat sp/ directory, so the target path is
always just the uploaded filename. Removed the field from the Scripts
upload form and the server derives targetRelPath from file.name.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 13:30:05 -04:00
joshandClaude Opus 4.7 93d5a8e2e5 Rework as scripts-centric, upload-only, gated beta lifecycle
Scripts become first-class: named, versioned, uploaded via the UI, optionally
scoped to a game or map. Any change that would land on scope-matched servers
(marking-required or new version of a scoped script) must first pass a beta.
The beta runs a per-server state machine — deploy -beta.gsc → wait empty →
Komodo restart → wait healthy → optionally wait for a real match end
(games_sp.log 'ExitLevel: executed') — before it's eligible for promotion.
Rollback is always available and restores from .OLD.

The shared/scripts mirror and its betas/ staging folder are gone. Every
server now has a tracked script inventory (server_scripts table), populated
only by explicit upload flows.

New: /scripts, /scripts/[id], /betas/[id] UI; /api/scripts + /api/betas +
/api/servers/[name]/scripts endpoints; scripts.ts, inventory.ts, beta.ts
(rewritten), beta-runner.ts, match-log.ts, komodoInspectHealthy().
Removed: push.ts, /api/push, BetaPanel, legacy importer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 13:25:06 -04:00
joshandClaude Opus 4.7 47051dc79a Repaint theme blue with larger typography
Swap the cherry-red primary for the logo's blue, bump body 13→15px
and h1 32→40px, and add semantic tokens (--bg-*, --accent-*, --text-*)
so future palette shifts are a single-file edit. Cherry-red survives
only for danger states and the brand cherry mark.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 12:29:02 -04:00
joshandClaude Opus 4.7 c3c799a409 Emit self-hosted fonts by importing from JS, not CSS @import
Firefox's console was spammed with "downloadable font: download failed
status=2147746065" for every @fontsource family — Inter, Alfa Slab One,
JetBrains Mono. Root cause: the built CSS referenced
./files/inter-latin-400-normal.woff2 but no font files were ever emitted
to build/client/_app/immutable/assets/.

Vite's CSS `@import` inlines the imported file's *text* but doesn't
crawl the resulting url() references to emit their assets. Since
tokens.css was doing `@import '@fontsource/inter/400.css'` and being
pulled into +layout.svelte via a Svelte <style> @import, the fonts
lived entirely in CSS space where Vite's asset emission never saw them.

Moved the @fontsource imports into src/lib/ui/styles/fonts.ts and
side-effect-import that module from +layout.svelte's <script>. JS
imports go through the module graph, so Vite walks the CSS, sees the
url() references, and emits the woff/woff2 binaries.

Verified: build now emits 80 font files (14 subsets × 5-6 weights)
into build/client/_app/immutable/assets/ and the CSS url()s resolve
to the correct hashed filenames in the same directory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 12:08:17 -04:00
joshandClaude Opus 4.7 dd4314df72 Clean up server detail page: remove debug scaffolding, tighten hero
Now that the pipeline works end-to-end, the "RCON reply" panel with its
parsed-value grid and hex dump was pure debug scaffolding that ran on
every page load — it duplicated every field the hero already surfaces
and shoved a 13-line hex block into the fold. Deleted the whole
section; the on-demand raw dump lives inside the RCON diagnostic panel
(which still only renders when health isn't online, so it stays out of
the way on healthy servers).

Hero metadata compressed: status and last-seen pairs only render when
health isn't online, since the pulsing dot conveys "healthy + fresh"
better than a redundant text label. Mode pair hides when the gametype
isn't reported (Plutonium T5 doesn't include it in the status header).

Config panel hides the "held by beta" row when nothing is held —
matches how the deployment history section already only renders when
there's history.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-12 11:59:11 -04:00