Skip to content

Library: a shelf holds fifty objects - #216

Closed
manager wants to merge 1 commit into
devfrom
feat/library-shelf-50-objects
Closed

Library: a shelf holds fifty objects#216
manager wants to merge 1 commit into
devfrom
feat/library-shelf-50-objects

Conversation

@manager

@manager manager commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The per-shelf cap goes from 30 to 50, all types counted together. CMS side is keepsimple-cms-new #410. The full-shelf error is matched on its shape rather than its number, so the two sides cannot disagree mid-rollout.

🤖 Generated with Claude Code

Thirty was the figure the shelves were built against and the owners filling
them ran out of room, so it is fifty. One number on each side: the CMS refuses
the fifty-first, the Add control goes quiet at fifty, and the full-shelf copy
still names the same rule. The backend message is matched on its shape, not on
its number, so the two never disagree while a rollout is halfway through.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Claude finished @manager's task in 1m 5s —— View job


Review: Library shelf cap 30 → 50

  • Read repo instructions (CLAUDE.md / AGENTS.md)
  • Gather PR diff and changed files
  • Review correctness & React best practices
  • Review TypeScript quality
  • Review project conventions
  • Review styling / design tokens
  • Post inline comments for issues found (none needed)
  • Post final summary

Verdict: LGTM. This is a clean, minimal, low-risk change — the diff is only a constant bump and its accompanying comments.

What I checked:

  • src/constants/library/common.ts:84MAX_OBJECTS_PER_SHELF bumped 30 → 50. Grepped the repo for any other hardcoded 30/shelf-cap references (source, tests under tests/) and found none — Shelf.tsx is the only consumer, via the constant.
  • src/lib/library/shelfFull.ts — the regex /shelf cannot have more than \d+ objects/i already used \d+ before this PR, so no code change was needed there, only the comment. This confirms the PR body's claim: the full-shelf error is matched on message shape, not the number, so frontend/CMS can't disagree mid-rollout regardless of deploy order.
  • AddObjectModal.tsx / ObjectOverviewModal.tsx / Shelf.tsx — only comment text updated to reflect the new cap; the underlying logic (isShelfFullError, atObjectLimit) is unchanged and still correct.
  • No App Router/Tailwind/state-library/global-CSS violations, no accessibility or security surface touched by this diff.

Gap: I wasn't able to run yarn tsc/yarn lint in this sandbox (Bash command approval was denied for those invocations), but given the change is a numeric constant plus comment-only edits with no new syntax, that risk is minimal.

One dependency to flag per the PR body: this frontend bump should land together with (or after) keepsimple-cms-new #410 per the release process in scripts/release/README.md — the regex tolerance means order doesn't cause user-facing breakage, but confirm CMS side is merged before calling this release-ready.

@manager manager closed this Sep 9, 2026
@manager

manager commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #215 (commit 01afd6a) so one pull request carries everything the next staging build ships. Closing this one.

@manager
manager deleted the feat/library-shelf-50-objects branch September 9, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant