Public profile: an Account's username, join date and decided Games, listed for anyone #366
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amaurycoudr/chess-project#366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
An Account gives a Player a username, but nobody else can see what it stands for. A Player who just lost to "alice" cannot look her up, see when she joined, or browse the Games she played. A Player who wants to show their record to a friend can only share Games one link at a time. Every stored Game is listed only to its owners (ADR 0034), so there is no public place where an Account's Games add up to an identity, the third motivation of the accounts map.
Solution
Every Account has a public profile page, addressed by its username. Anyone can open it, signed in or not: it shows the username, the month the Account joined, and the Account's decided Games, newest first. Each row shows when the Game ended, the Account's Color, the opponent (a username that links to their own profile, or "Guest"), the result from the Account's side and how it ended. A row opens the Game page. Older Games load on demand. A signed-in Player reaches their own profile from the site navigation, and the usernames on a Game page link to their profiles.
A Guest has no profile. A Game with no Account on either side appears on no profile and stays listed only to its owner. The profile shows nothing else about an Account: no email, no Sessions, no claimed Guests.
User Stories
Seams
apps/e2e), one new spec: a Player signs up and, seated against a Guest in a second browser context, plays a Game the Guest resigns. A third, signed-out context opens the profile by its URL and reads the username, the join month and one row with "won" by Resignation, then opens the row and reaches the Game page. Covers 1, 2, 3, 4.Implementation Decisions
Data. This spec owns no data and adds no table or column.
Contract. A new
profilerouter in the contracts, with one read,profile.get, on a GET route addressed by username.PROFILE_NOT_FOUNDrefusal, 404 in the refusal status table. A deleted Account is unknown.API. The games feature module implements the profile read beside "my games", since it already resolves owners to names. No new folder, so the API's layer order is unchanged (ADR 0026).
Front.
games/vertical, beside "My games", and renders the same game-row component, so a vertical never imports a sibling (ADR 0011)./players/$username. Its loader primes the profile query, and "show more" fetches the next pages through an infinite query from the vertical's query options factory.ADRs.
Testing Decisions
games/, with their harness and MSW handlers, for the views;seatedPairfrom the e2e room fixtures, for the new e2e spec.Out of Scope
Further Notes
implementon this spec.mentioned in issue #389
mentioned in issue #390
mentioned in issue #391
marked this issue as related to #389
marked this issue as related to #390
marked this issue as related to #391
mentioned in merge request !531