fix(webapp): three small product-surface fixes (phase 1 of v4.3.0) #515

Merged
claude-bot merged 3 commits from fix/phase1-frontend into main 2026-09-06 01:11:42 +00:00
Contributor

Closes #384, closes #383, closes #376. Phase 1 of the v4.3.0 build order (#514), shipping early as v4.2.3.

  • #384 The orphaned CampaignNotes page and its /campaigns/:id/notes route are deleted. Nothing linked to it and it duplicated the campaign journal that CampaignDetail already renders from the same call. The "back to dashboard" blocked-state pattern #382 cites survives in CampaignHighlights.jsx.
  • #383 Turned out to be already fixed on main by PR #330's multi-character refactor: a player's own row renders "+ Add character" through the same canManageCharacters check the GM uses, whether or not a character exists. No production change; two regression tests now pin the exact scenario the issue names (own row, non-GM, zero characters) so it cannot come back.
  • #376 The wiki article's body and infobox now stack below the lg breakpoint (flex-col lg:flex-row), and the infobox takes full width when stacked instead of its fixed w-64. The article comes first in the wrapper, so on a phone the infobox lands below the text. One render test asserts the classes.

vitest 512 passed (47 files), eslint clean apart from the pre-existing warning in CampaignDetail.jsx, vite build succeeds with no CampaignNotes chunk. No backend change, no migration.

🤖 Generated with Claude Code

Closes #384, closes #383, closes #376. Phase 1 of the v4.3.0 build order (#514), shipping early as v4.2.3. - **#384** The orphaned `CampaignNotes` page and its `/campaigns/:id/notes` route are deleted. Nothing linked to it and it duplicated the campaign journal that `CampaignDetail` already renders from the same call. The "back to dashboard" blocked-state pattern #382 cites survives in `CampaignHighlights.jsx`. - **#383** Turned out to be already fixed on main by PR #330's multi-character refactor: a player's own row renders "+ Add character" through the same `canManageCharacters` check the GM uses, whether or not a character exists. No production change; two regression tests now pin the exact scenario the issue names (own row, non-GM, zero characters) so it cannot come back. - **#376** The wiki article's body and infobox now stack below the `lg` breakpoint (`flex-col lg:flex-row`), and the infobox takes full width when stacked instead of its fixed `w-64`. The article comes first in the wrapper, so on a phone the infobox lands below the text. One render test asserts the classes. vitest 512 passed (47 files), eslint clean apart from the pre-existing warning in `CampaignDetail.jsx`, `vite build` succeeds with no `CampaignNotes` chunk. No backend change, no migration. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
CampaignNotes.jsx was reachable by no link in the app and duplicated
the campaign journal already rendered by CampaignDetail.jsx from the
same fetchCampaignNotes call. Remove the dead /campaigns/:id/notes
route, the page component, and its test mock; fetchCampaignNotes
itself stays in api/campaigns.js since CampaignDetail still uses it.

Issue #382 cited CampaignNotes.jsx:50-59 as an example of the "Back to
dashboard" blocked-state pattern; the same pattern still exists in
CampaignHighlights.jsx:74-83, so nothing is lost.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
#383 described a player's own "Edit character" button being hidden
behind a truthy character_name check, so a player with no character
yet had no way to set one from their own row.

That code no longer exists: the multi-character refactor in #330
(already merged to main) replaced the single conditional button with
an always-visible "+ Add character" action, gated only on
canManageCharacters (isGm || own row), independent of whether a
character already exists. Verified by hand-tracing CampaignDetail.jsx
and by exercising the scenario directly — a player viewing their own
row with zero characters already sees "+ Add character" and can open
the same editor used for GM-managed characters.

No production code changed. This commit adds the regression coverage
#383 asked for so a future refactor can't silently reintroduce the
original bug: a player's own empty row keeps an actionable button, and
switches to "Edit character" once a character exists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fix(webapp): stack the wiki infobox below the article on narrow screens (#376)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 48s
CI / Bot/backend version sync (pull_request) Successful in 27s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m23s
CI / Frontend tests, audit, and build (pull_request) Successful in 2m15s
CI / Bot tests and audit (pull_request) Successful in 2m19s
CI / Docker image build (pull_request) Successful in 4m21s
CI / Backend migration, tests, and audit (pull_request) Successful in 8m58s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Successful in 15m49s
6a89b65df9
The article body and its infobox aside shared one non-wrapping flex
row with no responsive stacking, leaving roughly 39px of usable body
width at a 375px viewport once the fixed w-64/xl:w-72 infobox took its
share.

Add flex-col lg:flex-row to the wrapper so the infobox stacks below
the article under the lg breakpoint, and let the infobox take the
full width once stacked (w-full lg:w-64 xl:w-72) instead of forcing
its desktop width down a narrow column. No other layout change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-09-06 00:55:32 +00:00
claude-bot deleted branch fix/phase1-frontend 2026-09-06 01:11:43 +00:00
Sign in to join this conversation.
No description provided.