Skip to content

Conversation

@cristianscheid
Copy link
Contributor

@cristianscheid cristianscheid commented Jan 29, 2026

Summary

Fixes team population counts to show values consistently across UI.

Changes

  • Always use populationInherited instead of alternating between population (on page load) and member list length (when clicking on a team)
  • Update team population values when a member is added/removed or a team is removed
  • Parent teams are now also updated correctly when a nested team changes, reflecting the updated population accordingly

Before

before.webm

After

after.webm

Known Issue

Race condition flow

  1. Frontend calls Backend LocalController::membersAdd() -> MemberService::addMembers()
  2. MemberService::addMembers() triggers FederatedEvent which runs asynchronously
  3. Backend returns response immediately (doesn't care if updatePopulation() completed or not)
  4. Frontend receives response and calls updateCirclesPopulationCount()
  5. Frontend fetches circles from DB (in some cases updatePopulation() did not complete yet)

With this approach, sometimes users might need to reload the page to see correct counts, specifically when adding multiple members at once or when updating a team that's also nested in other teams. This happens because getCircles() is called on the frontend before updatePopulation() in the backend has actually finished executing.

Checklist

@cristianscheid cristianscheid added the 3. to review Waiting for reviews label Jan 29, 2026
@cristianscheid cristianscheid self-assigned this Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/store/circles.js 0.00% 13 Missing ⚠️
.../components/AppNavigation/CircleNavigationItem.vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…pdate count on population change

Signed-off-by: Cristian Scheid <[email protected]>
@cristianscheid cristianscheid force-pushed the bug/2126/team-member-count branch from 3e27201 to bafc3f9 Compare January 29, 2026 14:30
@cristianscheid cristianscheid added the bug Something isn't working label Jan 29, 2026
@cristianscheid cristianscheid changed the title fix(teams): always use populationInherited for population count and u… fix(teams): fix(teams): always use populationInherited for population count Jan 29, 2026
@cristianscheid cristianscheid changed the title fix(teams): fix(teams): always use populationInherited for population count fix(teams): always use populationInherited for population count Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants