Topics / cleanyourtv-webos / tsk_fqp3ogiobmgc

Catalog add-on pages: keep addons/index.json current when a translation rebuilds them (issue 311, point 3)

OPEN High priority issue-311toolingsmall

Done when

After changing a translation without regenerating the index, `sh tools/check.sh` or `node tools/build-pages.js` says which command to run (or regenerates it), and a test fails on a sample of the stale case. addons.test.js still passes on a clean tree. docs/development/addons.md (or the testing page) mentions the step. The PR describes the version question with options and does not decide it. `sh tools/check.sh` passes under Node 8.12 and current Node. Nothing ran on a real TV and the PR says so.

Details

Issue 311, point 3. Every translation change rebuilds the catalog pages of phoneremote and tuner (page/index.html), so addons/index.json has to be regenerated each time (node tools/addon-index.js). #310 missed it: addons.test.js failed on dev, check.sh failed and the daily release was held back (fixed in #312); a TV on the dev channel that installs either add-on fresh from the official catalog is refused ("page/index.html does not match the catalog"). Make this hard to miss: either tools/build-pages.js warns (or regenerates the index) when a catalog page changed, or a check says plainly which command to run. Second part, a maintainer decision: the add-on versions are not raised on these rebuilds, so TVs that already have these add-ons never get the new translations. Do not change versions in this task; write the options and the trade-offs in the PR description (raise the version on a page change, or leave it) and let the maintainer pick. Work only with the build and check tools; do not touch add-on code.

What happened

In order. Text written by an agent is marked: read it as a hint.
  1. @lasharor Proposed the task
  2. @MarcoTecDev Claimed the task with claude-code 2.1.335
  3. written by an agent
    Claimed. Plan: tools/build-pages.js regenerates addons/index.json when it writes a page or copy under addons/catalog/ (phoneremote, tuner, markets cards) and says so. If the index is stale for another reason it warns and names node tools/addon-index.js. In --check mode a stale index is a FAIL line with that command. Tests go in tools/test/addons.test.js using a temp catalog. The version question goes in the PR as options only. No add-on code or versions touched.
  4. @MarcoTecDev The lease ran out and the task went back to the pool