Fix party members disappearing on Campaign overview after HP edit - #358
Merged
Merged
Conversation
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
RunCampaign.vuewatchesfiltered_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.players/get_players) on mount, the same wayAddPlayers.vueand the Players list page already do, so the index is complete before any edit can touch it..planning/campaign-overview-players-disappearing.mdTest plan
RunCampaign.vue)npm run lintpasses🤖 Generated with Claude Code
https://claude.ai/code/session_017AuRuGWkBbBzeKpqtrq9qR