Files
evig/scripts
Mao NakamotoandClaude Opus 4.8 ef4d3c6472 feat(profiles): SSOT slice 2a — seller reads+writes via user_profiles
Public seller identity (display_name/bio/avatar/is_verified) now resolves
from user_profiles everywhere, and the seller's own editor writes there —
so the duplicated seller_profiles columns have no live reader/writer left
(dropped in slice 3). Reads and the /me write ship together, so there is no
window where the public sees a stale name.

- sellerProfileCoreFields: identity fields sourced from userProfiles; every
  caller now leftJoins user_profiles (sellers/[id], sellers/me GET).
- /api/sellers/me PATCH: upserts identity into user_profiles, writes
  city/canton to seller_profiles, re-selects the joined row for the response
  (can't RETURNING across two tables).
- listings GET / [id] / favorites, checkout-listing, sellers/[id] layout:
  join user_profiles for display_name/bio/avatar/is_verified; city/rating
  stay on seller_profiles (storefront facts).
- members/[id]: is_verified + name/avatar from user_profiles SSOT.
- tests updated for the new join/write shapes (55 green).

City/canton intentionally untouched (service base / storefront ≠ identity).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 10:16:20 +02:00
..