Browse the rules, stage 1: Rules & bestiary lists what is loaded, by kind, without a search #1240

Closed
opened 2026-10-26 23:36:58 +00:00 by claude-bot · 2 comments
Collaborator

Why

Owner, 26 Oct 2026: with both starter packs loaded on prod there is no way to look around the content, only to look something up by name. Each campaign's Rules & bestiary page (/campaigns/:id/wiki/rules, webapp/frontend/src/pages/wiki/Rules.jsx) is a search box: nothing is shown until two letters are typed, and it returns at most 20 hits. The owner wants to browse. This is stage 1 of 4. The order is the owner's: this one, then #1241 (a library outside campaigns), then #1242 (per-system filters), and #1243 (browsing inside the sheet, Prep and the table) once those are solid. It is not scheduled yet; assign a milestone when it is picked up.

What

When the search box is empty, the page lists the content instead of showing nothing:

  • The kinds, with counts: spells, creatures, feats, equipment, ancestries and so on, as this campaign's game system and packs have them. GM-only records are counted only for a GM.
  • A kind opens as an A–Z list, with filters:
    • level, as a range (a creature's level, a spell's rank, an item's level, where the kind has one);
    • pack, when more than one is loaded (the instance's starter plus the campaign's own, for example);
    • Show more paging.
  • Typing still searches, within the chosen kind when one is open, across everything when not.
  • Each row opens the way a search hit does today: the source cited, a creature as a stat block, "Make it ours" and "Add to a sheet".

Server

The search already takes kind, level_min and level_max, and sorts by name when there is no query (app/reference/search_service.py). It needs:

  • offset on GET /api/game-systems/{system_key}/reference. The service has it, the route doesn't expose it. Check the CANDIDATES (500) ceiling against the largest kind; the PF2e pack has 5,157 records.
  • A counts-by-kind read for the same visibility (instance and campaign packs, GM-only rules), e.g. GET /api/game-systems/{system_key}/reference/kinds?campaign_id=.
  • A pack filter, if the pack chip stays in the design.

Process

  1. Draw it first on the prototype site, as a lettered variant of the rules chapter's page, and send it to the owner. Include: phone and desktop, light and dark, a player and a GM, one pack and two, no packs loaded, an empty kind, and a failed load.
  2. Build after sign-off, with a CATALOGUE row (docs/design/redesign-surfaces/CATALOGUE.md, WIKI-15).
  3. Tests: counts honour GM-only and disabled packs; paging is stable (no repeats or gaps across pages); a filter plus a query; the phone layout doesn't overflow.

Design it so #1242's per-system filters slot into the same filter row, and #1241 can reuse the list outside a campaign.

## Why Owner, 26 Oct 2026: with both starter packs loaded on prod there is no way to look around the content, only to look something up by name. Each campaign's **Rules & bestiary** page (`/campaigns/:id/wiki/rules`, `webapp/frontend/src/pages/wiki/Rules.jsx`) is a search box: nothing is shown until two letters are typed, and it returns at most 20 hits. The owner wants to browse. This is stage 1 of 4. The order is the owner's: this one, then #1241 (a library outside campaigns), then #1242 (per-system filters), and #1243 (browsing inside the sheet, Prep and the table) once those are solid. It is not scheduled yet; assign a milestone when it is picked up. ## What When the search box is empty, the page lists the content instead of showing nothing: - **The kinds, with counts:** spells, creatures, feats, equipment, ancestries and so on, as this campaign's game system and packs have them. GM-only records are counted only for a GM. - **A kind opens as an A–Z list,** with filters: - level, as a range (a creature's level, a spell's rank, an item's level, where the kind has one); - pack, when more than one is loaded (the instance's starter plus the campaign's own, for example); - **Show more** paging. - **Typing still searches,** within the chosen kind when one is open, across everything when not. - Each row opens the way a search hit does today: the source cited, a creature as a stat block, "Make it ours" and "Add to a sheet". ## Server The search already takes `kind`, `level_min` and `level_max`, and sorts by name when there is no query (`app/reference/search_service.py`). It needs: - `offset` on `GET /api/game-systems/{system_key}/reference`. The service has it, the route doesn't expose it. Check the `CANDIDATES` (500) ceiling against the largest kind; the PF2e pack has 5,157 records. - A counts-by-kind read for the same visibility (instance and campaign packs, GM-only rules), e.g. `GET /api/game-systems/{system_key}/reference/kinds?campaign_id=`. - A pack filter, if the pack chip stays in the design. ## Process 1. **Draw it first** on the prototype site, as a lettered variant of the rules chapter's page, and send it to the owner. Include: phone and desktop, light and dark, a player and a GM, one pack and two, no packs loaded, an empty kind, and a failed load. 2. Build after sign-off, with a CATALOGUE row (`docs/design/redesign-surfaces/CATALOGUE.md`, WIKI-15). 3. Tests: counts honour GM-only and disabled packs; paging is stable (no repeats or gaps across pages); a filter plus a query; the phone layout doesn't overflow. Design it so #1242's per-system filters slot into the same filter row, and #1241 can reuse the list outside a campaign.
Author
Collaborator

Drawn (2026-10-30), for the owner's sign-off: https://questboard-dev.rhoving.com/feedback/prototype/lane6e (lane 6e, a lettered variant of lane 6d's rules chapter; design PR open).

It covers the kinds with counts (GM vs player), a kind opened A–Z with level, pack and search filters, one pack and two, a phone, and the no-packs, empty-kind and failed-load states. Light and dark come from the page's theme switch.

Four questions at the bottom of the page:

  1. The order of the kinds (the system's own, or A–Z).
  2. Pack buttons or a list.
  3. "Show more" by 50.
  4. Searching inside an open kind.

The build follows sign-off, with WIKI-15 in the CATALOGUE and the tests in the issue body.

**Drawn (2026-10-30), for the owner's sign-off:** https://questboard-dev.rhoving.com/feedback/prototype/lane6e (lane 6e, a lettered variant of lane 6d's rules chapter; design PR open). It covers the kinds with counts (GM vs player), a kind opened A–Z with level, pack and search filters, one pack and two, a phone, and the no-packs, empty-kind and failed-load states. Light and dark come from the page's theme switch. Four questions at the bottom of the page: 1. The order of the kinds (the system's own, or A–Z). 2. Pack buttons or a list. 3. "Show more" by 50. 4. Searching inside an open kind. The build follows sign-off, with WIKI-15 in the CATALOGUE and the tests in the issue body.
Author
Collaborator

Signed off by the owner (2026-10-30): "I like the layout." Their answers to the four questions:

  1. Order of the kinds: the system's own order (spells, creatures, feats, equipment…), not A–Z.
  2. Pack filter: buttons, "fine for now".
  3. Paging: numbered pages, not "Show more". This changes the drawing: the list gets a pager (previous, page numbers, next) under it, and keeps its place in the URL so Back returns to the same page.
  4. Search inside an open kind: yes. While a kind is open, the box searches that kind only; from the kinds, it searches everything.

Building now, for v4.7.0.

**Signed off by the owner (2026-10-30): "I like the layout."** Their answers to the four questions: 1. **Order of the kinds:** the system's own order (spells, creatures, feats, equipment…), not A–Z. 2. **Pack filter:** buttons, "fine for now". 3. **Paging: numbered pages**, not "Show more". *This changes the drawing:* the list gets a pager (previous, page numbers, next) under it, and keeps its place in the URL so Back returns to the same page. 4. **Search inside an open kind:** yes. While a kind is open, the box searches that kind only; from the kinds, it searches everything. Building now, for v4.7.0.
Sign in to join this conversation.
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.

Reference
rbrooks/Quest-Board#1240
No description provided.