Skip to content

Pin HDMI inputs to Home and name them by device type - #43

Open
nathantsmith wants to merge 2 commits into
nthnclrk:mainfrom
nathantsmith:worktree-home-inputs
Open

nathantsmith wants to merge 2 commits into
nthnclrk:mainfrom
nathantsmith:worktree-home-inputs

Conversation

@nathantsmith

@nathantsmith nathantsmith commented Nov 13, 2026 •

Copy link
Copy Markdown

What this does

Lets HDMI inputs be used from Home, and gives them recognisable names and icons.

Inputs on Home. Opening the Home editor also reads the TV's HDMI source records. Each reported port appears once under a new Inputs section in Not on Home and can be added, removed, reordered and undone like an app. OK on a Home input uses the existing bounded FrameDevice.setSource path, so it rediscovers sources, requests that exact port and then opens Samsung's viewer, with the same truthful errors. A pinned input is saved in appRecords as hdmi-N with its port number, so it stays on Home after a restart before discovery runs again. Input IDs contain no dot, so they never fall back to a native app ID, and an hdmi-N Home entry without its saved record is dropped rather than invented. Discovery runs only from the visible editor, never at hidden startup; a missing API or failure lists no inputs.

Device types. The TV reports only each port's type and number (CEC and Source-menu names are not available to the app), so inputs appeared as HDMI 1, 2, 3. Each row in Settings → Samsung → Inputs now has a Device button (Right from the input). It opens a radio list for that port: HDMI (default), Apple TV, PlayStation, Xbox, Nintendo Switch, Games console, Cable box, Blu-ray player, Computer, Streaming stick, Soundbar. OK applies and saves immediately; a storage failure keeps the previous type with Try again. The type sets the name and icon in Inputs, the Home editor and Home. Types are saved by port in a new devices preference (e.g. {"1": "playstation"}); HDMI removes the entry, and unknown saved types or ports are dropped.

The Inputs page now uses one row per port with its Device button beside it, so the list fits within the stage.

Icons. Eight original outlines (device-hdmi, -console, -handheld, -settop, -disc, -computer, -stick, -soundbar) on the utility 24-unit grid with the same 1.6 round stroke. The PlayStation mark is from Simple Icons (CC0, pinned commit recorded in ADDITIONAL-SOURCES.json). Simple Icons no longer publishes Xbox or Nintendo marks, so those types use the generic controller and handheld outlines. metrics.js was regenerated; existing entries are unchanged.

Preference model

This adds a devices field and an input field on appRecords entries. Older builds ignore devices and would treat an hdmi-N record as an app ID that fails to launch with an error. Happy to open an issue first if you'd prefer to discuss the model change.

Checks run

  • npm run check: ES5 lint, widget checks, 10 device tests pass
  • npm run check:tools: 15 tests pass
  • CLEANFRAME_PUBLIC_FONTS=1 npm run check:browser: 441 checks, 0 failures, no page errors. New coverage: editor listing, section heading, pinning and stored record, reload persistence, Home launch selecting the exact port before viewer handoff, missing-port error, unavailable API, no invented inputs, device picker contents and fit, Right reaching Device, save by port, name/icon in Inputs/editor/Home after reload, failed save with retry, reset to HDMI, invalid saved labels. The existing HDMI chooser test now counts switch buttons only.
  • npm run check:public: passed
  • Reviewed public-font screenshots of the editor Inputs section, the Inputs page (List 1280, Dock 1920) and the device picker; they are produced by check:browser under .local/qa/ (editor-inputs.png, inputs-named.png, input-device-picker.png).

Tested on a TV

Tested on a 2024 The Frame (LS03D, Tizen 9.0), installed as an independent build signed with an SDK-generated identity and a Public-level certificate. The installed build contained these commits plus an unrelated personal wallpaper; the inputs code was identical.

  • Inputs: the TV's HDMI ports were listed, and switching between various inputs worked. This confirms a Public-certificate build can read VIDEOSOURCE and switch sources on this model.
  • Input customisation: choosing device types from the Device button worked, with the chosen names and icons applied.
1-home-dock-inputs 2-home-list-inputs 3-inputs 4-inputs-device-button 5-device-picker 6-home-editor-inputs

nathantsmith and others added 2 commits November 12, 2026 12:13
The Home editor now reads the TV's reported HDMI ports and lists each
one under a new Inputs section in Not on Home. A pinned input is saved
as hdmi-N with its port in appRecords, so it survives a restart before
discovery runs again. Opening it uses the existing bounded setSource
path and viewer handoff, with the same truthful errors.

Discovery runs only from the visible editor, never at hidden startup,
and a missing API or failure lists no inputs. Input IDs contain no dot,
so they cannot fall back to a native app ID, and an hdmi-N Home entry
without its saved record is dropped rather than invented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMDnnMF9Nkx6MeRaQGVGEW
The TV reports only each port's type and number, so inputs appeared as
HDMI 1, 2 and 3. Each input row in Settings > Samsung > Inputs now has
a Device button that opens a device type list for that port. The type
sets the input's name and icon in Inputs, the Home editor and Home, and
is saved by port in a new devices preference whether or not the input
is pinned. Choosing HDMI clears it; unknown saved types are dropped, and
a failed save keeps the previous type with a retry.

Eight original outlines (HDMI plug, controller, handheld, cable box,
disc, laptop, streaming stick, soundbar) share the utility icons' grid
and stroke. The PlayStation mark comes from Simple Icons (CC0, pinned).
Simple Icons no longer publishes Xbox or Nintendo marks, so those types
use the generic outlines. Icon metrics were remeasured; existing values
are unchanged.

The Inputs page now uses one row per port with its Device button
beside it, so four ports fit within the stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMDnnMF9Nkx6MeRaQGVGEW
@nathantsmith
nathantsmith marked this pull request as ready for review November 21, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant