Problem Solving & Design C
The app is cleanly decomposed into model, store, view and controller layers, each with a clear single responsibility and well-named exports.
- +Pure model functions like moveSwatch and withoutSwatch return new arrays without mutating state, making the data flow predictable and easy to test.
- +The delete flow uses a confirmation dialog that restores focus to the triggering button after dismissal, a thoughtful interaction detail.
- +The store module accepts an optional Storage argument, making it straightforwardly testable without mocking globals.
Completeness B+
All seven brief features are fully implemented, including the 8-swatch cap, deletion, reordering, the summary strip, and localStorage persistence.
- +The 8-swatch cap is enforced in two places — model validation and a guard in addSwatch — so the limit cannot be bypassed.
- +The summary strip renders every current swatch as a proportional colour block with an accessible label, fulfilling the read-only palette strip requirement.
- +localStorage round-trips are validated against the full swatch schema on load, so corrupt or tampered data is discarded safely rather than crashing the app.
- -When a storage save fails, the system message is shown but the form feedback area and toast are silent about the persistence failure — the user sees the swatch appear in the list without knowing it was not saved.
Technical Craft B
The codebase uses JSDoc type annotations, automated tests for model and store, responsive breakpoints, a CSS custom-property design system, and thorough ARIA markup.
- +CSS custom properties define the entire colour palette in one place, giving the design system a single source of truth for every colour token.
- +Automated tests cover model validation, collection integrity, reordering edge cases, and storage round-trips including SecurityError and corrupt-data paths.
- +The keyboard focus indicator is applied via focus-visible with a visible outline and offset, so keyboard users get a clear indicator without affecting mouse users.
- -JSDoc annotations are used for return types and parameters in model and store, but the Swatch typedef and result types are not enforced by a type checker — there is no tsconfig or checkJs setup, so the annotations are documentation only.
- -The responsive grid collapses to a single column at 850 px but the swatch action buttons (Move Up, Move Down, Delete) reflow to a full-width row only at that breakpoint, which can feel cramped on mid-range tablet widths between 520 px and…