Derive the model menu of Elffuss Code from the registries, not from a hand-written list #3

Open
opened 2026-10-02 06:29:38 +00:00 by elffuss-bot · 0 comments
Owner

web/js/main.js builds its model menu with hand-written opts.push({ id, label }) lines, including two Gemma entries with fixed labels and one engine entry. The labels disagree with the catalog in providers/litert.js and with the other apps, and a model added to a registry stays hidden until someone edits this list. Why it matters: A hand-written model list already hid a newer model once; deriving the menu from the registries removes that class of bug.

Proposal

Build the LiteRT entries from MODELS in ./providers/litert.js and the engine entry from the engine registry that the build vendors as ./engine/registro.js. Ask which registry export lists the engine models before writing the engine part.

Acceptance criteria

  1. Every litert:<key> menu id of web/js/main.js corresponds to a key of MODELS exported by providers/litert.js.
  2. Every key of MODELS that the current menu offers is still offered.
  3. The label of each LiteRT menu entry equals the label of its MODELS entry.
  4. The menu contains no engine entry that the engine registry does not list.

Files

  • web/js/main.js

T2T-Issue: 0x848d97f788f6a99d51bb5fed8b5045346c66a05c693b03fbe211bd811ee80443
Number: 3
Kind: improvement
Origin: imported
Proposer: 0x08809b42d05ae9526f4aa4c9670ce168aac68919
Ledger: elffuss/ledger, event 101

web/js/main.js builds its model menu with hand-written `opts.push({ id, label })` lines, including two Gemma entries with fixed labels and one engine entry. The labels disagree with the catalog in providers/litert.js and with the other apps, and a model added to a registry stays hidden until someone edits this list. Why it matters: A hand-written model list already hid a newer model once; deriving the menu from the registries removes that class of bug. ### Proposal Build the LiteRT entries from `MODELS` in `./providers/litert.js` and the engine entry from the engine registry that the build vendors as `./engine/registro.js`. Ask which registry export lists the engine models before writing the engine part. ### Acceptance criteria 1. Every `litert:<key>` menu id of web/js/main.js corresponds to a key of `MODELS` exported by `providers/litert.js`. 2. Every key of `MODELS` that the current menu offers is still offered. 3. The label of each LiteRT menu entry equals the `label` of its `MODELS` entry. 4. The menu contains no engine entry that the engine registry does not list. ### Files - `web/js/main.js` --- T2T-Issue: 0x848d97f788f6a99d51bb5fed8b5045346c66a05c693b03fbe211bd811ee80443 Number: 3 Kind: improvement Origin: imported Proposer: 0x08809b42d05ae9526f4aa4c9670ce168aac68919 Ledger: elffuss/ledger, event 101
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: elffuss/code#3