content: total value counts the units each screen is about (shelf.nu#2823) - #233
Conversation
…2823) Triggered by: Shelf-nu/shelf.nu#2823 The quantity-value copy claimed one quantity-aware total flowing through every surface, multiplied by 'the quantity on hand'. Verified against source: kit totals multiply by AssetKit.quantity, booking totals and the pull-list PDF by BookingAsset.quantity, Custody Snapshot by Custody.quantity, Overdue value-at-risk by booked units still out. Only the dashboard tile, Asset Inventory / Distribution / Idle Assets and the export's Total value column use workspace stock. Replaced the sentence with a per-surface table and corrected the changelog entry that carried the same enumeration.
Preview deployment |
|
Warning Review limit reached
Next review available in: 54 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe documentation defines quantity-aware asset value calculations for inventory, kits, bookings, custody, overdue items, reports, and CSV exports. It distinguishes per-unit values from quantity-based totals and updates the related release description. ChangesQuantity-aware asset value documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 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: 1
🤖 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/updates/quantity-aware-asset-value.mdx`:
- Around line 12-14: Update the release entry’s CSV export paragraph to
distinguish Standard and Import-ready exports: preserve that Standard CSVs
include per-unit Value and quantity-aware Total value, and state that
Import-ready CSVs include only per-unit Value. Keep the re-import contract clear
and retain the surrounding quantity behavior unchanged.
🪄 Autofix
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 Plus
Run ID: e89a5f94-70c4-4114-8070-2fdee0bbe004
📒 Files selected for processing (2)
content/knowledge-base/quantity-tracked-assets-and-consumables.mdxcontent/updates/quantity-aware-asset-value.mdx
… the changelog entry Answers CodeRabbit: the update entry described the standard export's two value columns but not the import-ready export, which carries only the per-unit price. The KB section already had both halves.
|
Addressed CodeRabbit's finding in 346b33a: the changelog entry now names the import-ready export's per-unit-only Value column alongside the standard export's two columns. Grepped the PR's other file for the same gap per usual practice; the KB section already carried both halves, so no sibling fix was needed. Verified column labels in |
Triggered by
Product change summary
#2823 fixed the last surface that was multiplying a quantity-tracked asset's per-unit value by the wrong count: the Companion app's kit screen was showing
valuation × workspace stockinstead ofvaluation × units in this kit. That server change ships with a normal webapp deploy, so live 1.2.0 installs get the corrected number without an app update.Checking our own copy against that, the site was telling the same story the code used to: one quantity-aware total flowing through everything. It isn't one total. Each surface multiplies by the count that surface is about, and the site named "the quantity on hand" for all of them, which overstates kit, booking, custody and overdue figures by the size of the whole pool.
Content changes
Factual corrections
content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— replaced the single "Total value counts every unit" paragraph with a per-surface table. Was: "Shelf multiplies it by the quantity on hand… That total flows through everywhere value is summed: the dashboard inventory-value tile, location and kit totals, a booking's total asset value (including the pull-list PDF), the value-based reports, and CSV exports." A booking of 5 cables from a 100-cable pool shows €10, not €200. Also added that a standard export carries Value (per-unit) and Total value (quantity-aware) side by side, while the import-ready export carries only the per-unit price.content/updates/quantity-aware-asset-value.mdx— the 2026-07-02 changelog entry carried the same enumeration in its body and itsdescription. Rewritten to name the count each surface uses, with a deep link to the new KB section. Date left at 2026-07-02: the entry is still about the same release.Verified against source, not the PR body
Total valuecolumnAsset.quantity(workspace stock)utils/asset-value.tsgetAssetTotalValue,modules/reports/helpers.server.ts:1708,utils/csv.server.tstotal_valueAssetKit.quantityroutes/_layout+/kits.$kitId.overview.tsx:94BookingAsset.quantitymodules/booking/pdf-helpers.ts:261Custody.quantitymodules/reports/helpers.server.ts:1913modules/reports/helpers.server.ts:1269Column labels confirmed in
modules/asset-index-settings/helpers.ts:valuationrenders as Value, the synthetic export-only column as Total value.No changelog entry, deliberately
Nothing shipped for a reader to notice. #2823's mobile half (low-stock badge, per-member kit quantity, per-slice booking rows) is not reachable by anyone yet: both stores are on 1.2.0, built 2026-07-22 with
channel: None, so no installed binary can take an OTA update. Its server half is a silent correction to a number in one mobile screen. #2832 is two crash/error-presentation fixes. Both sit below the changelog bar.Review notes
modules/location/service.server.ts:693sumsvalue × Asset.quantityover every asset joined to the location pivot, so a pool of 100 cables split 60 in the stockroom and 40 in the van reports the full €200 at both locations. That looks like a bug rather than a convention, so I did not write it down as behaviour. Flagged for the app team instead. The previous copy said "location and kit totals" without distinguishing them.kits.$kitId.overview.tsx:94already multiplies byAssetKit.quantity, with a comment saying so. Worth telling whoever picks up that follow-up./qr/:qrId/link/kitSSR crash broke a flow two KB articles document (fixing-incorrectly-assigned-qr-stickers.mdxstep 5, "Link to an existing kit"), but only on a hard load of that URL: reaching it by clicking from the unlinked-QR page is a client-side navigation, where the client bundle has the function. The articles describe the flow correctly and now describe it reliably. The new 429 screen ("Too many requests… wait a moment, then refresh") is not documented anywhere and does not need to be.verify-content-render.mjsneeds a build, so CI is the first place it runs here.check-product-claims.mjspasses locally (539 files). No screenshots: nothing new in the UI to capture.Impact scope
Generated by Shelf Content Intelligence — PR→Website Sync
Summary by CodeRabbit