Skip to content

feat: optional game system per item; Markdown copy grouped system → lot → items (0.4.0) - #6

Merged
mabry1985 merged 2 commits into
mainfrom
feat/game-system
Sep 13, 2026
Merged

mabry1985 merged 2 commits into
mainfrom
feat/game-system

Conversation

@mabry1985

Copy link
Copy Markdown
Member

Game system + grouped Markdown copy

An optional system on every item (Warhammer 40K, Blood Bowl, …). The grid orders and filters by it; the item dialog and inline edit offer the systems already in use. Copy as Markdown becomes a document:

## Blood Bowl
### Blood Bowl Collection
- Reikland Reavers Human Team — Blood Bowl 2016 Split — $57.69

## Warhammer 40K
### Armageddon Box
- Warboss — Orks — $16.00

Also closes Vera's finding on #5: the copy re-reads the live list so a row deleted elsewhere cannot leak into the text.

The column arrives via the store's additive migration; an existing database is upgraded on open (test included). 128 tests; smoke-tested in the local harness.

🤖 Generated with Claude Code

https://claude.ai/code/session_011UQ33xXfygwEkzbbJx3YwZ

mabry1985 and others added 2 commits September 12, 2026 19:44
…ot → items

Josh: "we also need a 'system' optional field for each item so that we can sort by game
system. so when we copy it is md and each is organized by game system header > lot".

- Store: `items.system` (TEXT, default '') added through the additive-migration path — an
  existing 0.3.x database gains the column on open (tested). Lists order by
  system → lot → category → id; `system=` filter (case-insensitive); search covers it;
  `systems()` lists the values in use.
- CSV alias `system` / `game_system` / `game`; exported. Tool: `inventory_upsert_item(system=)`,
  `inventory_list(system=)`. API: `?system=` on /items, `GET /systems`.
- View: a System column (double-click to edit, with suggestions from the systems in use),
  a System filter, the field in the item dialog. Copy as Markdown now emits
  `## <system>` → `### <lot name>` → `- Name — Category — $price`, blank system as "Other"
  and no-lot as "No lot", both last.
- Vera's WARN on #5 (stale item cache could leak a deleted row into the copy): the copy now
  re-reads the live item list, drops ids that no longer exist (and says so in the toast),
  and the delete action prunes the cache and selection.
- 128 tests (was 123). 0.4.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UQ33xXfygwEkzbbJx3YwZ
@mabry1985
mabry1985 merged commit cfcbb1a into main Sep 13, 2026
1 check passed
@mabry1985
mabry1985 deleted the feat/game-system branch September 13, 2026 02:47

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA panel review — WARN

code-review-structural · head 74e6daa98241 · formal

⚠️ PR advanced 1 commit(s) during this round (74e6daa982418eb242e81695); 0 finding(s) in the delta were demoted to possibly addressed.

Low-risk PR: adds a /systems GET endpoint to the inventory API. The code change itself is clean; the single finding is a documentation gap — the README's API listing was not updated to reflect the new route. Fix first: add systems to the README's API line. The panel did not disagree on anything (single finding, confirmed by the verifier). Verification confirmed the evidence quote matches the file byte-for-byte at line 19. Coverage gap: the structural pass was skipped, and api.py itself received no findings — the panel's attention went to the README omission, so the endpoint's implementation logic went under-read.

Findings

Severity Location Finding Verified
🟡 minor README.md:19 The README's API endpoint listing does not include the new /systems GET endpoint added in api.py, so the documented API surface is incomplete relative to the… confirmed
findings JSON (machine-readable)
[
  {
    "file": "README.md",
    "line": 19,
    "severity": "minor",
    "category": "conventions",
    "claim": "The README's API endpoint listing does not include the new `/systems` GET endpoint added in api.py, so the documented API surface is incomplete relative to the code.",
    "evidence": "| **API** | bearer-gated JSON under `/api/plugins/inventory` \u2014 `summary`, `lots`, `items`, `items/{id}/price`, `items/{id}/sold`, `items/{id}/listings`, `listings/{id}/end`, `sales`, `stale`, `audit`, `import`, `export` |",
    "verdict": "confirmed",
    "note": "The /systems route is added in api.py (visible in diff) but the README's API line (unchanged by the PR) omits it; evidence quote matches the file verbatim at line 19."
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant