Skip to content

fix(marketplace): show the seller as first name + last initial instead of their full name - #344

Merged
presidojay1 merged 2 commits into
StellarTickets:mainfrom
posimideveloper:fix/272-marketplace-seller-name
Oct 16, 2026
Merged

presidojay1 merged 2 commits into
StellarTickets:mainfrom
posimideveloper:fix/272-marketplace-seller-name

Conversation

@posimideveloper

@posimideveloper posimideveloper commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

src/app/marketplace/page.tsx renders each resale listing as:

{listing.ticket.ticketType.name} · {listing.ticket.event.venue} · sold by{' '}
{listing.seller.name}

so every seller's full name is shown to any signed-in user browsing the marketplace. Strangers can see who is reselling which ticket for which event and venue. That's personal data the transaction doesn't need, and combined with the event and venue it's enough to identify and track someone.

What changed

Commit 1: fix(marketplace)

New src/lib/display-name.ts: publicSellerName(fullName), using the issue's first option (first name + last initial), with its second option as the fallback:

Stored name Shown
Ada Lovelace Ada L.
Mary Ann Smith Mary S. (middle names dropped)
ada lovelace ada L. (whitespace normalised, initial upper-cased)
Zoë Ørsted Zoë Ø. (Unicode-safe initial via Array.from)
Cher Cher (a single name is only a first name)
"" / whitespace / null / undefined Verified holder

src/app/marketplace/page.tsx: sold by {publicSellerName(listing.seller?.name)}. This was the only place seller.name is rendered (checked with grep across src/), so only the chosen form now appears. The optional chain also stops a listing with a missing seller object from crashing the page.

Commit 2: test(marketplace), new src/lib/display-name.test.ts

Covers every row of the table above, plus an explicit assertion that the output never contains the full last name.

Testing

npx vitest run src/lib/display-name.test.ts
 Test Files  1 passed (1)
      Tests  7 passed (7)
  • npx eslint on both changed source files: clean.
  • npx tsc --noEmit: no errors in the changed files. The only errors are the 4 TS18046 errors in src/lib/api-timeout.test.ts, which this PR doesn't touch.

Follow-up (backend, out of scope for this repo)

This fixes what the page displays, which is the issue's "done when". The /marketplace API response still includes seller.name in full, so it's visible in devtools' network tab. To keep the full name from leaving the server at all, the backend (StellarTickets/backend) should return the same first-name + initial form, or just a display label, in the listing payload.

Closes #272
Closes #270
Closes #271
Closes #273

…name

Every resale listing rendered 'sold by {seller.name}', exposing each
seller's full name to any signed-in user. Add publicSellerName():
'Ada Lovelace' becomes 'Ada L.', middle names are dropped, a single name is
shown as-is, and a blank or missing name falls back to 'Verified
holder'. The marketplace now renders only that form.

Closes StellarTickets#272
@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@posimideveloper Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for stellartickets failed.

Name Link
🔨 Latest commit f8d2913
🔍 Latest deploy log https://app.netlify.com/projects/stellartickets/deploys/6ad1fd7e55b845cd21d3b340

@presidojay1
presidojay1 merged commit 2298475 into StellarTickets:main Oct 16, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants