Closed bug report

pose defaults comp.id to a real unrelated MPN (SM02B-SRSS-TB) — confusing and unlinted

adonis · 1mo ago ·closed by Colby Knox

A real, unrelated MPN is the default subject

hero-studio pose <owner/slug> opens the studio already posed for the user's page — correct title, correct slug — but with comp.id defaulted to sm02b-srss-tb (a JST 2-pin wire-to-board connector).

Observed state immediately after pose adonis/nametag-blank-large-led:

{
  "page": "adonis/nametag-blank-large-led",
  "mode": "app",
  "comp": { "id": "sm02b-srss-tb", "imgSrc": "photo",
            "layout": "photo-right", "mpn": "under-title" }
}

Why this is worse than a neutral placeholder

SM02B-SRSS-TB is a real part with a real MPN, rendered in the exact slot where the user's own part number belongs (mpn: "under-title"). The user sees a hero for their board captioned with someone else's connector. The reaction is not "that is a placeholder", it is "why is my nametag board showing a JST connector?" — which is exactly what happened here, verbatim, from the user driving it.

It is also a silent default: nothing in the pose output says the subject is a stand-in. The SHOWCASE_IS_GENERIC reprimand fires on the showcase image, but there is no equivalent warning for comp.id still being the demo part, and state.lint was [] the whole time.

Asks

  1. Never default to a real MPN. If a placeholder is needed, make it visibly inert — YOUR-PART-HERE, an empty slot, or the page's own slug.
  2. Prefer the posed page. pose <owner/slug> already knows the page; default comp.id to that slug rather than to a demo fixture. (Setting it manually afterwards works fine — set '{"comp":{"id":"<slug>",…}}' — so the value is plumbed, it is just defaulted wrong.)
  3. Lint it. If comp.id is still the built-in demo part at Generate time, surface it the way SHOWCASE_IS_GENERIC does, instead of letting a hero go out stamped with an unrelated manufacturer's part number.

Related: #52 (the subject picker cannot read the local package on a first hero) — both come from the studio defaulting to fixtures instead of the package it was pointed at.

Environment

hero-studio 0.20.4, Linux container, --surface webview, pose adonis/nametag-blank-large-led --type component.

1 Reply

Colby Knox · 1mo ago

Shipped in hero-studio 0.20.5, all three asks. The default lived in the studio's own initial state (server.js), so this was hero-studio-level through and through.

(1+2) A posed session never carries the sample part: pose nulls comp.id outright (inert slot; the posed page's subject comes from the app composition + showcase, and with #52's fix, from your local package). The legacy component design lab keeps its built-in JST sample, but only by EXPLICIT re-seed when you enter the lab with no part chosen -- its photos are of that part, that is the lab's function -- so the real MPN can no longer ride silently into a page it has nothing to do with.

(3) Linted: a posed component composition still showing the sample part fires comp-demo-part, naming the JST connector and the fix, same family as SHOWCASE_IS_GENERIC. Rides state.lint and the compose-measured server-side lint from #51, so a driving AI sees it even without a responsive surface.

Rendering proven untouched: the parity suite runs 10/12 byte-identical against the pinned baseline (the two diffs are the known generated/latest.png fixture drift, unrelated). The run also caught and fixed a parity-harness gap: a previously-POSED instance leaked verify/tour gate chrome into every shot; the reset now clears both. Closing; thanks for pairing this with #52, the shared root (fixtures over the package the studio was pointed at) is what both fixes remove.

Log in to reply.