wrolpi/app/src
Roland 4d6a6d467d
fix: an unnamed language code took down the whole Zim manage page
/zim/manage rendered a white screen with `Cannot read properties of undefined
(reading 'toLowerCase')` repeated once per catalog row.

The language dropdown is built as `{value: code, label: iso_639_codes[code]}`.
That table covers ISO 639-1 and 639-2; the Kiwix catalog also carries 639-3
codes and locale variants -- `ami`, `ary`, `arz`, `be-tarask` -- and on the
running instance 89 of the codes in the catalog are absent from its 672-entry
table.  Every one of those produced `label: undefined`, and a `searchable`
Mantine Select calls `option.label.toLowerCase()` while building its dropdown on
MOUNT, before anyone opens it.  So a single unnamed language anywhere in the
catalog took the page with it, and Wikipedia alone carries dozens.

The option falls back to the code.  Not to a blank: a user choosing which
language to subscribe to has to tell one unnamed language from another, and the
code is the only thing known about it.  `iso_639_codes` is read defensively too
-- ManageZim initialises it to null and fills it from the API, so the first
render of every row happens with no table at all.

The other two lookup-derived labels in the app, in ControllerPage and Configs,
already fall back this way.  Zim was the only one that did not.

Four cases, written first and confirmed to fail with the reported TypeError
rather than for some other reason -- the first version failed on "Table
component was not found in the tree", which would have proved nothing, so the
row is now given the table Mantine requires.  One of the four is the inverse: a
code the table DOES name must still render its name, so the fallback cannot
quietly replace every label.

1128 jest / 63 suites, clean npm run build.  Confirmed on the running app: the
page loads with 32 language dropdowns and no error overlay.
2026-08-05 18:40:43 -06:00
..
api controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
components fix: an unnamed language code took down the whole Zim manage page 2026-08-05 18:40:43 -06:00
contexts test: one place for fixtures, real providers instead of mocked context modules 2026-08-05 18:36:48 -06:00
hooks ui: the corner triggers, the More button, and the search modal 2026-08-05 18:38:04 -06:00
themes review: measure what can be measured, and say what is not 2026-08-05 18:38:05 -06:00
types ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
api.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
App.css fix: toasts were covering the navigation bar's controls 2026-08-05 18:38:13 -06:00
App.js ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
DashboardPage.js ui: only the top modal answers Escape, and the audited widths 2026-08-05 18:38:07 -06:00
DashboardPage.test.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
Events.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
import-cycles.test.js fix: break the import cycle that put useCalculators in the TDZ 2026-08-05 18:37:53 -06:00
index.css ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
index.js Fixing changes before merge. 2023-02-08 21:18:51 -07:00
logo.svg Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
reportWebVitals.js Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
semantic-baseline.json ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
semantic-baseline.test.js build: uninstall Semantic UI 2026-08-05 18:36:31 -06:00
setupTests.js ui: Common.js and thirteen more files off Semantic 2026-08-05 18:34:50 -06:00
Tags.cy.js Video downloads have many more options. Downloads are migrated. 2024-11-28 09:48:57 -07:00
Tags.js ui: only the top modal answers Escape, and the audited widths 2026-08-05 18:38:07 -06:00
Tags.test.js ui: tags look like tags, and stay readable in every theme 2026-08-05 18:37:13 -06:00
test-fixtures.js test: check declared types, not just field names, and fix the three that were wrong 2026-08-05 18:37:01 -06:00
test-fixtures.test.js test: one place for fixtures, real providers instead of mocked context modules 2026-08-05 18:36:48 -06:00
test-utils.js test: the theme drives the colour scheme, and mockModule takes the module 2026-08-05 18:36:53 -06:00
test-utils.test.js test: the theme drives the colour scheme, and mockModule takes the module 2026-08-05 18:36:53 -06:00