Skip to content

feat(inventory): open the 3d embed to sticker, patch, charm, and agent items - #414

Open
ykns3 wants to merge 7 commits into
masterfrom
feat/expand-3d-embed-item-types
Open

feat(inventory): open the 3d embed to sticker, patch, charm, and agent items#414
ykns3 wants to merge 7 commits into
masterfrom
feat/expand-3d-embed-item-types

Conversation

@ykns3

@ykns3ykns3 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Opens the SkinCraft 3D button on inventory pages to stickers, patches, charms and agents
    alongside weapons/gloves. The embed protocol is inspect-based, so this is extension-side
    gating only — the item kind rides inside the masked inspect hex.
  • Reads the masked hex from both layouts Steam ships: asset property 6 with a %propid:6%
    slot in the action link, or the hex embedded in the link itself. Accepts the inventory
    steam://run/730// and market steam://rungame/730/<id>/ forms. The launch link is rebuilt
    around the hex the viewer renders, so the two can't describe different items.
  • Adds an inspect-requested embed event: the sandboxed iframe can't launch steam://, so it
    forwards the click and the extension launches the item on screen. No URL crosses the bridge —
    SkinCraftItem.inspectUrl is pattern-pinned at the page → content-script boundary and
    re-checked before navigation.

isAbstractType no longer dereferences asset.type unconditionally. This is shared code:
isCharm, isAgent, isSticker, isPatch, isCase, isMusicKit and isPin now match on
the tag branch where a description without type previously threw.

Merge order: the SkinCraft embed change must deploy first, or the new 3D tabs fail to load.

Validation

  • npm test
  • npm run lint
  • npm run checkformat
  • npm run build

Note

Medium Risk
Touches postMessage boundaries, window.location navigation to steam://, and shared item-type helpers; embed must deploy first or new tabs may fail to load.

Overview
Extends the SkinCraft 3D inventory viewer to stickers, patches, charms, and agents (not only weapons/gloves), with inspect hex read from asset property 6 and/or Steam’s masked Inspect in Game actions (%propid:6% or inline hex). Items now carry an optional inspectUrl (steam://…) rebuilt from the rendered hex and validated at the viewer protocol boundary.

Adds embed protocol event inspect-requested: the sandboxed iframe signals inspect clicks and the extension opens the pinned steam:// link for the currently loaded item (only after loaded, with STEAM_INSPECT_URL_PATTERN).

isAbstractType no longer assumes asset.type is always present (tag-based matching for half-hydrated Steam descriptions). Dev skincraft_embed_origin points at https://beta.skincraft.gg instead of localhost.

Reviewed by Cursor Bugbot for commit f4d2893. Bugbot is set up for automated code reviews on this repo. Configure here.

…t items
The weapons/gloves scope was extension-side gating only — the item kind rides
inside the masked inspect hex. Adds an inspect-requested embed event: the
sandboxed iframe can't launch steam:// itself, so it forwards the Inspect click
and we launch the item's own action link, pattern-pinned end to end.
Steam ships the hex two ways: skins carry it as asset property 6 with a
%propid:6% slot in the action link, but stickers embed it literally in the
link with no property at all. Inventory links also use steam://run/730//
rather than the market rungame form — accept both.
…rowing
isAbstractType dereferenced asset.type unconditionally, but Steam ships
descriptions without it despite the declared non-optional shape. Guarding the
type branch keeps the tag branch reachable, so a tag-identified item is matched
rather than lost, and the latent TypeError is gone for every predicate built on
it -- isCharm, isAgent, isSticker, isPatch, isCase, isMusicKit and isPin.
getSkinCraftInspect preferred asset property 6 while getSteamInspectUrl
preferred the hex embedded in the action link, so an asset carrying both could
render one item and launch Steam into another. Splitting the action at the hex
slot and rebuilding the link around the resolved hex makes that unrepresentable,
and folds the two helpers into one traversal.
Also anchors the action pattern to the steam scheme so a lookalike link can no
longer shadow the real inspect action, and compares the property slot
case-insensitively to match the pattern that captured it.
… on screen
Selecting a strip item reassigns activeTarget synchronously but deliberately
keeps the previous model on screen while the next one loads, so an Inspect click
landing in that window launched the wrong item. Gating on the loaded phase turns
that into a no-op, and a warn gives the dropped-click case an evidence trail.
@ykns3
ykns3 marked this pull request as ready for review August 17, 2026 20:13
@ykns3
ykns3 requested review from GODrums and Step7750August 17, 2026 20:13
Sign up for freeto 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.

2 participants

@ykns3@Step7750