From 68b21a83ce0894443361090140035400c5a5e1ee Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 19 Sep 2026 22:41:33 -0400 Subject: [PATCH] Restore campaign terminology across UI and docs --- README.md | 4 ++-- docs/beta-test-plans.md | 4 ++-- docs/leaderboard.md | 2 +- docs/ui-refresh.md | 6 +++--- docs/ui-ux-implementation.md | 6 +++--- docs/ui-ux-review.md | 20 +++++++++---------- src/lib/ui/components/BetaPlanBuilder.svelte | 4 ++-- .../ui/components/DestroyServerModal.svelte | 2 +- src/routes/+layout.svelte | 4 ++-- src/routes/+page.svelte | 4 ++-- src/routes/api/betas/[id]/+server.ts | 8 ++++---- src/routes/betas/+page.svelte | 2 +- src/routes/betas/[id]/+page.svelte | 4 ++-- src/routes/betas/new/+page.svelte | 2 +- src/routes/campaigns/+page.svelte | 16 +++++++-------- src/routes/campaigns/[id]/+page.svelte | 12 +++++------ src/routes/servers/[name]/+page.svelte | 6 +++--- tests/unit/beta-promotion.test.ts | 4 ++-- tests/unit/server-detail-api.test.ts | 2 +- 19 files changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 12b2d2d..6d2dfb0 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ See [Plugin releases](docs/plugin-releases.md) for the import and beta workflow. ## How restarts stay safe Betas support configurable gameplay, participation, stability and manual-review -requirements, saved presets, coverage rules and staged rollout. See +requirements, saved presets, coverage rules and staged waves. See [Beta test plans](docs/beta-test-plans.md) for usage and the four-event game telemetry contract. File changes are staged sequentially. Their activation uses rolling restarts: @@ -309,7 +309,7 @@ RCON parsing (fake UDP socket). ## Campaigns and server deployments -Campaigns (`/campaigns`) contains script/config rollouts, drift reconciliation, restart progress, file diffs, and rollbacks. Existing rollout records are preserved in the original database tables. The campaign API lives at `/api/campaigns`; legacy rollout detail API endpoints remain available for compatibility. +Campaigns (`/campaigns`) tracks script/config updates, drift reconciliation, restart progress, file diffs, and rollbacks. Existing campaign records are preserved in the original database tables. The campaign API lives at `/api/campaigns`; legacy detail API endpoints remain available for compatibility. Deployments (`/deployments`, `/api/deployments`) now tracks server creations and destructions with live stages and persistent history, including failures, warnings, and interrupted operations. History starts with operations performed after this update and survives server removal. New creation requests return HTTP 202 with a deployment ID and open the deployment detail page. Creation is complete only when Komodo reports healthy, RCON responds successfully, and the RCON map exactly matches the selected map. Queued requests reserve their server name and port; queued creation and pending health checks survive application restarts. The detail page records startup progress and explains any health or map mismatch that is still blocking completion. diff --git a/docs/beta-test-plans.md b/docs/beta-test-plans.md index 37d9dc7..0e2aea9 100644 --- a/docs/beta-test-plans.md +++ b/docs/beta-test-plans.md @@ -165,7 +165,7 @@ snapshots, not continuous measurements of player presence. Health checks and safe restart gates use the existing container/RCON monitoring. Health intervals spanning more than 60 seconds earn no healthy time. -## Coverage, rollout and outcomes +## Coverage, waves and outcomes Coverage can require all selected servers, a quorum, one per selected map, one per selected game, or one per selected game/map combination. Coverage @@ -183,7 +183,7 @@ For failures, select hold as failed, pause for investigation, or automatic rollback. Rollback restores only files touched by the beta. Restarts can wait for empty servers or remain manual. Promotion is always manual. -Pause holds evaluation and rollout. Resume retains completed progress and the +Pause holds evaluation and wave advancement. Resume retains completed progress and the original deadline, but starts new timing intervals. A fresh attempt resets progress and restarts deployed servers when empty. Recovery cycles repeat gameplay milestones and checklist sign-offs while carrying health outages forward. diff --git a/docs/leaderboard.md b/docs/leaderboard.md index ffcf2ce..17abb49 100644 --- a/docs/leaderboard.md +++ b/docs/leaderboard.md @@ -49,7 +49,7 @@ reported kills and other counters, even when earlier participation is unknown. Match and player records live in SQLite alongside the rest of Electric Cherry. They persist across app restarts and server deletion, and are not subject to -rollout history retention. The latest scoreboard and leaderboard update in the +campaign history retention. The latest scoreboard and leaderboard update in the same transaction. Each match keeps player counters even after someone leaves. A `game_start` opens a match; `game_end` completes it. A changed map, a lower round, diff --git a/docs/ui-refresh.md b/docs/ui-refresh.md index aae49e4..236a6b8 100644 --- a/docs/ui-refresh.md +++ b/docs/ui-refresh.md @@ -11,10 +11,10 @@ The follow-up [UI/UX review implementation](ui-ux-implementation.md) records the 5. **Server identity:** friendly map names and visible lobby numbers across cards, lists, beta setup, and operations. T6 variants retain their selected map name. Server details provides a copyable raw ID. 6. **Deployment organization:** Active / Blueprints / History views. Failures and warnings link to filtered history. Destroy fleet lives in Fleet actions and retains its explicit preview. 7. **Navigation:** Fleet / Library / Operations / Betas / Settings, with section navigation and a mobile menu. Existing route URLs remain usable. -8. **Status and progress:** shared status labels and tones distinguish ordinary waiting, work in progress, attention, passing tests, and promotion. Deployment, rollout, and beta details share operation history. -9. **Server detail hub:** live status, current operations, scoreboard, logs, effective configuration, inventory, diagnostics, and scoped rollout history. The scoreboard shows game-reported names, copyable GUIDs, score, kills, headshots, downs, and revives, with sortable stats, map, round, and update time. Final scores remain visible until the next game starts. Missing or stale player counts are unknown. Inventory identifies scripts, plugins, configs, and other files. +8. **Status and progress:** shared status labels and tones distinguish ordinary waiting, work in progress, attention, passing tests, and promotion. Deployment, campaign, and beta details share operation history. +9. **Server detail hub:** live status, current operations, scoreboard, logs, effective configuration, inventory, diagnostics, and scoped campaign history. The scoreboard shows game-reported names, copyable GUIDs, score, kills, headshots, downs, and revives, with sortable stats, map, round, and update time. Final scores remain visible until the next game starts. Missing or stale player counts are unknown. Inventory identifies scripts, plugins, configs, and other files. 10. **Dialogs and feedback:** in-app confirmations for deletion, rollback, reconciliation, and unsaved edits. File comparisons use a native modal dialog with Escape and focus restoration. Refresh errors retain loaded data and provide retry controls. -11. **Keyboard and forms:** labeled fields, roving keyboard tabs, visible focus, a skip link, and separate navigation/action targets. Removed nested buttons and buttons inside rollout links. +11. **Keyboard and forms:** labeled fields, roving keyboard tabs, visible focus, a skip link, and separate navigation/action targets. Removed nested buttons and buttons inside campaign links. 12. **Readability:** brighter secondary metadata, readable small labels, contrasting primary-button text, and full-opacity offline cards. 13. **Page states:** compact loading and empty states, actionable failures, and retained snapshots during refresh errors. 14. **Mobile:** wrapping identities, scrollable tab/filter rows, compact summaries, responsive forms, and sticky form actions. diff --git a/docs/ui-ux-implementation.md b/docs/ui-ux-implementation.md index a373795..6eb6a53 100644 --- a/docs/ui-ux-implementation.md +++ b/docs/ui-ux-implementation.md @@ -9,7 +9,7 @@ The changes prioritize clear operational outcomes, reviewed action scope, recove | Review | Implemented behavior | | --- | --- | | 1. Stale Fleet data | Stale cards explicitly show **Players unknown**, retain labeled last-known counts and rosters, and stop advancing live durations. Fleet shows snapshot age and refresh/reconnection status. | -| 2. Promotion impact | A promotion review lists exact versions, tested and additional servers, eligibility, staging, and restart policy. The backend checks a review token before writes; changed targets or composed config require a new review. Completion links to the resulting rollout. | +| 2. Promotion impact | A promotion review lists exact versions, tested and additional servers, eligibility, staging, and restart policy. The backend checks a review token before writes; changed targets or composed config require a new review. Completion links to the resulting campaign. | | 3. Reconciliation scope | Selected-server and entire-fleet reviews are separate actions. The plan includes scan time, file operations and restart policy. Execution checks target identities and before/after content fingerprints; changed plans return for review. | | 4. Beta reading order | Outcome, blockers, deadline, actions, and server results precede evidence and activity. Shared activity history is collapsed, searchable, ordered, and progressively displayed. | | 5. Beta recovery | Deadlines and pause/retry consequences are explicit. A fresh attempt confirms evidence reset and restarts; expired tests explain rollback and plan reuse. Sign-off availability follows test/run readiness. | @@ -17,7 +17,7 @@ The changes prioritize clear operational outcomes, reviewed action scope, recove | 7. Removal cancellation | Waiting removals can be withdrawn from operation lists/details. A database transition competes atomically with the worker claim before external deletion. Once removal or confirmed-deletion cleanup begins, cancellation is unavailable. | | 8. Partial outcomes | Reconciliation reports updated and skipped servers separately, with reasons and follow-up links. All-skipped work is an error outcome. Rollback feedback stays beside its initiating operation. | | 9. Scope clarity | Scope editing previews added/removed eligible servers. Script/plugin unscoping explains retained live copies and tracking detachment; configs explain composition impact. Completion links to reconciliation. Eligibility, promoted versions, and installed inventory have separate labels. | -| 10. Accessible controls | Busy buttons retain their accessible names. Field labels focus the associated native control. Consequential errors use alert semantics; completion uses status semantics. Rollout server states have accessible descriptions. | +| 10. Accessible controls | Busy buttons retain their accessible names. Field labels focus the associated native control. Consequential errors use alert semantics; completion uses status semantics. Campaign server states have accessible descriptions. | | 11. Server investigation | Offline/stale summaries offer Diagnostics and Logs. URL parameters retain the selected tab, RCON diagnosis precedes telemetry history, and removal is under Server actions. | | 12. Beta drafts | Drafts retain exact versions, label, test plan, selected servers, and wizard step. Resume/discard is explicit, including returns through artifact links. Eligibility is rechecked and compatible selections retained. Unavailable browser storage triggers leave protection. | | 13. Local validation | Blueprints display total capacity and duplicate-map errors. Beta requirements show field-specific errors and units, expand/focus invalid checks, and validate quorum against the selected cohort. | @@ -31,7 +31,7 @@ The changes prioritize clear operational outcomes, reviewed action scope, recove | 21. Import continuity | GitHub import shares pending state with its parent dialog, prevents dismissal/tab switches during import, and keeps a completion panel with version/beta links. Script batches show aggregate progress and sticky actions. | | 22. Key management | Game/map/lobby selectors generate the exact ID, with an expert raw-ID option. Rows show saved time, presence-versus-validation wording, deployment implications, and links to existing servers. Launch forms accept the exact missing/replacement key inline. | | 23. Blueprint coverage | Existing/queued inventory is distinguished from healthy playable servers, with linked coverage details. Collections group assignments and show a sticky key count and jump-to-missing-key action. Creation remains limited to the target shortfall. | -| 24. Mobile overhead | Fleet avoids redundant headings/zero rollout summaries, empty libraries emphasize their next action, and Leaderboard totals collapse on phones with a compact selected-stat table. Long forms retain reachable actions and focus spacing. | +| 24. Mobile overhead | Fleet avoids redundant headings/zero campaign summaries, empty libraries emphasize their next action, and Leaderboard totals collapse on phones with a compact selected-stat table. Long forms retain reachable actions and focus spacing. | | 25. Consistent hierarchy | Editable controls use stronger dedicated boundaries. Routes have descriptive titles, operational language is clearer, keyboard shortcuts have a help panel, and selected overflow tabs scroll into view without moving the page. | | 26. Investigation/handoffs | Logs support literal search/highlighting, copy, tail download, deep links, explicit follow/refresh state and jump-to-latest. A bounded recent-notifications panel retains results in the current browser tab. Beta rows include labels, age and blocker context. | diff --git a/docs/ui-ux-review.md b/docs/ui-ux-review.md index 5b87f5f..5855bdc 100644 --- a/docs/ui-ux-review.md +++ b/docs/ui-ux-review.md @@ -8,7 +8,7 @@ Electric Cherry has a coherent visual foundation and unusually capable operation ## Scope and evidence -This review combines source inspection with a local browser walkthrough. It covers Fleet, server details and diagnostics, Scripts, Configs, Plugins, beta creation and progress, server deployments, blueprints, rollouts, keys, and Leaderboard. Existing design notes and workflow documentation informed the review. +This review combines source inspection with a local browser walkthrough. It covers Fleet, server details and diagnostics, Scripts, Configs, Plugins, beta creation and progress, server deployments, blueprints, campaigns, keys, and Leaderboard. Existing design notes and workflow documentation informed the review. Browser exploration used an isolated database with Komodo/RCON credentials disabled. Nine top-level pages were examined at 1440×1000 and 390×844. Populated Fleet, server details, and beta scenarios used synthetic API responses. Beta setup, blueprint validation, and the browser accessibility tree were also exercised. Navigation was checked around its responsive breakpoint. Production integrations, actual restarts, and destructive actions were not executed. @@ -37,7 +37,7 @@ P1 means address first because the issue affects trust, consequential actions, l | 1 | Label stale player data consistently | P1 | S | | 2 | Preserve loading-button accessible names | P1 | S | | 3 | Put beta results and decisions above the event log | P1 | S–M | -| 4 | Preview promotion targets and link the resulting rollout | P1 | M | +| 4 | Preview promotion targets and link the resulting campaign | P1 | M | | 5 | Make reconciliation scope and partial results explicit | P1 | M | | 6 | Preserve keys when launch previews refresh | P1 | M | | 7 | Explain blueprint and test-plan validation locally | P1/P2 | S–M | @@ -59,9 +59,9 @@ Sources: [Fleet page](../src/routes/+page.svelte), lines 56, 62, 208; [ServerCar ### 2. Review the full impact of promotion — P1 · Source -“Promote” immediately sends a request. The backend expands the tested files to all currently matching scope targets and queues restarts for additional servers. The UI does not show that expansion at the moment of approval. Afterward, it ignores the returned rollout ID. +“Promote” immediately sends a request. The backend expands the tested files to all currently matching scope targets and queues restarts for additional servers. The UI does not show that expansion at the moment of approval. Afterward, it ignores the returned campaign ID. -Add a concise promotion review with exact versions, tested servers, additional eligible servers, and restart behavior. Use a final label such as **Promote to 12 servers**. Explain eligibility, file staging, and activation separately. After submission, show **Promotion created — 9 servers awaiting activation** with **View rollout**. Keep “Promoted version” distinct from “Running everywhere.” +Add a concise promotion review with exact versions, tested servers, additional eligible servers, and restart behavior. Use a final label such as **Promote to 12 servers**. Explain eligibility, file staging, and activation separately. After submission, show **Promotion created — 9 servers awaiting activation** with **View campaign**. Keep “Promoted version” distinct from “Running everywhere.” Acceptance: an operator who tested one lobby can identify the entire affected set and follow remaining restarts without searching another section. @@ -75,7 +75,7 @@ Separate **Reconcile selected servers** from **Reconcile entire fleet**. Show a Acceptance: filtering or selecting one server never leaves the action scope ambiguous. An operator can explain which files will be restored or removed and when servers will restart. -Sources: [Rollouts page](../src/routes/campaigns/+page.svelte), lines 118, 124, 203, 268; [drift API](../src/routes/api/drift/+server.ts), line 28; [drift implementation](../src/lib/server/fleet/drift.ts), line 265. +Sources: [Campaigns page](../src/routes/campaigns/+page.svelte), lines 118, 124, 203, 268; [drift API](../src/routes/api/drift/+server.ts), line 28; [drift implementation](../src/lib/server/fleet/drift.ts), line 265. ### 4. Put beta outcome and next action above activity — P1 · Rendered + Source @@ -128,11 +128,11 @@ Sources: [DestroyServerModal](../src/lib/ui/components/DestroyServerModal.svelte Reconciliation returns per-server skipped reasons, but the UI reads aggregate changed-file counts. Errors and success messages also share a blue-toned flash container. Rollback feedback can appear in the drift card far from the row that initiated it. -Use structured completion feedback: **7 servers updated, 2 skipped**, with reasons, relevant retry actions, and a rollout link. Place feedback beside the affected task. Keep success, partial success, and failure visually and programmatically distinct. +Use structured completion feedback: **7 servers updated, 2 skipped**, with reasons, relevant retry actions, and a campaign link. Place feedback beside the affected task. Keep success, partial success, and failure visually and programmatically distinct. Acceptance: a request that skipped every target cannot look like an uneventful successful run; the operator can find the unresolved servers immediately. -Sources: [Rollouts page](../src/routes/campaigns/+page.svelte), lines 128–138, 181–184, 299, 508; [drift implementation](../src/lib/server/fleet/drift.ts), lines 349, 371, 383–410. +Sources: [Campaigns page](../src/routes/campaigns/+page.svelte), lines 128–138, 181–184, 299, 508; [drift implementation](../src/lib/server/fleet/drift.ts), lines 349, 371, 383–410. ### 9. Explain scope changes and distinguish eligibility from installation — P1 · Source @@ -152,7 +152,7 @@ Preserve the accessible label during loading and announce meaningful progress se Acceptance: the same action has a stable accessible name before, during, and after execution; keyboard and touch users can identify which server failed without hovering. -Sources: [Button](../src/lib/ui/components/primitives/Button.svelte), lines 63–71, 155; [Field](../src/lib/ui/components/primitives/Field.svelte), line 25; [rollout mini-pipelines](../src/routes/campaigns/+page.svelte), line 380. These recommendations follow W3C guidance on [Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html) and [Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html). +Sources: [Button](../src/lib/ui/components/primitives/Button.svelte), lines 63–71, 155; [Field](../src/lib/ui/components/primitives/Field.svelte), line 25; [campaign mini-pipelines](../src/routes/campaigns/+page.svelte), line 380. These recommendations follow W3C guidance on [Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html) and [Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html). ### 11. Make server detail lead toward the likely next task — P2 · Rendered + Source @@ -324,7 +324,7 @@ Sources: [LogPanel](../src/lib/ui/components/LogPanel.svelte); [notification sto ## Suggested layout for operational detail pages -Use the same reading order across beta, rollout, and server-deployment details: +Use the same reading order across beta, campaign, and server-deployment details: 1. **Outcome and next action:** current state, elapsed/remaining time, blocker, primary recovery or completion action. 2. **Affected servers:** progress counts and a failed/waiting-first list with links to relevant diagnostics. @@ -337,7 +337,7 @@ This gives the existing shared components a consistent purpose without forcing e **First pass — clarity and trust:** address stale card values, unnamed loading buttons, silent blueprint limits, beta results placement, and misleading/remote action feedback. These are bounded changes with clear reproduction cases. -**Second pass — complete action flows:** add promotion and reconciliation reviews, explicit beta timing/retry semantics, retained launch keys, beta drafts, import completion state, and links from outcomes to their rollout or recovery destination. +**Second pass — complete action flows:** add promotion and reconciliation reviews, explicit beta timing/retry semantics, retained launch keys, beta drafts, import completion state, and links from outcomes to their campaign or recovery destination. **Third pass — scale and polish:** improve target pickers, library context restoration, mobile density, config composition, setup status, and evidence navigation. Design queued-operation cancellation separately with its backend guarantees. diff --git a/src/lib/ui/components/BetaPlanBuilder.svelte b/src/lib/ui/components/BetaPlanBuilder.svelte index bc4dc4d..1db83c3 100644 --- a/src/lib/ui/components/BetaPlanBuilder.svelte +++ b/src/lib/ui/components/BetaPlanBuilder.svelte @@ -31,7 +31,7 @@ ?? presets.find(p => JSON.stringify(p.plan) === JSON.stringify(plan))); const savedPresets = $derived(presets.filter(p => !builtInPlans.some(b => b.name === p.name))); const failureSummary = $derived(plan.failureAction === 'fail' ? 'Fail and hold for review' : plan.failureAction === 'pause' ? 'Pause for investigation' : 'Roll back automatically'); - const rolloutSummary = $derived(plan.waveSize ? `${plan.waveSize} server${plan.waveSize === 1 ? '' : 's'} per wave` : 'Deploy to all selected servers'); + const waveSummary = $derived(plan.waveSize ? `${plan.waveSize} server${plan.waveSize === 1 ? '' : 's'} per wave` : 'Deploy to all selected servers'); async function loadPresets() { const response = await fetch('/api/betas/presets'); @@ -175,7 +175,7 @@
- Coverage & rollout{coverageSummary(plan)} · {rolloutSummary}Configure + Coverage & waves{coverageSummary(plan)} · {waveSummary}Configure