feat: enforce per-item image count limits
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-11 00:39:27 -04:00
parent e6510c0317
commit f54223966c
7 changed files with 62 additions and 6 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ Support:
- delete
- add images later
Image count is configurable.
Image count is configurable per seller through `inventory.maxImagesPerItem` (default 10). The API enforces this limit atomically while locking the physical inventory item, so concurrent uploads cannot exceed the configured cap.
## Storage
+2 -1
View File
@@ -266,6 +266,7 @@ Remaining roadmap areas are approved external provider credentials/adapters, bro
- Storybook now installs a lightweight router mirroring the app's named routes plus a mobile-viewport-forcing test-runner hook, enabling isolated page stories (including the public catalog) that use `useRoute`/`useRouter` or narrow-viewport CSS breakpoints.
- The public catalog now has its own Storybook coverage, including an interaction test proving the mobile filter disclosure is keyboard-operable and correctly hides/reveals filter controls via `aria-expanded`. This review also found and fixed a real color-contrast failure in the catalog error-state text.
- `ListingDetailPage`, `ProductDetailPage`, and `AdminImagePage` now have Storybook coverage. Adding it surfaced and fixed a color-contrast bug shared by all three: the "Back to catalog" link, pagination controls, and the selected image-gallery thumbnail were using the non-text-safe `--color-interactive` token instead of `--color-interactive-text`.
- Per-item image limits are now enforced atomically for seller image creation and uploads, using `inventory.maxImagesPerItem` (default 10); concurrent inserts are serialized on the physical inventory item and return `IMAGE_COUNT_LIMIT_REACHED` at the configured cap.
## Local Commands
@@ -287,4 +288,4 @@ Then migrate it using its `TEST_DATABASE_URL` value as `DATABASE_URL`, and run i
## Suggested Resume Prompt
`Read docs/IMPLEMENTATION-STATUS.md and continue the next bounded milestone. Verify the existing baseline first, follow AGENTS.md, and keep the change focused with tests.`
`Read docs/IMPLEMENTATION-STATUS.md and continue the next bounded milestone. Verify the existing baseline first, follow AGENTS.md, and keep the change focused with tests.`