content: quantity-tracked assets & consumables (#2337) + duplicate-booking dates (#2667) - #184
Conversation
…booking dates (#2667) Triggered by: - Shelf-nu/shelf.nu#2337 (feat: Quantitative Assets) - Shelf-nu/shelf.nu#2667 (feat: duplicate booking dates) New KB article, glossary term, and changelog for quantity-tracked assets; updated asset-creation KB and asset-pages feature; changelog for the booking duplicate-dialog date picker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Preview deployment |
WalkthroughAdds a new glossary page and knowledge-base article for quantity-tracked assets and consumables, updates the asset-pages feature doc and adding-new-assets article to reference the new content, and adds two update announcement pages: one for quantity-tracked assets and one for booking duplication date selection. ChangesQuantity-Tracked Assets Documentation
Duplicate Booking Dates Update Page
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@content/glossary/quantity-tracked-assets.mdx`:
- Around line 16-19: The glossary page frontmatter is placing the social preview
image under seo.image, but src/lib/seo.ts only reads a top-level image field, so
the custom OG image is ignored. Move the image value out of the seo block and
into the top-level frontmatter for this MDX file, keeping the rest of the seo
metadata unchanged.
In `@content/updates/duplicate-booking-dates.mdx`:
- Line 9: The copy in duplicate-booking-dates.mdx uses the British spelling
“afterwards”; update the wording to American English by changing it to
“afterward” in the duplicate booking description. Keep the surrounding sentence
structure the same and adjust only the affected text in the booking duplication
copy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4b16e3d5-e07f-4ff4-b89e-03e0b257367f
📒 Files selected for processing (6)
content/features/asset-pages.mdxcontent/glossary/quantity-tracked-assets.mdxcontent/knowledge-base/adding-new-assets.mdxcontent/knowledge-base/quantity-tracked-assets-and-consumables.mdxcontent/updates/duplicate-booking-dates.mdxcontent/updates/quantity-tracked-assets.mdx
| seo: | ||
| title: "What Are Quantity-Tracked Assets? | Definition & Examples" | ||
| description: "Quantity-tracked assets are fungible items managed by count rather than individual identity — supplies, cables, and consumables. Learn how they differ from individually-tracked assets." | ||
| image: "/images/og/glossary-quantity-tracked-assets.png" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Move the OG image to top-level frontmatter.
src/lib/seo.ts reads frontmatter.image, not seo.image, so the custom image here is ignored and this page will fall back to the default social preview image. Put this value on a top-level image key instead.
Suggested fix
seo:
title: "What Are Quantity-Tracked Assets? | Definition & Examples"
description: "Quantity-tracked assets are fungible items managed by count rather than individual identity — supplies, cables, and consumables. Learn how they differ from individually-tracked assets."
- image: "/images/og/glossary-quantity-tracked-assets.png"
+image: "/images/og/glossary-quantity-tracked-assets.png"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| seo: | |
| title: "What Are Quantity-Tracked Assets? | Definition & Examples" | |
| description: "Quantity-tracked assets are fungible items managed by count rather than individual identity — supplies, cables, and consumables. Learn how they differ from individually-tracked assets." | |
| image: "/images/og/glossary-quantity-tracked-assets.png" | |
| seo: | |
| title: "What Are Quantity-Tracked Assets? | Definition & Examples" | |
| description: "Quantity-tracked assets are fungible items managed by count rather than individual identity — supplies, cables, and consumables. Learn how they differ from individually-tracked assets." | |
| image: "/images/og/glossary-quantity-tracked-assets.png" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@content/glossary/quantity-tracked-assets.mdx` around lines 16 - 19, The
glossary page frontmatter is placing the social preview image under seo.image,
but src/lib/seo.ts only reads a top-level image field, so the custom OG image is
ignored. Move the image value out of the seo block and into the top-level
frontmatter for this MDX file, keeping the rest of the seo metadata unchanged.
| layout: "update" | ||
| --- | ||
|
|
||
| Duplicating a booking used to be a one-click confirm that always created the copy with a default "now to tomorrow" window, leaving you to edit the dates afterwards. Now the duplicate dialog asks for the new booking's **start and end date and time** up front, defaulting to the next valid working slot. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use American English "afterward" instead of "afterwards".
In American English, "afterward" is the preferred variant. "Afterwards" is more commonly used in British English and other dialects.
📝 Proposed fix
-..." window, leaving you to edit the dates afterwards. Now the duplicate dialog asks for the ...
+..." window, leaving you to edit the dates afterward. Now the duplicate dialog asks for the ...📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Duplicating a booking used to be a one-click confirm that always created the copy with a default "now to tomorrow" window, leaving you to edit the dates afterwards. Now the duplicate dialog asks for the new booking's **start and end date and time** up front, defaulting to the next valid working slot. | |
| Duplicating a booking used to be a one-click confirm that always created the copy with a default "now to tomorrow" window, leaving you to edit the dates afterward. Now the duplicate dialog asks for the new booking's **start and end date and time** up front, defaulting to the next valid working slot. |
🧰 Tools
🪛 LanguageTool
[locale-violation] ~9-~9: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ..." window, leaving you to edit the dates afterwards. Now the duplicate dialog asks for the ...
(AFTERWARDS_US)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@content/updates/duplicate-booking-dates.mdx` at line 9, The copy in
duplicate-booking-dates.mdx uses the British spelling “afterwards”; update the
wording to American English by changing it to “afterward” in the duplicate
booking description. Keep the surrounding sentence structure the same and adjust
only the affected text in the booking duplication copy.
Source: Linters/SAST tools
Triggered by
Product change summary
Quantitative Assets (#2337) introduces a per-asset tracking method: assets are either Individually tracked (one record = one item, as before) or Tracked by quantity (one record = a pool of identical units). Quantity-tracked assets add a quantity, unit of measure, optional low-stock threshold, and a consumption type (Used up / Returnable). Quantity flows through custody (portions per person), bookings (reserve a quantity from available stock), restocking, low-stock email alerts to admins, and asset models. Verified live against
mainsource (schema enumsAssetType/ConsumptionType, theTrackingMethodCards+ quantity fields in the asset form, quantity custody / adjust-quantity / booking-quantity routes, and the low-stock alert email).Duplicate-booking dates (#2667) lets users pick the new booking's start/end date+time in the duplicate dialog (previously a one-click copy to a fixed now-to-tomorrow window), validated by the same rules as the new-booking form.
Content changes
New content
Factual corrections / enhancements
Screenshots still needed (manual capture required)
Deferred (needs human / CTO direction — not a cop-out)
These are deliberately not in this PR. Honest reasons:
Review notes
Impact scope
Generated by Shelf Content Intelligence — PR→Website Sync
Summary by CodeRabbit
New Features
Documentation