Inventory status filter broken: frontend sends status= but API expects item_status= #103

Closed
opened 2026-04-18 09:12:12 -07:00 by pyr0ball · 0 comments
Owner

Summary

The inventory list status filter (available / consumed / expired) does not work. The frontend sends status= as the query parameter but the backend endpoint expects item_status=.

Steps to reproduce

  1. Add items and mark some as consumed
  2. In the Pantry tab, switch the status filter to "consumed"
  3. Observe: consumed items are not shown; available items still display

Expected

Filtering by status correctly shows items matching the selected status.

Actual

The status query parameter is silently ignored by FastAPI (unknown param). The default item_status=available is used on every request, so only available items ever show.

Root cause

frontend/src/services/api.ts listItems() passes { status, location, limit } as query params. The backend GET /api/v1/inventory/items declares the param as item_status: str = "available" (not status). FastAPI ignores the unrecognized status param.

Verified via curl:

  • ?status=consumed returns available items (ignores filter)
  • ?item_status=consumed returns consumed items correctly

Fix

Rename the API parameter from item_status to status in app/api/endpoints/inventory.py, OR update api.ts to send item_status instead of status.

## Summary The inventory list status filter (available / consumed / expired) does not work. The frontend sends `status=` as the query parameter but the backend endpoint expects `item_status=`. ## Steps to reproduce 1. Add items and mark some as consumed 2. In the Pantry tab, switch the status filter to "consumed" 3. Observe: consumed items are not shown; available items still display ## Expected Filtering by status correctly shows items matching the selected status. ## Actual The `status` query parameter is silently ignored by FastAPI (unknown param). The default `item_status=available` is used on every request, so only available items ever show. ## Root cause `frontend/src/services/api.ts` `listItems()` passes `{ status, location, limit }` as query params. The backend `GET /api/v1/inventory/items` declares the param as `item_status: str = "available"` (not `status`). FastAPI ignores the unrecognized `status` param. Verified via curl: - `?status=consumed` returns available items (ignores filter) - `?item_status=consumed` returns consumed items correctly ## Fix Rename the API parameter from `item_status` to `status` in `app/api/endpoints/inventory.py`, OR update `api.ts` to send `item_status` instead of `status`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/kiwi#103
No description provided.