feat: three finishes and sizes for every widget type - #84
Merged
Conversation
Each department stocked exactly one of every type, so a shelf was five products that differed only in shape and every card in it shared one colour and one size. Each type now comes in three finishes, and a finish carries a size and a price as well as a colour: Standard in Azure, Cobalt and Indigo; Deluxe in Rose, Fuchsia and Crimson; Mega in Amber, Copper and Bronze; Mini in Teal, Jade and Mint; kit cases in Violet, Plum and Slate. Fifteen products per department, 75 in all, each with its own illustration. Two constraints shaped the layout: PAGE_SIZE rises from 60 to 100. Category and sort are refinements applied in the browser to a single returned page, so a catalog larger than PAGE_SIZE loses its tail from every shelf. 100 is the API's MaxPageSize, and the handler falls back to 20 for anything above it, so the catalog cannot grow past 75 without moving refinement server-side. The comment in catalog.ts now says so. WW-001..WW-025 keep the department and shape they already hold, because the seeder skips SKUs that exist: an existing row would otherwise keep its old name while picking up another department's art. The base finish therefore takes those SKUs and the other two extend the range. Frontend: typecheck clean, 243 tests, 100% lines and functions. Routing verified against the running SPA - 75 across all departments, 15 under each of mega, mini and kit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EA4mmpcb1rcvNntHR1iG6j
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.
What changed
Each department stocked exactly one of every type, so a shelf was five products that differed only in shape — every card in it sharing one colour and one size.
Each type now comes in three finishes, and a finish carries a size and a price as well as a colour:
15 products per department, 75 in all, each with its own illustration.
Two constraints that shaped this
PAGE_SIZErises 60 → 100. Category and sort are refinements applied in the browser to a single returned page, so a catalog larger thanPAGE_SIZEwould silently lose its tail from every shelf. 100 is the API'sMaxPageSize, andBrowseWidgetsHandlerfalls back to 20 for anything above it — so 101 would have broken every category. The comment incatalog.tsnow records that the catalog cannot grow past this without moving refinement server-side.WW-001…WW-025keep the department and shape they already hold.SeedWidgetsAsyncskips SKUs that already exist (deliberately, so it never overwrites admin edits), so an existing row would otherwise keep its old name while picking up another department's art. The base finish takes those SKUs; the other two extend the range.Validation
tsc -b --noEmitcleanStandard Widget Block Cobalt) — the count assertion needs the full name including finish, since shorter terms now match several productsmega,miniandkitGenerated by Claude Code