diff --git a/docs/code-bridge/requests/REQ-2026-04-14-version-ui-matrix.md b/docs/code-bridge/requests/REQ-2026-04-14-version-ui-matrix.md new file mode 100644 index 0000000..c312f72 --- /dev/null +++ b/docs/code-bridge/requests/REQ-2026-04-14-version-ui-matrix.md @@ -0,0 +1,98 @@ +# Code Request — Version UI in Server Matrix Body + +**Filed by:** Chronicler #88 +**Date:** 2026-04-14 +**Priority:** Medium +**Context:** Pre-launch, defer until stable + +--- + +## Background + +Chronicler #88 added modpack version tracking infrastructure today: +- `current_version` column on `server_config` +- `server_version_history` table (version, who, when) +- `POST /admin/servers/:id/set-version` route +- `GET /admin/servers/:id/version-history` route +- Helper JS functions `saveVersion()`, `toggleVersionForm()`, `hideVersionForm()` in `servers/index.ejs` + +The UI addition to `_matrix_body.ejs` kept breaking EJS due to single quotes +inside ternary expressions inside HTML attributes. The file was reverted to +clean state. This task is to add the version UI properly. + +--- + +## What To Add + +At the bottom of each server card in `_matrix_body.ejs` (there are TWO loops — +TX1 and NC1), add a version display section BEFORE the closing ``. + +The tricky part: avoid single quotes inside `<%= %>` tags that are inside +HTML attributes. Use a local variable assignment instead: + +```ejs +<% var currentVersion = config && config.current_version ? config.current_version : null; %> +