studio: show category names in the chosen language (carry of #2377) #3094

Manually merged
github merged 3 commits from github-bot/gh-3094 into gh-pr/3094/base 2026-12-02 13:26:33 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-02 10:31 UTC · original
MoonEyes:carry/2377 → main · +55 −3 · 2 files · 3 commits · merged 2026-12-02 13:26 UTC

Claimed in the coordination issue as: STUDIO-CATEGORY-NAMES (#1608), the original author's item ID and claim

What and why

Carry of #2377 (syfyra), unchanged since 2026-11-26 (last commit; the only later activity is a verification comment and a draft-status review note by others). Branch = main + the author's head (both commits kept) + a clean merge, no conflicts + no commits of mine.

The studio's I18N table has a catNames entry in both languages, but nothing read it, so the category chips and the model list headers showed the server's two-language name (Транспорт (Vehicles)) whatever the language. The change:

  • The chips and the list headers show categoryLabel(cat), which is catNames[cat] of the current language, or the server's name when catNames has no entry for it.
  • The server's name stays the filter key (selectCategory, activeCategory, the search), so filtering is unchanged.
  • The chips are relabelled on a language switch from a small list kept when they are built.

The original was stacked on #2339 (STUDIO-EU-STRINGS), which has since merged; the merge with current main drops that part, so the diff against main is the category-names change only (viewer/studio.html, tests/test_viewer_studio.cjs).

Review: the only review is a draft-status note (rebase once #2339 merges, run CI, mark ready), which this branch addresses by being on current main. There are no inline review comments and no reported defects, so I made no fixes. The verification comment (VERIFY-2377) found nothing against the change.

Tested

Windows 11, Node v26.13.0, no GPU, no game files, on main 80910637f plus this branch:

  • node --test tests/test_viewer_studio.cjs: 21 tests, 21 pass.
  • Red: with viewer/studio.html restored to main's version (git show origin/main:viewer/studio.html) and the branch's test file, 21 tests, 20 pass, 1 fails: "category chips and headers show the catNames of the chosen language and keep the server name as the filter". The file was restored afterwards.
  • python -I scripts/check_no_game_data.py viewer/studio.html tests/test_viewer_studio.cjs: clean (exit 0).

Not run: the full suite, CI. The tests run the page's script in a vm context, so the HTML and CSS are not rendered and no browser was used.

GPUs tested: n/a (unit tests only)

AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

Supersedes #2377 once merged; the original stays open until a maintainer decides.

🤖 Generated with Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-02 10:31 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3094) `MoonEyes:carry/2377` → `main` · +55 −3 · 2 files · 3 commits · merged 2026-12-02 13:26 UTC Claimed in the coordination issue as: STUDIO-CATEGORY-NAMES (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608), the original author's item ID and claim ### What and why Carry of #2377 (syfyra), unchanged since 2026-11-26 (last commit; the only later activity is a verification comment and a draft-status review note by others). Branch = main + the author's head (both commits kept) + a clean merge, no conflicts + no commits of mine. The studio's `I18N` table has a `catNames` entry in both languages, but nothing read it, so the category chips and the model list headers showed the server's two-language name (`Транспорт (Vehicles)`) whatever the language. The change: - The chips and the list headers show `categoryLabel(cat)`, which is `catNames[cat]` of the current language, or the server's name when `catNames` has no entry for it. - The server's name stays the filter key (`selectCategory`, `activeCategory`, the search), so filtering is unchanged. - The chips are relabelled on a language switch from a small list kept when they are built. The original was stacked on #2339 (STUDIO-EU-STRINGS), which has since merged; the merge with current main drops that part, so the diff against main is the category-names change only (`viewer/studio.html`, `tests/test_viewer_studio.cjs`). Review: the only review is a draft-status note (rebase once #2339 merges, run CI, mark ready), which this branch addresses by being on current main. There are no inline review comments and no reported defects, so I made no fixes. The verification comment (VERIFY-2377) found nothing against the change. ### Tested Windows 11, Node v26.13.0, no GPU, no game files, on main 80910637f plus this branch: - `node --test tests/test_viewer_studio.cjs`: 21 tests, 21 pass. - Red: with `viewer/studio.html` restored to main's version (`git show origin/main:viewer/studio.html`) and the branch's test file, 21 tests, 20 pass, 1 fails: "category chips and headers show the catNames of the chosen language and keep the server name as the filter". The file was restored afterwards. - `python -I scripts/check_no_game_data.py viewer/studio.html tests/test_viewer_studio.cjs`: clean (exit 0). Not run: the full suite, CI. The tests run the page's script in a `vm` context, so the HTML and CSS are not rendered and no browser was used. GPUs tested: n/a (unit tests only) AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) Supersedes #2377 once merged; the original stays open until a maintainer decides. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The studio's I18N table has catNames for both languages ("Транспорт
(Vehicles)" -> "Транспорт" / "Vehicles"), but the category chips and the
model list headers showed the server's two-language name in either
language. Show categoryLabel(cat) there, keep the server's name as the
filter key (and for any name catNames does not list), and relabel the
chips on a language switch; the list headers already re-render.

Builds on #2339 (STUDIO-EU-STRINGS), which applies the other unused
entries of the same table.

Tested: new test in tests/test_viewer_studio.cjs (fails on #2339's head,
passes after); the other studio tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 10:35:59 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-02 11:05 UTC · original

Checked in a real browser, since the description notes the tests run the script in a vm context only.

Setup: Windows 11, head c6b51d1a4 merged with current main, no conflicts. I started tools/gallery.py --models-dir on a folder of 8 placeholder .glb files named to hit every category (veh_car_a, w_pistol_a, ped_male_a, tree_oak_a and so on, 4 bytes each, no game data). The page ran in a Chromium-based browser. node --test tests/test_viewer_studio.cjs: 21 pass, 0 fail (Node 20).

Works as described:

  • RU: the chips read Транспорт (2), Оружие (1) and so on, and the accordion headers match.
  • EU: they read Vehicles (2), Vegetation & Nature (1), World & Architecture (1) and so on, again with matching headers.
  • I selected Транспорт, then switched EU → RU. The chip kept its active class and was relabelled. activeCategory stayed the server key Транспорт (Vehicles), so the filter is unaffected.

One small gap: search does not match the label it shows. The model search box says "Search by name or category...", but renderAccordionList still matches m.category, the server key. With EU selected and All chosen:

Query Result
Vegetation nothing
Architecture nothing
Nature Vegetation & Nature
World World & Architecture
Транспорт Vehicles

So a word that is only in the shown label finds nothing, while a word that is only in the hidden RU key does. Before this PR the chips showed the key itself, so this mismatch is new. A possible fix is to also test categoryLabel(m.category).toLowerCase().includes(modelSearchQuery) in the matchesSearch check. This is not a blocker.

Not checked: the 3D view. The placeholder files are not real glTF. The /vendor/ three.js requests also returned 404 in this setup.

GPUs tested: n/a (UI only).

AI-assisted: yes (Claude Code).

**@⁠Kal0s-design** on GitHub · 2026-12-02 11:05 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3094#issuecomment-7343412022) Checked in a real browser, since the description notes the tests run the script in a `vm` context only. Setup: Windows 11, head `c6b51d1a4` merged with current `main`, no conflicts. I started `tools/gallery.py --models-dir` on a folder of 8 placeholder `.glb` files named to hit every category (`veh_car_a`, `w_pistol_a`, `ped_male_a`, `tree_oak_a` and so on, 4 bytes each, no game data). The page ran in a Chromium-based browser. `node --test tests/test_viewer_studio.cjs`: 21 pass, 0 fail (Node 20). **Works as described:** - RU: the chips read `Транспорт (2)`, `Оружие (1)` and so on, and the accordion headers match. - EU: they read `Vehicles (2)`, `Vegetation & Nature (1)`, `World & Architecture (1)` and so on, again with matching headers. - I selected `Транспорт`, then switched EU → RU. The chip kept its `active` class and was relabelled. `activeCategory` stayed the server key `Транспорт (Vehicles)`, so the filter is unaffected. **One small gap: search does not match the label it shows.** The model search box says "Search by name or category...", but `renderAccordionList` still matches `m.category`, the server key. With EU selected and All chosen: | Query | Result | |---|---| | `Vegetation` | nothing | | `Architecture` | nothing | | `Nature` | Vegetation & Nature | | `World` | World & Architecture | | `Транспорт` | Vehicles | So a word that is only in the shown label finds nothing, while a word that is only in the hidden RU key does. Before this PR the chips showed the key itself, so this mismatch is new. A possible fix is to also test `categoryLabel(m.category).toLowerCase().includes(modelSearchQuery)` in the `matchesSearch` check. This is not a blocker. Not checked: the 3D view. The placeholder files are not real glTF. The `/vendor/` three.js requests also returned 404 in this setup. GPUs tested: n/a (UI only). AI-assisted: yes (Claude Code).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-02 11:15 UTC · original

Thanks for the browser check. The search gap is fixed in f17157c8f: the model search now matches the category name shown in the chosen language as well as the server's name, so Vegetation finds Vegetation & Nature in EU while Транспорт and Nature still work. A test covers the three queries; it fails with the previous studio.html and passes now (node --test tests/test_viewer_studio.cjs: 22 pass).

AI-assisted (Claude Code, Claude Opus 5.5)

**@⁠MoonEyes** on GitHub · 2026-12-02 11:15 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3094#issuecomment-7343654374) Thanks for the browser check. The search gap is fixed in f17157c8f: the model search now matches the category name shown in the chosen language as well as the server's name, so `Vegetation` finds Vegetation & Nature in EU while `Транспорт` and `Nature` still work. A test covers the three queries; it fails with the previous `studio.html` and passes now (`node --test tests/test_viewer_studio.cjs`: 22 pass). AI-assisted (Claude Code, Claude Opus 5.5)
Kal0s-design's check of #3094: the chips and headers now show the
catNames of the chosen language, but the model search still matched
only the server's category name, so "Vegetation" found nothing in EU
while a word of the hidden Russian name did. The search now matches
the shown name as well as the server's; a test covers both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠enlight3d on GitHub · 2026-12-02 13:10 UTC · original

RUN (independent run on Windows, #3094 head f17157c8f, merged locally into main 23a51c494 with git merge --no-ff, no conflicts. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)

  • History: #2377's head 45a128d32 (syfyra) is an ancestor of the head through the merge c6b51d1a4, under its author's name. The body says "no commits of mine", but the head is f17157c8f, the carrier's search fix made after Kal0s-design's browser check. The counts below are for that head.
  • node --test tests/test_viewer_studio.cjs (Node 24.18): main 21 tests pass; merge 23 pass.
  • node --test tests/test_*.cjs, the viewer suite CI runs: main 111 pass; merge 113 pass.
  • Red: main's viewer/studio.html with the head's test file gives 23 tests and 2 failures:
    • "category chips and headers show the catNames of the chosen language...": the chips read Транспорт (Vehicles) (1), where Транспорт (1) is wanted.
    • "model search matches the category name shown in the chosen language...": Vegetation finds nothing.
  • Previous head: c6b51d1a4's page with the head's tests fails the search test, which is the gap Kal0s-design reported. It also fails the camera test, because that page predates #3092 on main.
  • Mutations of the merge's viewer/studio.html, each run with tests/test_viewer_studio.cjs and restored afterwards (git status clean). 4 of 6 are killed:
    • Chips not relabelled on a language switch: killed (the chips test).
    • categoryLabel returning the server's name: killed (both new tests).
    • Search back to the server's name only, the c6b51d1a4 behaviour: killed (the search test).
    • List headers showing the server's name: killed (both new tests).
    • Survives: a chip that filters by its shown label instead of the server's name (selectCategory(categoryLabel(cat), chip) in onclick). The chips test calls selectCategory directly with the server's name, so the key the chip itself passes is not pinned. Clicking the "Vehicles" chip with this mutation would match no model.
    • Survives: the chip list not reset when chips are rebuilt (categoryChips.length = 0 dropped). Old chips would then be relabelled too, but they are no longer on the page, so nothing visible changes in the tests.

Not covered here: a real browser (the tests run the page's script in a vm context; Kal0s-design checked c6b51d1a4 in Chromium), and Linux and macOS.

Verdict: PASS. Chips and headers follow the chosen language and the filter keeps the server's key, the search matches the shown label (the gap from the browser check is fixed and pinned), red on main and green on the merge hold, and the author's commit is kept. One gap remains: no test clicks a chip, so the key passed by onclick is not pinned.

Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, Node 24.18.0; unit tests only, no GPU or game files used.

**@⁠enlight3d** on GitHub · 2026-12-02 13:10 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3094#issuecomment-7346456743) RUN (independent run on Windows, #3094 head f17157c8f, merged locally into `main` 23a51c494 with `git merge --no-ff`, no conflicts. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.) - History: #2377's head 45a128d32 (syfyra) is an ancestor of the head through the merge c6b51d1a4, under its author's name. The body says "no commits of mine", but the head is f17157c8f, the carrier's search fix made after Kal0s-design's browser check. The counts below are for that head. - `node --test tests/test_viewer_studio.cjs` (Node 24.18): main 21 tests pass; merge 23 pass. - `node --test tests/test_*.cjs`, the viewer suite CI runs: main 111 pass; merge 113 pass. - Red: `main`'s `viewer/studio.html` with the head's test file gives 23 tests and 2 failures: - "category chips and headers show the catNames of the chosen language...": the chips read `Транспорт (Vehicles) (1)`, where `Транспорт (1)` is wanted. - "model search matches the category name shown in the chosen language...": `Vegetation` finds nothing. - Previous head: c6b51d1a4's page with the head's tests fails the search test, which is the gap Kal0s-design reported. It also fails the camera test, because that page predates #3092 on `main`. - Mutations of the merge's `viewer/studio.html`, each run with `tests/test_viewer_studio.cjs` and restored afterwards (`git status` clean). 4 of 6 are killed: - Chips not relabelled on a language switch: killed (the chips test). - `categoryLabel` returning the server's name: killed (both new tests). - Search back to the server's name only, the c6b51d1a4 behaviour: killed (the search test). - List headers showing the server's name: killed (both new tests). - Survives: a chip that filters by its shown label instead of the server's name (`selectCategory(categoryLabel(cat), chip)` in `onclick`). The chips test calls `selectCategory` directly with the server's name, so the key the chip itself passes is not pinned. Clicking the "Vehicles" chip with this mutation would match no model. - Survives: the chip list not reset when chips are rebuilt (`categoryChips.length = 0` dropped). Old chips would then be relabelled too, but they are no longer on the page, so nothing visible changes in the tests. Not covered here: a real browser (the tests run the page's script in a `vm` context; Kal0s-design checked c6b51d1a4 in Chromium), and Linux and macOS. Verdict: PASS. Chips and headers follow the chosen language and the filter keeps the server's key, the search matches the shown label (the gap from the browser check is fixed and pinned), red on `main` and green on the merge hold, and the author's commit is kept. One gap remains: no test clicks a chip, so the key passed by `onclick` is not pinned. Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, Node 24.18.0; unit tests only, no GPU or game files used.
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-02 13:13 UTC · original

Merging. Head f17157c8f merges cleanly with main bf7886746 and does not force a rebase of #2566. Independent check on head f17157c8f: enlight3d's red/green on main + this head (2 failures with main's page: untranslated chips, empty search for a translated category; green 23 node tests, viewer suite 111 -> 113; 4 of 6 mutations killed, no test clicks a chip), comment 7346456743; syfyra's commits from #2377 are kept; CI green incl. no-game-data. Merged by MoonEyes.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-12-02 13:13 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3094#issuecomment-7346547092) Merging. Head `f17157c8f` merges cleanly with `main` `bf7886746` and does not force a rebase of #2566. Independent check on head f17157c8f: enlight3d's red/green on main + this head (2 failures with main's page: untranslated chips, empty search for a translated category; green 23 node tests, viewer suite 111 -> 113; 4 of 6 mutations killed, no test clicks a chip), comment 7346456743; syfyra's commits from #2377 are kept; CI green incl. no-game-data. Merged by MoonEyes. AI-assisted (Claude Code).
github-bot changed target branch from main to gh-pr/3094/base 2026-12-02 13:26:22 +00:00
github manually merged commit f17157c8f0 into gh-pr/3094/base 2026-12-02 13:26:33 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3094
No description provided.