Part of PAR-166 (spin out /find) — the remaining-capacity data-layer gap.
Show the space available in chestshops (free room in the container, on top of current stock) in the API/UI — for surfacing selling opportunities, and to power the legacy /find "hide full shops" filter and REMAINING_CAPACITY sort.
Technical notes — Only current_stock is captured/surfaced (chestshop_shop.current_stock, written by ChestShopMarketMapper.upsertShop/updateShopStock → MarketApi.upsertShop/updateShopStock); there's no remaining-free-space column. For a SELL shop, buyers care about space left. The legacy chestshop-database stored this as Shop.estimated_capacity (computed by its own InventoryUtil.remainingCapacity).
⚠️ Correction for the implementer: ChestShop-3's com.Acrobot.Breeze.Utils.InventoryUtil does not have a remainingCapacity() method — it has getAmount(item, inv), fits(...), and countEmpty(inv). Compute free room ChestShop-side from those (empty slots × maxStack + partial-stack headroom for the item), the way MarketRecords.stockOf already calls InventoryUtil.getAmount.
Do:
current_space (+ optional fixed capacity) column to chestshop_shop via a new economy-schema migration (highest today is V14 → add V15; do NOT edit V6).ChestShopShopRecord and a param to MarketApi.upsertShop/updateShopStock (+ the mapper write SQL).MarketRecords and surface it alongside stock in the market mapper/DTO and the public REST (PAR-116).
Code context — Only
current_stockis captured/surfaced (chestshop_shop.current_stock, written byChestShopMarketMapper.upsertShop/updateShopStock); there's no remaining-free-space column. For a SELL shop, buyers care about space left (how many more it can buy), which isn't recorded.ChestShop-3 InventoryUtil.fits/getAmountalready compute free room at the source.Approach: add a
current_space(+ capacity) column tochestshop_shopand a param toupsertShop/updateShopStock, compute it ChestShop-side viaInventoryUtil, and surface it alongside stock in the market mapper/DTO.