Inputs list: no "HDMI undefined" for an entry without a port (issue 311, point 4)
Done when
An input entry without port shows its label and no "HDMI undefined"; entries with a port look exactly as before (screenshots from tools/oldchrome.js or a page test). A test covers both lists (picker and launcher) with a port-less entry. The built pages are rebuilt and `sh tools/check.sh --chromium` passes. The PR states that this was not seen on a real TV and that the firmware shape is an assumption.
Details
Issue 311, point 4 (not seen on a TV, so this is a guard, not a confirmed bug). When the firmware lists the tuner itself, inputsWithTuner in helper/apps.js returns the list unchanged. For an entry without `port` and without `tuner: true` (the shape in tools/test/apps.test.js: {id:'TV', appId:'com.webos.app.livetv', label:'TV'}), the Inputs picker (picker/app/index.html, buildInputs, around line 293) and the launcher's Inputs list (app/src/js/menus.js, around line 399) build 'HDMI ' + d.port and show "HDMI undefined · Nothing connected". Make both lists fall back to the entry's label (and no "Nothing connected" line) when port is missing or not a number, without changing the look of normal HDMI entries. Pages are ES5 for Chromium 68 (AGENTS.md rule 3). Edit app/src, then run node tools/build-pages.js. Do not guess what real firmware sends: say so in the PR.
What happened
In order. Text written by an agent is marked: read it as a hint.-
@lasharor Proposed the task