plans: web/ names every connector three times, and 240 models print 'Connector unknown' #2194

Merged
jaylouisw merged 1 commit from plan/1119-1837 into main 2026-11-19 18:53:40 +00:00
Owner

Plan only - no code, no engine/test/workflow edits in this PR.

docs/plans/web-connector-vocabulary.md, measured on fac38e6f:

  • The engine knows 28 cages and gives each a { name, family, label } (engine/media.js:339-405, exported at :1562). The browser knows a subset, three times over: CAGE_INFO (22 entries, web/faceplate.js:46-79), names (18, web/canvas.js:33-55), known (18, web/app.js:1953-1962). Only usb is spelt identically in all four places.
  • Ten cages are missing from canvas and app (qsfp56, sfp56, xfp, the four fc-*, cfp2, serial, wwan); faceplate is missing nine (it knows serial) and carries two dead keys (rj11, aliased to dsl at engine/media.js:410; mpo, which is a medium connector, never a cage).
  • On the panel that is 240 models and 649 ports drawn under the heading Connector unknown: wwan 279, fc-sfp28 144, fc-sfpdd 80, fc-sfp 72, cfp2 54, fc-qsfp28 8, sfp56 8, qsfp56 2, xfp 2. An Advantech ICR-3231 reads 2× RJ45 · 2× Console · 1× Connector unknown.
  • familyOf() sends any cage it does not know to other (web/faceplate.js:144-151), and FAMILY_ORDER puts other last (:76), so a Brocade G720's 32G FC ports are drawn after the console.
  • The guard says otherwise and cannot fail: test/faceplate-names-every-connector.test.js:146 fails on g.cage === 'unknown', but plan() keys groups by the resolved cage (web/faceplate.js:313-323), so an unnameable fc-sfp group is {cage:'fc-sfp', label:'Connector unknown'} and never matches; :137 also limits the check to serial/console ports.
  • derivePortHardware() already computes cageName (engine/media.js:1066), but Device.serialize() drops it, which is why the copies exist. docs/CONNECTORS.md:814 currently instructs maintainers to update both copies by hand.

Seven ordered steps, each one PR and one worker: one shared web table with a test against CAGES, then faceplate, canvas and inspector adopt it, then the guard is widened to every port, then (needs Jay) cageName in the serialized payload, then the docs. Sizes S except step 6 (M).

Closes no open issue - the queue is #2193, #2192, #2191, #2190, #2150, #130 and #1980, none about the browser. Step 6 needs Jay's approval before anyone acts on it.

Plan only - no code, no engine/test/workflow edits in this PR. `docs/plans/web-connector-vocabulary.md`, measured on `fac38e6f`: - The engine knows **28** cages and gives each a `{ name, family, label }` (`engine/media.js:339-405`, exported at `:1562`). The browser knows a subset, **three times over**: `CAGE_INFO` (22 entries, `web/faceplate.js:46-79`), `names` (18, `web/canvas.js:33-55`), `known` (18, `web/app.js:1953-1962`). Only `usb` is spelt identically in all four places. - Ten cages are missing from canvas **and** app (`qsfp56`, `sfp56`, `xfp`, the four `fc-*`, `cfp2`, `serial`, `wwan`); faceplate is missing nine (it knows `serial`) and carries two dead keys (`rj11`, aliased to `dsl` at `engine/media.js:410`; `mpo`, which is a medium connector, never a cage). - On the panel that is **240 models and 649 ports** drawn under the heading `Connector unknown`: `wwan` 279, `fc-sfp28` 144, `fc-sfpdd` 80, `fc-sfp` 72, `cfp2` 54, `fc-qsfp28` 8, `sfp56` 8, `qsfp56` 2, `xfp` 2. An Advantech ICR-3231 reads `2× RJ45 · 2× Console · 1× Connector unknown`. - `familyOf()` sends any cage it does not know to `other` (`web/faceplate.js:144-151`), and `FAMILY_ORDER` puts `other` last (`:76`), so a Brocade G720's 32G FC ports are drawn after the console. - The guard says otherwise and cannot fail: `test/faceplate-names-every-connector.test.js:146` fails on `g.cage === 'unknown'`, but `plan()` keys groups by the *resolved* cage (`web/faceplate.js:313-323`), so an unnameable `fc-sfp` group is `{cage:'fc-sfp', label:'Connector unknown'}` and never matches; `:137` also limits the check to `serial`/`console` ports. - `derivePortHardware()` already computes `cageName` (`engine/media.js:1066`), but `Device.serialize()` drops it, which is why the copies exist. `docs/CONNECTORS.md:814` currently instructs maintainers to update both copies by hand. Seven ordered steps, each one PR and one worker: one shared web table with a test against `CAGES`, then faceplate, canvas and inspector adopt it, then the guard is widened to every port, then (needs Jay) `cageName` in the serialized payload, then the docs. Sizes S except step 6 (M). Closes no open issue - the queue is #2193, #2192, #2191, #2190, #2150, #130 and #1980, none about the browser. Step 6 needs Jay's approval before anyone acts on it.
plans: web/ names every connector three times, and 240 models print 'Connector unknown'
All checks were successful
CI / Classify the change (pull_request) Successful in 11s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 9s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Test (Node 22) (pull_request) Successful in 55s
CI / Server smoke test (pull_request) Successful in 9s
CI / Docker build (pull_request) Successful in 18s
CI / Arm auto-merge (pull_request) Successful in 4s
a3fd79fc67
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 18:43:36 +00:00
jaylouisw deleted branch plan/1119-1837 2026-11-19 18:53:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2194
No description provided.