Skip to content

feat: add fe member list cache - #3607

Merged
ulemons merged 3 commits into
mainfrom
feat/add-member-caching
Nov 17, 2025
Merged

feat: add fe member list cache#3607
ulemons merged 3 commits into
mainfrom
feat/add-member-caching

Conversation

@ulemons

@ulemons ulemons commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

what:

uses Tanstack cache for the member query api.

how:

  • created a new key members-list which takes id and params
  • created a new key member-merge-suggestions-count which only takes the id

Note

Switch member list page to TanStack Vue Query with new query keys, caching members list and merge suggestion counts, and refactor filters/pagination to drive reactive queries with cache invalidation on project change.

  • Member list page (frontend/src/modules/member/pages/member-list-page.vue)
    • Replace manual fetch/loading with TanStack Vue Query (useQuery, useQueryClient).
    • Add reactive queryParams and computed membersQueryKey / mergeSuggestionsQueryKey to drive queries.
    • Cache and fetch:
      • MemberService.listMembers using TanstackKey.MEMBERS_LIST.
      • MemberService.fetchMergeSuggestions(countOnly) using TanstackKey.MEMBER_MERGE_SUGGESTIONS_COUNT.
    • Update Pinia store from query results; derive loading/tableLoading from query state.
    • Refactor filter and pagination handlers to update queryParams (offset/limit/orderBy) instead of imperative fetch.
    • Invalidate related caches on selectedProjectGroup change; reset params.
    • Minor: type memberFilter as InstanceType<typeof LfFilter>; call memberStore.getMemberCustomAttributes().
  • Types (frontend/src/shared/types/tanstack.ts)
    • Add TanstackKey.MEMBERS_LIST and TanstackKey.MEMBER_MERGE_SUGGESTIONS_COUNT.

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

@ulemons
ulemons requested a review from gaspergrom November 17, 2025 12:57
@ulemons ulemons self-assigned this Nov 17, 2025
@ulemons
ulemons marked this pull request as ready for review November 17, 2025 13:02
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 12

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

orderBy: queryParams.value.orderBy,
};
}
}, { immediate: true });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: UI Displays Stale Data After Mutations

Cache synchronization bug: Other components (member-list-toolbar.vue, member-dropdown-content.vue) still call memberStore.fetchMembers() to refresh data after mutations (delete, update), which updates the Pinia store but doesn't invalidate the Tanstack Query cache. This causes the member list page to show stale cached data after actions like deleting members or marking them as team members, since the watch on membersData won't trigger without cache invalidation.

Fix in Cursor Fix in Web

@ulemons
ulemons merged commit 434444c into main Nov 17, 2025
15 checks passed
@ulemons
ulemons deleted the feat/add-member-caching branch November 17, 2025 15:17
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