[Frontend] Let players set their own character name #383

Closed
opened 2026-08-25 20:42:20 +00:00 by claude-bot · 2 comments
Contributor

Impact: MEDIUM

Found in the August 2026 session lifecycle review (#319).

What the user experiences

A new player who joins a campaign has no way to set their own character name. The "Edit character" button only renders once a character name already exists — so the first name must be set by the GM, for every player, and nothing in the product says so.

Evidence

  • webapp/frontend/src/pages/CampaignDetail.jsx:1581-1590 — the button is wrapped in m.character_name && (…), so it renders only when a name already exists.
  • webapp/frontend/src/pages/CampaignDetail.jsx:1598 — for the GM's view of other members, the button already correctly reads {m.character_name ? "Edit character" : "Set character"}; the fix is to apply the same conditional to the player's own row.

Why it matters for a hosted product

An onboarding step the product could trivially self-serve (a player naming their own character) instead silently requires the GM to do it for every player, with no indication anywhere that this is expected.

Proposed fix

Drop the m.character_name && guard on the player's own row so the button reads "Set character" when empty, matching the pattern the GM's view of other members already uses at :1598. This is the audit's P14.

Acceptance criteria

  • A player with no character name set sees a "Set character" button on their own membership row.
  • Setting a character name for the first time works identically to editing an existing one.
**Impact: MEDIUM** Found in the August 2026 session lifecycle review (#319). ## What the user experiences A new player who joins a campaign has no way to set their own character name. The "Edit character" button only renders once a character name already exists — so the first name must be set by the GM, for every player, and nothing in the product says so. ## Evidence - `webapp/frontend/src/pages/CampaignDetail.jsx:1581-1590` — the button is wrapped in `m.character_name && (…)`, so it renders only when a name already exists. - `webapp/frontend/src/pages/CampaignDetail.jsx:1598` — for the *GM's view of other members*, the button already correctly reads `{m.character_name ? "Edit character" : "Set character"}`; the fix is to apply the same conditional to the player's own row. ## Why it matters for a hosted product An onboarding step the product could trivially self-serve (a player naming their own character) instead silently requires the GM to do it for every player, with no indication anywhere that this is expected. ## Proposed fix Drop the `m.character_name &&` guard on the player's own row so the button reads "Set character" when empty, matching the pattern the GM's view of other members already uses at `:1598`. This is the audit's P14. ## Acceptance criteria - [ ] A player with no character name set sees a "Set character" button on their own membership row. - [ ] Setting a character name for the first time works identically to editing an existing one.
Author
Contributor

Picking this up as part of v4.3.0 phase 1 (#514), shipping early as v4.2.3. Same conditional the GM's view already uses, applied to the player's own row, with a test for both states.

Picking this up as part of v4.3.0 phase 1 (#514), shipping early as v4.2.3. Same conditional the GM's view already uses, applied to the player's own row, with a test for both states.
Author
Contributor

Closed by PR #515 (merged), shipping in v4.2.3, with a finding: this no longer reproduced on main. PR #330's multi-character refactor replaced the m.character_name && (…) guard the audit saw with canManageCharacters = isGm || m.user_id === user?.id, and a player's own row renders "+ Add character" through that check whether or not a character exists, plus "Edit character" when one does. So the fix landed as a side effect of #330, before this issue was filed against the older code.

What #515 adds is the coverage that was missing: two tests in CampaignDetail.test.jsx pin the exact scenario named here (a non-GM player, their own row, zero characters, sees an actionable button; with a character, sees Edit), so the guard cannot quietly come back. No production change.

Closed by PR #515 (merged), shipping in v4.2.3, with a finding: **this no longer reproduced on main.** PR #330's multi-character refactor replaced the `m.character_name && (…)` guard the audit saw with `canManageCharacters = isGm || m.user_id === user?.id`, and a player's own row renders "+ Add character" through that check whether or not a character exists, plus "Edit character" when one does. So the fix landed as a side effect of #330, before this issue was filed against the older code. What #515 adds is the coverage that was missing: two tests in `CampaignDetail.test.jsx` pin the exact scenario named here (a non-GM player, their own row, zero characters, sees an actionable button; with a character, sees Edit), so the guard cannot quietly come back. No production change.
rbrooks referenced this issue from a commit 2026-09-06 02:00:15 +00:00
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.

Dependencies

No dependencies set

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