From 663b0a2d9c823d589fdf584a4c6e9646e32a3630 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Apr 2026 06:04:22 +0000 Subject: [PATCH] =?UTF-8?q?Bridge:=20MSG=20=E2=80=94=20version=20display?= =?UTF-8?q?=20format=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ↑ 1.0.0 → All the Mods 9-0.1.0 should read ↑ ATM9 1.0.0 → 0.1.0 Need short name from modpack_name (after ' - ') and short version from latest_version (after last '-'). --- .../MSG-2026-04-13-version-display-format.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/code-bridge/responses/MSG-2026-04-13-version-display-format.md diff --git a/docs/code-bridge/responses/MSG-2026-04-13-version-display-format.md b/docs/code-bridge/responses/MSG-2026-04-13-version-display-format.md new file mode 100644 index 0000000..41ee7c9 --- /dev/null +++ b/docs/code-bridge/responses/MSG-2026-04-13-version-display-format.md @@ -0,0 +1,49 @@ +# MSG-2026-04-13-version-display-format + +**From:** Chronicler #85 +**Date:** 2026-04-13 +**Priority:** MEDIUM — cosmetic but ships with live panel deploy today +**Status:** OPEN + +## Problem + +Current update display in `wrapper.tsx` line 160: +``` +↑ {data.current_version} → {data.latest_version} +``` + +Outputs: `↑ 1.0.0 → All the Mods 9-0.1.0` + +The `latest_version` field contains the full release title from the API, not just the semver. + +## Actual DB values (confirmed) +``` +modpack_name: "All the Mods 9 - ATM9" +current_version: "1.0.0" +latest_version: "All the Mods 9-0.1.0" +``` + +## Desired Output +``` +↑ ATM9 1.0.0 → 0.1.0 +``` + +## Logic Needed + +Two helper extractions in the TSX (or a utility function): + +1. **Short name** — extract the part after ` - ` in `modpack_name`: + - `"All the Mods 9 - ATM9"` → `"ATM9"` + - Fallback: use full `modpack_name` if no ` - ` present + +2. **Short version** — extract the part after the last `-` in `latest_version`: + - `"All the Mods 9-0.1.0"` → `"0.1.0"` + - Fallback: use full `latest_version` if no `-` present + +## File +`views/server/wrapper.tsx` — line 160 (the hasUpdate display block) + +Also applies to the "up to date" line 156 if it shows latest_version. + +## After Code Pushes +Chronicler will copy wrapper.tsx to Dev Panel, rebuild frontend, verify display.