Repository navigation
feat(collection): search full inventories, preview ammo imports, and expand stats - #649
Conversation
…nce report - Firearm detail page gets an Ammo On Hand card: rounds and lot count for the firearm's caliber, matched ignoring case and surrounding whitespace, linking to the ammo list filtered to that caliber. - /ammo accepts ?caliber= to filter server-side across all pages. - Insurance report adds an Ammunition section (quantities only; ammo has no price field, so it is excluded from the value total). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNK9JqzSmjsveDQGjDSNFS
A fourth card in the top row squeezed the 180px label column and wrapped values one character per line at desktop widths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNK9JqzSmjsveDQGjDSNFS
At the 1192px max content width, minmax(280px) fit four grid tracks, and the full-width Notes card kept auto-fit from collapsing the empty one. With the fixed 180px label column that left ~60px for values. A 360px minimum caps the grid at three tracks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNK9JqzSmjsveDQGjDSNFS
Scope totals to filtered lots, add ammo to Overview, and connect Collection Stats to the matching lots and printable insurance report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNK9JqzSmjsveDQGjDSNFS
…Gogorichielab/PPCollection into claude/blissful-hamilton-gmhgx0
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e75f6ecab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| items, fields, facetOptions, selected, q, field, caliberFilter, unspecified, | ||
| sort: params.get('sort') || '', | ||
| hasFilters: Boolean(q || caliberFilter || unspecified || facets.some(f => selected[f].length)), | ||
| pagination: { totalCount, totalPages, currentPage, perPage, hasNext: currentPage < totalPages, hasPrevious: currentPage > 1 }, | ||
| queryString: params.toString() |
There was a problem hiding this comment.
Keep search orchestration outside the SQL-only repository layer
The new repository constructs URL query strings, normalizes request parameters, chooses pagination policy, and assembles template state, while both services simply forward its result. This violates the explicit AGENTS.md requirement that repositories remain SQL-only and couples database access to the HTTP/view contract. Move request normalization and view-model construction into the services or shared utilities, leaving the repository responsible for executing queries and returning data.
AGENTS.md reference: AGENTS.md:L46-L49
Useful? React with 👍 / 👎.
| if (selected[facet].length) { | ||
| conditions.push(`LOWER(TRIM(${facet})) IN (${selected[facet].map(() => '?').join(',')})`); | ||
| args.push(...selected[facet]); |
There was a problem hiding this comment.
Use consistent case normalization for facet comparisons
For a facet value containing an uppercase non-ASCII character, such as manufacturer Česká zbrojovka, selecting its checkbox now hides the matching lot. JavaScript's toLowerCase() converts Č to č, but SQLite's built-in LOWER() leaves it unchanged, so the predicate compares different strings. The previous client-side filtering normalized both operands in JavaScript. Use the same normalization on both sides and add a regression test with an accented uppercase facet value.
Useful? React with 👍 / 👎.
| Use **Overview**, **Firearms**, **Ammo**, **Collection Stats**, and **Settings** to navigate. | ||
| Open **+ Add item** in the header and choose **Add firearm** or **Add ammo**. Use **Feedback** in the footer to open GitHub Issues. |
There was a problem hiding this comment.
Update the public site and screenshots for the new interface
This commit changes navigation, inventory search, ammunition imports, and collection statistics, but updates only the README; docs/index.html and docs/screenshots/ remain unchanged and still present the previous interface. AGENTS.md explicitly requires updating both public-site content and screenshots when user-facing features change. Bring those assets into sync with the new workflows before shipping.
AGENTS.md reference: AGENTS.md:L156-L157
Useful? React with 👍 / 👎.
|
This PR is included in version 2.9.0 🎉 |
Inventory and CSV imports
Navigation and reporting
Verification
Regression coverage includes later-page search matches, sorting and filtered totals across pages, ammo-only collections, caliber links, and duplicate imports with stale and fresh confirmations. PR checks