Skip to content

Conversation

erikhfj
Copy link
Member

@erikhfj erikhfj commented Nov 20, 2026

Closes #100

What was done

  • Removed User.id from schema.graphql and the AlbumDetail GraphQL query (client/src/api/albumDetail.ts), and regenerated client types (pnpm codegen) so internal simulated user UUIDs are never exposed by the GraphQL API.
  • Replaced Listener <uuid-prefix> in server/src/userIdentity.ts with deterministic SHA-256 music-themed pseudonyms (e.g. Velvet Groove) so the same simulated user always gets a consistent, readable label without revealing any characters of their UUID.
  • Added publicDisplayName() and updated Review.user in server/src/resolvers.ts to omit id and replace legacy Listener <8-hex> labels at read time while preserving custom display names.
  • Added User: { merge: true } to Apollo InMemoryCache type policies in client/src/api/client.ts so embedded User objects without id merge cleanly.
  • Updated docs/architecture.md (decision 5), docs/AI-USAGE.md, and server/client tests (server/src/userIdentity.test.ts, server/src/reviews.test.ts, client/src/pages/AlbumDetailPage.test.tsx).

What was tested

  • pnpm codegen && pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build — all passed.
    • Added GraphQL schema validation test asserting User.id is rejected, resolver test confirming Review.user omits id and upgrades legacy UUID-prefix labels, and pseudonym determinism/privacy unit tests.
    • Largest client JS chunk: 385.46 kB (under 512 kB budget).

@erikhfj erikhfj requested a review from a team as a code owner November 20, 2026 20:11
Copy link
Member

@robertky robertky left a comment

Choose a reason for hiding this comment

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

Approved. This addresses #100 cleanly: User.id is removed from the public GraphQL schema and query, generated client types are updated, and review authors receive stable pseudonyms without exposing UUID characters. The read-time handling also upgrades existing legacy labels, with schema, resolver and identity tests covering the privacy behavior. Both CI test jobs pass.

@robertky robertky merged commit 21accbd into main Nov 20, 2026
3 checks passed
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid exposing user identity IDs in reviews and improve author display
2 participants