Skip to content

Fix party members disappearing on Campaign overview after HP edit - #358

Merged
HarmlessHarm merged 1 commit into
developfrom
feature/fix-campaign-players-disappearing
Sep 11, 2026
Merged

Fix party members disappearing on Campaign overview after HP edit#358
HarmlessHarm merged 1 commit into
developfrom
feature/fix-campaign-players-disappearing

Conversation

@HarmlessHarm

@HarmlessHarm HarmlessHarm commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Editing one player's HP (or any field) via the Edit player drawer on the Campaign overview screen caused every other party member to vanish from the list until the campaign was reloaded.
  • Root cause: RunCampaign.vue watches filtered_search_players, which is derived from the Vuex "players" search index. That index was never fully hydrated there, so the first single-player edit lazily created it with only that one entry, and the watcher then replaced the whole displayed roster with just that entry.
  • Fix: fetch the full player search index (players/get_players) on mount, the same way AddPlayers.vue and the Players list page already do, so the index is complete before any edit can touch it.
  • Root cause analysis and fix write-up: .planning/campaign-overview-players-disappearing.md

Test plan

  • Open a campaign with 3+ players in the Campaign overview screen (RunCampaign.vue)
  • Edit one player's HP via the pencil icon (Edit player drawer)
  • Confirm the other, unedited party members remain visible
  • Repeat for a second player to confirm it doesn't regress after the index has an entry
  • npm run lint passes

🤖 Generated with Claude Code

https://claude.ai/code/session_017AuRuGWkBbBzeKpqtrq9qR

Editing one player's HP (or any field) via the Edit player drawer
triggers players/edit_player, which lazily creates the Vuex "players"
search index with only that single entry if it didn't exist yet.
RunCampaign.vue's watcher on filtered_search_players then rebuilds the
displayed roster from that incomplete index, wiping out every other
party member from the UI until the campaign is reloaded.

Fetch the full player search index (players/get_players) on mount, the
same way AddPlayers.vue and the Players list page already do, so the
index is always complete before a single-player edit can touch it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017AuRuGWkBbBzeKpqtrq9qR
@sonarqubecloud

Copy link
Copy Markdown

@HarmlessHarm HarmlessHarm added the bug Something isn't working label Sep 11, 2026
@HarmlessHarm
HarmlessHarm merged commit 550b431 into develop Sep 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant