Skip to content

fix: fe issue people list (CM-908)#3803

Merged
ulemons merged 70 commits intomainfrom
fix/fe-issue-people-list
Jan 30, 2026
Merged

fix: fe issue people list (CM-908)#3803
ulemons merged 70 commits intomainfrom
fix/fe-issue-people-list

Conversation

@ulemons
Copy link
Contributor

@ulemons ulemons commented Jan 30, 2026

Fix: People List Not Updating After Operations

Problem

The people list was not refreshing properly after performing operations like marking members as bot, marking as team member, or deleting profiles. This caused data inconsistency and a poor user experience.

Solution

1. Include All Attributes to Prevent Data Loss

  • Added includeAllAttributes parameter to fetch complete member data before updates
  • Ensures proper attribute merging when updating member attributes (e.g., isBot, isTeamMember)
  • Prevents accidental data loss by always working with the full attribute set

2. Backend Cache Invalidation Control

  • Added invalidateCache parameter to the backend MemberService.update() method
  • Frontend can now explicitly request cache invalidation when needed
  • Gives granular control: invalidate only specific member caches or all caches including lists
  • Default behavior (invalidateCache: false) invalidates only the specific member's cache
  • When invalidateCache: true, also invalidates all list caches to ensure consistency across all users

3. Simplified Frontend Query Invalidation

  • Replaced complex client-side cache busting with simple TanStack Query invalidation
  • Frontend calls queryClient.invalidateQueries() after operations to refresh the UI
  • Backend handles cache invalidation automatically for all users
  • Cleaner, more maintainable code

4. Optimized Backend Calls

  • Removed unnecessary cache busting parameters and debug logs
  • Fetch member data only when needed (before updates)
  • Each operation makes exactly the required API calls, no more, no less
  • Reduces backend load and prevents race conditions

Benefits

  • Consistent data across all users: Backend cache invalidation ensures everyone sees the same data
  • No more stale UI: List refreshes immediately after operations
  • Fewer bugs: Proper attribute merging prevents data loss
  • Better performance: Optimized number of backend calls
  • Cleaner codebase: Removed unused cache busting code and debug logs

Note

Medium Risk
Touches member read/update flows and Redis cache invalidation behavior; incorrect cache-keying or invalidation could cause stale data or elevated cache churn, but changes are scoped and opt-in via new flags.

Overview
Ensures the People list refreshes reliably after member updates/deletes by switching UI refresh to TanStack Query invalidation and clearing bulk selections after actions.

Adds safer attribute updates for mark as team member/mark as bot by first fetching the member with includeAllAttributes to avoid overwriting attributes, and introduces a new bulk "Mark as bot" action.

Extends the backend member APIs to accept includeAllAttributes on GET /member/:id and invalidateCache on PUT /member/:id, and updates member query caching to (a) include includeAllAttributes in cache keys and (b) optionally invalidate all list caches when requested (used for delete/unmerge and selected updates).

Written by Cursor Bugbot for commit 6aef904. This will update automatically on new commits. Configure here.

@ulemons ulemons self-assigned this Jan 30, 2026
@ulemons ulemons requested a review from joanagmaia January 30, 2026 08:59
@ulemons ulemons marked this pull request as ready for review January 30, 2026 08:59
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Copy link
Contributor

@joanagmaia joanagmaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

@joanagmaia
Copy link
Contributor

@ulemons code scanning is failing 🤔 might be worth checking it out

@ulemons
Copy link
Contributor Author

ulemons commented Jan 30, 2026

@joanagmaia yes i have seen that issue but they are not related to any of the file i have modified, should i fix them anyway ? they are about some limit constraint and some vulnerable regex expressions

@joanagmaia
Copy link
Contributor

@ulemons let's then create a task for it, and merge this one just so it's not blocked

@ulemons ulemons merged commit 83bc45a into main Jan 30, 2026
14 of 15 checks passed
@ulemons ulemons deleted the fix/fe-issue-people-list branch January 30, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants