Skip to content

fix(opensea): title collections by their collection name, not the page title - #16

Merged
moskovich merged 1 commit into
mainfrom
fix/opensea-collection-title
Jul 28, 2026
Merged

fix(opensea): title collections by their collection name, not the page title#16
moskovich merged 1 commit into
mainfrom
fix/opensea-collection-title

Conversation

@moskovich

Copy link
Copy Markdown
Contributor

Fixes #15.

Resolving https://opensea.io/collection/pxl-net titled the playlist PXL NET 0.1904 ETH - Collection — the page <title> minus the | OpenSea suffix, floor price included, stale the moment it was stored. Product decision from the FF side: collection imports always use the collection name, never the webpage name.

Approach

No site implemented extractTitleFromHtml, so the generic <title> path always won (bestFetchedTitlefetchedHtmlTitle). Rather than reordering the generic chain — which would regress pages whose <title> is the clean collection name (the existing Chromie Squiggle test) — this gives the OpenSea adapter a collection-page extractTitleFromHtml:

  1. Embedded name first. The collection's real name rides the same embedded JSON the keyless item extraction already scans; the collection object carries "name" adjacent to a "slug" known from the parsed URL. The extractor takes the name nearest the slug marker, window-bounded so a payment-token or item name elsewhere in the payload can't be misread.
  2. Scrubbed <title> fallback. Price + - Collection furniture stripped.
  3. Null otherwise — a furniture-free <title> keeps today's behavior exactly.

Verification

  • npm test: 177 pass, 0 fail — including the pre-existing 'uses fetched page title instead of slug fallback' test, deliberately untouched
  • two new resolver-level tests: embedded name beats the priced <title>; furniture scrub works when no embedded name exists
  • run against the live pxl-net page (2.9 MB fetch): extracts "PXL NET"

Deploy note

ff-source-resolver-service consumes this via @feralfile/source-resolver, so the app-visible fix needs an npm release + a version bump in the service. Re-adding a collection in the FF app after that deploy overwrites the stored bad title (imports replace the playlist).

…e title

An OpenSea collection page's <title> embeds the floor price and page
furniture -- "PXL NET 0.1904 ETH - Collection | OpenSea" -- and the
generic title chain persisted it (minus the "| OpenSea" suffix) as the
playlist title, freezing a price that is stale the moment it is stored.
No adapter implemented extractTitleFromHtml, so the raw <title> always
outranked the humanized-slug fallback that already produced a usable
name.

Give the OpenSea adapter an extractTitleFromHtml for collection pages.
The collection's real name rides the same embedded JSON payloads the
keyless item extraction already scans; the collection object carries
"name" adjacent to a "slug" that is known from the parsed URL, so the
extractor takes the name nearest that slug marker (window-bounded, so a
payment-token or item name elsewhere in the payload is never read as
the collection's). When no embedded name is present it falls back to
the <title> scrubbed of the price/"- Collection" furniture, and returns
null when there is no furniture -- pages whose <title> is already just
the collection name keep their existing behavior unchanged.

Verified against the live pxl-net page: extracts "PXL NET".

Fixes #15.
@moskovich
moskovich merged commit ec0819f into main Jul 28, 2026
2 checks passed
@moskovich
moskovich deleted the fix/opensea-collection-title branch July 28, 2026 08:17
moskovich added a commit that referenced this pull request Jul 28, 2026
OpenSea collections titled by their collection name, never the page
title (#16, fixes #15).
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.

Collection imports take the marketplace page <title> instead of the collection name

1 participant