feat: search/filter parity across hutches, surrenders, adoptions #31

Merged
cpressland merged 1 commit from feat/search-filter-parity into main 2026-09-14 11:05:14 +01:00
Collaborator

Closes #24.

Hutches (issue #24)

  • Adds a Needs Playtime filter alongside the existing Needs Cleaning filter and search box, reusing the same overdue-threshold logic already used for the dashboard stat card.

Surrenders

  • Default view changed from Pending to a new All view showing every status (pending/accepted/rejected), as requested.
  • Added free-text search across rabbit name, breed/colour, gender, reason, submitter name/phone/email, status, and received date.

Adoptions

  • Previously had no search or filtering. Added a status filter (All / Pending / Submitted) and free-text search across rabbit name, adopter details, address, notes, and adoption date.
  • Defaults to the All view.

All three list pages now share the same toolbar shape (search box + status <select>, HTMX auto-submit on change/typing) already used by /rabbits, for consistent search/filter UX app-wide.

Testing

No local Postgres available in the sandbox. Verified all three routers with FastAPI TestClient against a throwaway in-memory SQLite database (dependency-overridden get_db/require_*), exercising the real routers and Jinja templates:

  • hutches: needs_playtime filter renders and correctly narrows results
  • surrenders: defaults to all-status view; search and status filter both narrow correctly
  • adoptions: defaults to all view; search and status filter both narrow correctly

Not verified against production data volume or the live Postgres schema — please sanity check on a staging/production deploy before relying on it.

Closes #24. ## Hutches (issue #24) - Adds a **Needs Playtime** filter alongside the existing **Needs Cleaning** filter and search box, reusing the same overdue-threshold logic already used for the dashboard stat card. ## Surrenders - Default view changed from **Pending** to a new **All** view showing every status (pending/accepted/rejected), as requested. - Added free-text search across rabbit name, breed/colour, gender, reason, submitter name/phone/email, status, and received date. ## Adoptions - Previously had no search or filtering. Added a status filter (All / Pending / Submitted) and free-text search across rabbit name, adopter details, address, notes, and adoption date. - Defaults to the All view. All three list pages now share the same toolbar shape (search box + status `<select>`, HTMX auto-submit on change/typing) already used by `/rabbits`, for consistent search/filter UX app-wide. ## Testing No local Postgres available in the sandbox. Verified all three routers with FastAPI `TestClient` against a throwaway in-memory SQLite database (dependency-overridden `get_db`/`require_*`), exercising the real routers and Jinja templates: - hutches: `needs_playtime` filter renders and correctly narrows results - surrenders: defaults to all-status view; search and status filter both narrow correctly - adoptions: defaults to all view; search and status filter both narrow correctly Not verified against production data volume or the live Postgres schema — please sanity check on a staging/production deploy before relying on it.
feat: search/filter parity across hutches, surrenders, adoptions
All checks were successful
ci / uv-buildah-build-push (push) Successful in 22s
ci / build (push) Successful in 0s
a8526a7f95
Closes #24 (hutches search parity with rabbits list):
- Add a 'Needs Playtime' filter to /hutches alongside the existing
  'Needs Cleaning' filter and free-text search, reusing the same
  overdue-threshold logic (PLAY_STALE_DAYS) already used for the
  dashboard stat card.

Extends the same consistency to Surrenders and Adoptions, per request:
- Surrenders (/surrenders): default status filter changed from
  'pending' to a new 'all' view showing every status; added free-text
  search across rabbit name, breed/colour, gender, reason, submitter
  details, status, and received date - matching the search behaviour
  on /rabbits.
- Adoptions (/adoptions): previously had no search or filtering at
  all. Added a status filter (All / Pending / Submitted, mirroring the
  'submitted' boolean already shown in the table) and free-text search
  across rabbit name, adopter details, address, notes, and adoption
  date. Defaults to the 'all' view.

All three list pages now share the same toolbar shape (search box +
status <select>, HTMX auto-submit on change/typing) already used by
/rabbits, for a consistent search/filter UX across the app.

Testing: no local Postgres available. Verified all three routers with
FastAPI TestClient against a throwaway in-memory SQLite database
(dependency-overridden get_db/require_* deps), exercising the real
routers and Jinja templates: hutches needs_playtime filter renders and
filters correctly; surrenders defaults to the all-status view, search
narrows correctly, status filter narrows correctly; adoptions defaults
to the all view, search and status filter narrow correctly. Did not
verify against production data volume or the live Postgres schema.
cpressland deleted branch feat/search-filter-parity 2026-09-14 11:05:14 +01:00
Sign in to join this conversation.
No reviewers
No labels
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
cpressland/rabbitdb!31
No description provided.