feat(webapp): browse in place, slice 2 — Prep's Rules & bestiary drawer gains Browse (#1243) #1319

Merged
claude-bot merged 3 commits from feat/1243-prep-drawer into main 2026-11-02 22:42:00 +00:00
Collaborator

Part of #1243, slice 2 of 3 (D317). The design is lane 6h and D314–D317, which come in with #1318.

What it adds

  • "Search | Browse" in Prep's Rules & bestiary drawer. Search is unchanged. Browse shows the campaign's kinds with counts, then a kind as stage 3's list, with the system filters always folded behind "Filters (N)" because the drawer is narrow.
  • A browse row is the drawer's own hit: Preview, Insert (the existing action; the drawing's "To the scene" label isn't used), the Peek preview and "Back to results", with the same state and Escape handling.
  • D315: creatures start at the party's range.
    • PF2e: the party's level −2 to +3.
    • 5e: f_cr from L/4 to L+2.
    • The head says "for a party of N at level L".
    • The party is the active player characters with a sheet. L is the rounded average of their sheets' levels. Nothing is preset when no level is known.
  • useRulesBrowse gains memory: true, which keeps its state in the component so the drawer never changes the prep page's URL. KindOpen and KindsGrid gain small optional props. Existing callers are unchanged.

Checked

  • lint has 0 errors;
  • src/pages/prep and src/pages/wiki: 545 passed;
  • the whole frontend suite: 5646 passed, 1 skipped.
  • Not yet: the render check, which is running, and CI.

New wording goes on the Wording Review page: "for a party of N at level L", "Loading the rules…", "The rules did not load." and "No rules are loaded for this campaign."

🤖 Generated with Claude Code

Part of #1243, slice 2 of 3 (D317). The design is lane 6h and D314–D317, which come in with #1318. **What it adds** - **"Search | Browse"** in Prep's Rules & bestiary drawer. Search is unchanged. Browse shows the campaign's kinds with counts, then a kind as stage 3's list, with the system filters always folded behind "Filters (N)" because the drawer is narrow. - A browse row is the drawer's own hit: Preview, **Insert** (the existing action; the drawing's "To the scene" label isn't used), the Peek preview and "Back to results", with the same state and Escape handling. - **D315: creatures start at the party's range.** - PF2e: the party's level −2 to +3. - 5e: `f_cr` from L/4 to L+2. - The head says "for a party of N at level L". - The party is the active player characters with a sheet. L is the rounded average of their sheets' levels. Nothing is preset when no level is known. - `useRulesBrowse` gains `memory: true`, which keeps its state in the component so the drawer never changes the prep page's URL. `KindOpen` and `KindsGrid` gain small optional props. Existing callers are unchanged. **Checked** - lint has 0 errors; - `src/pages/prep` and `src/pages/wiki`: 545 passed; - the whole frontend suite: 5646 passed, 1 skipped. - **Not yet:** the render check, which is running, and CI. New wording goes on the Wording Review page: "for a party of N at level L", "Loading the rules…", "The rules did not load." and "No rules are loaded for this campaign." 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test: Browse drawer tests pass lint and the filter row (#1243)
Some checks failed
CI / Which journeys does this change need? (pull_request) Successful in 17s
CI / Does this change touch the recording path? (pull_request) Successful in 17s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 1m15s
CI / Backend lint (ruff) (pull_request) Successful in 1m25s
CI / Feedback site tests (pull_request) Successful in 2m0s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m18s
CI / Docker image build (pull_request) Successful in 2m27s
CI / Bot tests and audit (pull_request) Successful in 4m49s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m2s
CI / Frontend (shard 1/2) (pull_request) Successful in 9m22s
CI / Backend migration, tests, and audit (pull_request) Has been cancelled
CI / End-to-end journeys (desktop) (pull_request) Has been cancelled
c47a1b6d62
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(webapp): Search and Browse show which one is open (#1243)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 33s
CI / Bot/backend version sync (pull_request) Successful in 23s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Does this change touch the recording path? (pull_request) Successful in 17s
CI / Feedback site tests (pull_request) Successful in 44s
CI / Which journeys does this change need? (pull_request) Successful in 16s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 2m7s
CI / Docker image build (pull_request) Successful in 10m14s
CI / Frontend (shard 2/2) (pull_request) Successful in 18m40s
CI / End-to-end journeys (desktop) (pull_request) Successful in 12m2s
CI / Frontend (shard 1/2) (pull_request) Successful in 24m40s
CI / Backend migration, tests, and audit (pull_request) Successful in 1h9m24s
caef8ffe53
The render check found the pressed state invisible in Prep's drawer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Collaborator

Render check (journeys stack, both starters, a level-1 PF2e fighter)

On desktop and on the phone's Tools sheet: 0 console errors, axe clean, no overflow.

  • Browse shows the kinds in two columns with counts.
  • Creatures shows "for a party of 1 at level 1 · 1 set · Clear them", level −1 to 4, 50 rows each with Insert, and "Page 1 of 6".
  • The preview has "Back to results" and Insert.
  • Search ("ghoul") works as before.
  • The phone's Filters panel shows Size, Traits and Rarity, with Done.
  • The request carries level_min=-1&level_max=4.999, which is L−2 to L+3 for level 1.
  • The prep page's URL never changed, through Browse, a kind, the preview or Search.

Fixed (caef8ffe): Search and Browse looked the same whichever was open; the pressed one now has the Rules page's pressed look.

Left as they are, both matching stage 3's approved behaviour:

  • "1 set" counts the level, while "Filters (N)" counts only the folded system filters.
  • On a phone, the long search placeholder is clipped.

The owner approved the wording (part o, keeping Insert). This merges when CI is green.

## Render check (journeys stack, both starters, a level-1 PF2e fighter) On desktop and on the phone's Tools sheet: 0 console errors, axe clean, no overflow. - **Browse** shows the kinds in two columns with counts. - **Creatures** shows "for a party of 1 at level 1 · 1 set · Clear them", level −1 to 4, 50 rows each with Insert, and "Page 1 of 6". - **The preview** has "Back to results" and Insert. - **Search ("ghoul")** works as before. - **The phone's Filters panel** shows Size, Traits and Rarity, with Done. - **The request** carries `level_min=-1&level_max=4.999`, which is L−2 to L+3 for level 1. - **The prep page's URL never changed**, through Browse, a kind, the preview or Search. **Fixed (caef8ffe):** Search and Browse looked the same whichever was open; the pressed one now has the Rules page's pressed look. Left as they are, both matching stage 3's approved behaviour: - "1 set" counts the level, while "Filters (N)" counts only the folded system filters. - On a phone, the long search placeholder is clipped. The owner approved the wording (part o, keeping Insert). This merges when CI is green.
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-11-02 21:32:41 +00:00
Sign in to join this conversation.
No description provided.