From 01ad93a11ae944439e7ba946663d2605b5048f50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 8 May 2026 12:55:27 +0000 Subject: [PATCH 1/6] Simplify Steam Workshop UX and wire panel docs links Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/1575c81b-f8a7-433a-8f3b-e068c0992c18 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- CHANGELOG.md | 4 + docs/COPILOT_TODO.md | 1 + modules/billing/docs.php | 12 +- .../billing/docs/getting-started/index.php | 6 +- modules/billing/timestamp.txt | 2 +- modules/gamemanager/server_monitor.php | 21 + modules/steam_workshop/admin.php | 21 +- .../steam_workshop/agent_update_workshop.php | 58 +- modules/steam_workshop/includes/functions.php | 82 ++- modules/steam_workshop/module.php | 242 +++++--- modules/steam_workshop/monitor_buttons.php | 35 +- modules/steam_workshop/user.php | 573 +++++++----------- modules/support/support.php | 37 +- 13 files changed, 566 insertions(+), 528 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a77fc6af..0f52143b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2026-05-08 +- **Steam Workshop reliability + UI simplification:** Removed customer CLI/update scripting instructions from Workshop user flow, reduced per-server behavior options to supported modes only, switched remaining Steam Workshop SQL references to prefix helpers (no `OGP_DB_PREFIX` strings), hardened queued-update agent processing (`queued → updating → installed/failed`) with clearer error persistence, and refreshed monitor/support documentation links to open game-specific docs (fallback to docs index) in a new tab. +- **Billing docs routing refresh:** Updated docs browser links/icons to root-relative storefront paths (`/docs.php`, `/docs/...`) and removed stale hardcoded panel host guidance from getting-started documentation. + ## 2026-05-07 - **README + storefront mobile/cart pricing fixes:** Rewrote the root README for GSP positioning, hardened storefront mobile responsiveness (login, order, cart, shared header guardrails), fixed add-to-cart price persistence for low-decimal paid items, aligned cart/free-checkout math to `total_due` values, and refreshed the canonical storefront footer timestamp. - **Billing/cart/storefront stability pass:** Hardened `add_to_cart.php` to build schema-compatible invoice inserts dynamically (including legacy installs missing `period_start`), fixed free-checkout DB close handling so wrapper objects are never passed to `mysqli_close()`, switched cart/free-total decisions to cent-based math so low nonzero prices (e.g. $0.02) never show as FREE, improved canonical game deduplication + OS variant matching in storefront list/order pages, and aligned Steam Workshop behavior labels with the new restart/update wording. diff --git a/docs/COPILOT_TODO.md b/docs/COPILOT_TODO.md index 1b597ccc..6986a0b7 100644 --- a/docs/COPILOT_TODO.md +++ b/docs/COPILOT_TODO.md @@ -7,3 +7,4 @@ - Add a side-by-side before/after diff preview panel to the config_games top-level XML section editor before section saves. - Add an integration smoke test that exercises paid checkout, free checkout, and add-to-cart on installs with/without `period_start` to prevent billing schema drift regressions. - Add a storefront visual-regression check at 375px and 430px breakpoints covering login, order, and cart pages to prevent mobile overflow regressions. +- Complete a full pass over all `modules/billing/docs/*` game guides to standardize OS/Workshop/RCON capability statements against current XML-backed server support. diff --git a/modules/billing/docs.php b/modules/billing/docs.php index cc654ec3..8931e24a 100644 --- a/modules/billing/docs.php +++ b/modules/billing/docs.php @@ -19,6 +19,7 @@ $docsDir = __DIR__ . '/docs'; // Get action and doc parameters $action = $_GET['action'] ?? 'list'; $doc = $_GET['doc'] ?? ''; +$docsPagePath = '/docs.php'; /** * Get all documentation folders with their metadata @@ -63,9 +64,9 @@ function getDocCategories($docsDir) { // Find icon file $icon = ''; if (file_exists($folderPath . '/icon.png')) { - $icon = 'docs/' . $folder . '/icon.png'; + $icon = '/docs/' . $folder . '/icon.png'; } elseif (file_exists($folderPath . '/icon.jpg')) { - $icon = 'docs/' . $folder . '/icon.jpg'; + $icon = '/docs/' . $folder . '/icon.jpg'; } $categories[] = [ @@ -137,7 +138,7 @@ uksort($grouped, function($a, $b) use ($categoryOrder) { - <?php echo $action === 'view' ? 'Documentation' : 'Documentation - GameServers.World'; ?> + <?php echo $action === 'view' ? 'Documentation' : 'Documentation - GSP'; ?> -

- Server: -    - Game: -    - Workshop Profile: -

- - -

Add Workshop Mod

-
- - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
-
- -
- - -

Installed Mods ()

- - -

No mods added yet. Use the form above to add Workshop IDs.

- -
- - - - - - - - - - - - - - - - $mod): ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Workshop IDMod NameFolder NameTypeEnabledStatusOrderActions
- - - - - - - - - - - - - -
- - - -
-
- Installed'; - } elseif ($s === 'queued') { - echo 'Queued'; - } elseif ($s === 'failed') { - echo 'Failed'; - } elseif ($s === 'updating') { - echo 'Updating'; - } else { - echo 'Not installed'; - } - ?> - -
- - - -
-
- - - -
-
-
- - - -
-
- - - -
- - -

Generated Launch Parameters

-

- Based on the enabled mods above (sorted by order). Copy these into your server startup command. -

- - -

No enabled mods – launch parameters will be empty.

- - -

- Client mods (-mod=):
- -

- - -

- Server-side mods (-serverMod=):
- -

- -

- Combined:
- -

- - -
- - -

Install / Update Mods

-

- Clicking Queue Update marks all enabled mods as queued. - Then run the agent on the game server host (where SteamCMD and the game files are located) - to download and install the mods. Adjust the path to the panel's - modules/steam_workshop/agent_update_workshop.php for your server: -

-
php /path/to/panel/modules/steam_workshop/agent_update_workshop.php --home-id=
- -
- - -
- -
- - -

Workshop Behavior Settings

-

- Configure how Workshop mods are installed and updated for this server. - All options default to the safest setting (manual only, no automatic restarts). -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingValueHelp
Install / Update Mode - - - Manual only – mods are only updated when you click “Queue Update” above.
- On next restart – queued updates are applied the next time the server restarts.
- Before every start – the update check runs automatically each time the server starts.
- Scheduled – the update check runs on the interval set below (requires cron / agent). -
Restart Behavior - - - Controls what happens when new mod updates are found.
- Do not restart – updates are staged but the server keeps running (safe default).
- If empty – the server is restarted only when there are zero players connected.
- Immediate with warning – a countdown warning is broadcast, then the server restarts.
- Next manual restart – updates are installed the next time you manually stop/start the server. -
Hot-Load - - - Disabled – no hot-loading; mod changes take effect only after a server restart (safe default).
- Attempt – if the game supports live mod reloading (e.g. via RCON), try to hot-load instead of restarting. -
Warning Countdown - minutes - - Minutes of advance warning broadcast to players before an automatic restart.
- Only used when Restart Behavior is set to Restart immediately after warning.
- Default: 10 minutes. -
Scheduled Check Interval - - - How often the scheduled update check runs.
- Only used when Install / Update Mode is set to Scheduled update check.
- Requires the Workshop agent to be running via cron on the game server host. -
- -

- +

+

+ Server: +   Game: +   Workshop Profile:

- +

+ Queue updates from this page. The server agent applies queued updates automatically. +

+
+ +
+

Add Workshop Mod

+
+ +
+ + + +
+

+ +

+
+
+ +
+

Update Queue & Last Result

+

+ Enabled mods: +   Queued: +   Installed: +   Failed: +

+

+ Last update time: +

+ +

Last error:

+ +
+ + +
+
+ +
+

Workshop Behavior Settings

+
+ +
+ + + +
+

+ +

+
+
+ +
+

Installed Mods ()

+ +

No mods added yet. Use the form above to add Workshop IDs.

+ +
+ + + + + + + + + + + + + + + + + + $mod): ?> + + + + + + + + + + 70 ? (substr($mod['last_error'], 0, 67) . '...') : $mod['last_error']) : ''; ?> + + + + + + +
#Workshop IDMod NameFolder NameTypeEnabledStatusLast UpdateLast ErrorOrderActions
+
+ + + +
+ + + + +
+ + + +
+
+ Installed'; + } elseif ($s === 'queued') { + echo 'Queued'; + } elseif ($s === 'failed') { + echo 'Failed'; + } elseif ($s === 'updating') { + echo 'Updating'; + } else { + echo 'Not installed'; + } + ?> + +
+ + + +
+
+ + + +
+
+
+ + + +
+
+
+ +
'; echo "

".get_lang('support')."

"; + $defaultDocsUrl = '/docs.php'; + if (!empty($server_homes) && is_array($server_homes)) { + foreach ((array)$server_homes as $server_home_row) { + if (!empty($server_home_row['game_key'])) { + $defaultDocsUrl = gsp_support_docs_url_for_game_key($server_home_row['game_key']); + break; + } + } + } + echo "
" + . "Game Documentation" + . "Open setup and troubleshooting docs in a new tab." + . "
"; echo '
@@ -97,7 +122,8 @@ if (!empty($webhook)) { echo get_lang('select_server').":


"; @@ -138,6 +164,15 @@ if (!empty($webhook)) { return false; } } + $(document).ready(function(){ + function updateSupportDocLink(){ + var selected = $('#gameserver option:selected'); + var url = selected.data('doc-url') || '/docs.php'; + $('#support-doc-link').attr('href', url); + } + $('#gameserver').on('change', updateSupportDocLink); + updateSupportDocLink(); + }); Date: Fri, 8 May 2026 12:56:53 +0000 Subject: [PATCH 2/6] Address review nits for steamcmd checks and docs wording Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/1575c81b-f8a7-433a-8f3b-e068c0992c18 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/billing/docs/getting-started/index.php | 2 +- modules/steam_workshop/agent_update_workshop.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/billing/docs/getting-started/index.php b/modules/billing/docs/getting-started/index.php index e5a16061..991d4fa6 100644 --- a/modules/billing/docs/getting-started/index.php +++ b/modules/billing/docs/getting-started/index.php @@ -12,7 +12,7 @@

Once your payment is processed, you'll receive:

diff --git a/modules/steam_workshop/agent_update_workshop.php b/modules/steam_workshop/agent_update_workshop.php index 54fc8ef0..46736d66 100644 --- a/modules/steam_workshop/agent_update_workshop.php +++ b/modules/steam_workshop/agent_update_workshop.php @@ -353,8 +353,11 @@ function sw_agent_steamcmd_download(array $mod, array $profile, array $tpl_vars, } // Validate that steamcmd exists - if (!$dry_run && (!is_file($steamcmd) || !is_executable($steamcmd))) { - return array('ok' => false, 'error' => "SteamCMD not found or not executable: $steamcmd"); + if (!$dry_run && !is_file($steamcmd)) { + return array('ok' => false, 'error' => "SteamCMD not found: $steamcmd"); + } + if (!$dry_run && !is_executable($steamcmd)) { + return array('ok' => false, 'error' => "SteamCMD is not executable: $steamcmd"); } // Build argument list; escape each argument individually. From 079da1990ef371a53ac0b2769679cc4b35f0b219 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 8 May 2026 12:57:59 +0000 Subject: [PATCH 3/6] Apply validation feedback for docs title and workshop migration notes Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/1575c81b-f8a7-433a-8f3b-e068c0992c18 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/billing/docs.php | 3 ++- modules/steam_workshop/agent_update_workshop.php | 11 ++++++----- modules/steam_workshop/module.php | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/billing/docs.php b/modules/billing/docs.php index 8931e24a..e93301d1 100644 --- a/modules/billing/docs.php +++ b/modules/billing/docs.php @@ -20,6 +20,7 @@ $docsDir = __DIR__ . '/docs'; $action = $_GET['action'] ?? 'list'; $doc = $_GET['doc'] ?? ''; $docsPagePath = '/docs.php'; +$pageTitle = $action === 'view' ? 'Documentation' : 'Documentation - GSP'; /** * Get all documentation folders with their metadata @@ -138,7 +139,7 @@ uksort($grouped, function($a, $b) use ($categoryOrder) { - <?php echo $action === 'view' ? 'Documentation' : 'Documentation - GSP'; ?> + <?php echo htmlspecialchars($pageTitle, ENT_QUOTES, 'UTF-8'); ?>