feat(webapp): browse the rules, stage 3 — each system's own filters (#1242) #1312
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1242-system-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1242. It includes the design from #1307 (the note, lane 6g, and D310–D313), which this replaces.
What it adds
app/sheets/builtin/{pf2e,dnd5e}/browse.jsonwith a schema. They declare each kind's filters and sorts, as D310 sets out.reference_entries.facets:b1242c0d1e2f: the column plus a GINjsonb_path_opsindex, with a real downgrade;python -m app.cli refill_facetsdoes the same by hand.f_<key>andsorton the page routes (campaign, library and admin pack);GET /api/game-systems/{key}/reference/filtersandGET /api/admin/content-packs/{id}/browse/filters, which return the filters with counts computed exclude-self (D311) and the sorts (D313);replaceslevel takes its place;Checked so far
browse.jsonas a sheet; it was fixed and that test file re-run green.d80f883d, but those three new files weren't re-run on their own after the fix.Out of scope: packs carrying their own browse definition, #1308.
New wording goes on the Wording Review page before this merges.
🤖 Generated with Claude Code
Render check (journeys stack, both starters loaded)
The run: 30 shots at 1280×800 and 390×844, in light and dark, as Dana and Priya. Every shot returned HTTP 200, with 0 console errors and no overflow on a phone. Axe found no violations on the spells row, the creatures row, or the open phone fold.
What renders:
The API agrees with the page:
filters?kind=spellgives tradition arcane 607, divine 369, occult 548 and primal 450.f_rank=1..3those drop to 333, 192, 299 and 264 (exclude-self, as D311 sets out).Found and fixed in this PR:
Two notes, not defects:
A correction to my last comment: the cantrip and summary fixes (
9511b34b) were not verified when I called them fixed.On docker-test, the 8 affected files gave 76 passed and 7 failed, at a load average of 40–45. My filter kept the failing test names but not their errors, so I can't yet say whether those 7 are host timeouts or real. They're spread across files the change doesn't touch (RulesLibrary, Rules, RulesBrowse, RulesFilters, RulesOpen), which looks like load, but that's a guess. I'm pushing so CI's runners decide. If CI fails, I'll pull the log.
CI's first backend run stopped on one real failure: the one-head pin in
tests/export/test_import_jobs_migration.pystill nameda1269b0c1d2e. It now namesb1242c0d1e2f, and it's the only test that pins the head.Both frontend jobs passed on that same CI run, so the 7 failures I saw earlier on docker-test were host load (load average 40–45), not this change.
The full backend suite on postgres:18, run on docker-test against the branch with the fix: 10500 passed, 14 skipped, 0 failed, in 47 minutes.
This PR is set to merge when CI is green. The owner approved its wording (part m) on 2 Nov.