Skip to content

feat(market): open listings in the skincraft 3d viewer on the market beta - #415

Open
ykns3 wants to merge 17 commits into
masterfrom
feat/market-beta-3d-viewer
Open

feat(market): open listings in the skincraft 3d viewer on the market beta#415
ykns3 wants to merge 17 commits into
masterfrom
feat/market-beta-3d-viewer

Conversation

@ykns3

@ykns3 ykns3 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 3D launchers to the Market beta's listing cards and item dialog, opening listings in the embedded SkinCraft viewer. WebGPU availability only toggles enabled vs. disabled-with-guidance.
  • New details layout mirrors Steam's item dialog (wear bar, properties, accessories, restrictions, description) with Previous/Next, arrow keys, and a Buy hand-off to Steam's native purchase flow.
  • Prev/Next paginates via Steam's own infinite-scroll loader, so results follow the user's filters; the item snapshot only grows within a session.
  • Listing data comes off the React fiber props and is validated on both sides of the page ↔ content-script boundary; fields are clamped to shared bounds, and rejected messages are logged rather than silently dropped.
  • The Buy hand-off is confirmed end-to-end (buy-result): the viewer only closes when a native Buy button was clicked, and shows a notice otherwise. The price shown is the buyer total (unPrice + unFee) in Steam's own localized format.

Validation

  • npm test (68 passed)
  • npm run lint
  • npm run checkformat
  • npm run build
  • npx tsc --noEmit

Note

Medium Risk
Touches Market purchase hand-off (native Buy clicks) and cross-context postMessage, but payments stay on Steam; protocol validation and timeouts limit malformed or failed hand-offs.

Overview
Adds 3D launchers on the React Market beta—on each listing card and beside the item dialog’s inspect link—gated on WebGPU like inventory. Opening uses the embedded SkinCraft viewer with a new details layout (replacing the inventory grid strip): wear bar, props, accessories, restrictions, and description lines mapped from fiber listing data.

Navigation uses Previous/Next, arrow keys, and embed-forwarded keys while the dialog keeps focus; nearing the end triggers request-items so the page scrolls Steam’s grid and returns more targets. View hands off to Steam’s native Buy via view-listing / view-result; the modal closes only on success and shows a notice on failure.

Modal styles are split into modules; FLOAT_CONDITION_BANDS is shared with the float bar. skincraft_market_targets harvests listings from React fibers; viewer protocol validation expands for listing details and new message types. happy-dom supports new market-target tests.

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

ykns3 added 7 commits August 21, 2026 00:10
…beta

Adds a View in 3D launcher to every listing card in the market beta grid
and gives the viewer a listing-details panel (name, wear bar, pattern,
name tag, accessories, price with a native buy handoff, restrictions,
and description) with prev/next navigation that pages through listings
via steam's own infinite-scroll loader.
…evels

Replaces the sticker_info markup parsing with the listing's structured
asset_accessories, which carry each sticker/charm's own description and
slot properties — so rows now show Steam's per-accessory attribute line
(Sticker Scrape Level from propertyid 4, Charm Template from 3) with
icons served from the economy image CDN like every other item icon.
Replaces the modal header in the market layout with panel-native chrome
(skincraft attribution and close up top, paired previous/next pager in
the footer), gives accessory rows breathing room, and moves the card
launcher into the price row as a plain 3D button sized to Steam's own
Buy button.
Injects a View in 3D action beside each dialog pane's Inspect in Game
link (skipping accessory inspect links by matching the pane listing's
own hex), styled to the native button. Opening dismisses Steam's dialog
via its own Escape path first, and the shared launcher behaviour moves
into a common base for the card and dialog buttons.
@ykns3
ykns3 marked this pull request as ready for review August 24, 2026 18:43
@ykns3
ykns3 requested review from GODrums and Step7750 August 24, 2026 18:44
Comment thread src/lib/services/skincraft_embed.ts
Comment thread src/lib/services/skincraft_embed.ts

@GODrums GODrums left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few UX things I noticed:

  • it might be worth to have some sort of animation on previous/next to make the transition more obvious
  • while the dialog is open, we should block the scrolling in the background (e.g. when hovering over the backdrop)

Comment thread src/lib/components/common/skincraft_viewer_modal.ts Outdated
Comment thread src/lib/components/market/react/types.ts Outdated
Comment thread src/lib/components/common/skincraft_viewer_modal_styles.ts Outdated
Comment thread src/lib/services/skincraft_market_targets.ts Outdated
Comment thread src/lib/services/skincraft_market_targets.ts
Comment thread src/lib/components/common/skincraft_viewer_modal.ts Outdated
Comment thread src/lib/services/skincraft_market_targets.ts Outdated
Comment thread src/lib/components/common/skincraft_viewer_modal.ts
Comment thread src/lib/components/common/skincraft_viewer_modal.ts
@ykns3

ykns3 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

Both UX points from the review addressed in da313b6: prev/next now runs a continuous slide transition (old content out, new in from the direction of travel, clipped to the panel, scroll reset to top), and page scrolling is locked behind the backdrop while the dialog is open — yielding briefly to Steam's own pagination loader (455d4ad).

Comment thread src/lib/components/common/skincraft_viewer_modal.ts
Comment thread src/lib/components/common/skincraft_viewer_modal.ts Outdated
Comment thread src/lib/components/common/skincraft_viewer_modal.ts Outdated
Comment thread src/lib/components/market/react/view_3d.ts Outdated
view_3d.ts was the only file in the repo holding two custom elements; the shared base and each launcher now get their own file.
The details panel's action opens Steam's own purchase dialog and never runs a
purchase itself, so the chain above the click reads as viewing a listing:
onViewMarketListing through the embed service to view-listing/view-result. Only
the page-script helper that clicks Steam's native Buy button keeps buy in its
name.
…election

The prev/next ghost copies the scroll area's offsetHeight onto a content-box
element, so it rendered 32px into the footer and slid away over the nav
buttons. The nav and View buttons also no longer select their label on a
double-click.
@ykns3
ykns3 requested a review from GODrums September 2, 2026 05:45

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69e6c9e. Configure here.

Comment thread src/lib/services/skincraft_market_targets.ts
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.

3 participants