Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6952 +/- ##
=======================================
Coverage 76.29% 76.29%
=======================================
Files 403 403
Lines 20296 20296
Branches 4881 4881
=======================================
Hits 15485 15485
Misses 4811 4811
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… into 6942-pinia-task-13-account-team
…nitial notifications state
| // Same team — skip full reload but always refresh membership | ||
| if (team?.id) { | ||
| this.teamMembership = await teamApi.getTeamUserMembership(team.id) | ||
| } |
There was a problem hiding this comment.
With pinia-plugin-persistedstate, the store hydrates from sessionStorage synchronously on first access. So this.team is already set when checkState calls setTeam. This meant currentTeam?.id === team?.id was always true on second+ page loads, the early return fired, and getTeamUserMembership was never called.
Fix: when IDs match, still call getTeamUserMembership before returning.
| const teamMembership = await teamApi.getTeamUserMembership(team.id) | ||
| commit('setTeam', team) | ||
| commit('setTeamMembership', teamMembership) | ||
| await useAccountTeamStore().setTeam(team) |
There was a problem hiding this comment.
setTeam in the Pinia store now handles fetching teamMembership internally. It calls teamApi.getTeamUserMembership(team.id) as part of its own logic. So the old pattern of fetching membership separately and then committing both setTeam and setTeamMembership is replaced by a single useAccountTeamStore().setTeam(team) call that does both.
frontend/src/composables/Components/multi-step-forms/instance/InstanceFormHelper.js
Outdated
Show resolved
Hide resolved
… into 6942-pinia-task-13-account-team
Description
See details & test plan.
Related Issue(s)
Resolves #6942
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel