M9-S4a: seller registration + my-listings dashboard#107
Merged
Conversation
Wire the seller SPA's two foundational surfaces: one-click seller registration (narrative 004 Moment 1) and the My Listings dashboard consuming GET /api/selling/listings?sellerId=. Registration: SessionContext extended with isRegisteredSeller state, persisted to sessionStorage; registerAsSeller mutation sends the participantId in the body (live smoke caught the [WriteAggregate] identity-binding bug with an empty body — same class as M8-S2). My Listings: Zod schema for SellerListingSummary, TanStack Query hook, card-grid page with seller-specific status badge variants, empty/error states, loading skeleton. Routing extended with /listings route. S4 split into S4a (this: read + register) and S4b (next: create-draft form, edit-draft, submit) per handoff guidance — the 10-field form with react-hook-form warrants its own slice. Frontend only — zero .cs files touched. Seller tests: 2 → 20 (+18). Bidder 25 and ops 47 unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RegisterAsSellerfrom the session, extendingSessionContextwithisRegisteredSellerstate persisted tosessionStorage. Handles 200 (success) and 409 (already registered) as equivalent success paths.GET /api/selling/listings?sellerId=, rendering a card grid with seller-lifecycle status badges (Draft/Submitted/Published/Rejected/Withdrawn), empty/error/loading states.react-hook-formwarrants its own slice.participantId— empty body{}yieldsGuid.Emptybefore the route{id}fallback activates in Wolverine's[WriteAggregate]identity resolution (same class as M8-S2's empty-body 400).Test plan
npm run build -w @critterbids/seller— TypeScript strict, Vite build cleannpm run test -w @critterbids/seller— 20 tests pass (schema, listings page, session context, SignalR)npm run test -w @critterbids/bidder -w @critterbids/ops— 25 + 47 tests unchanged