Skip to content

fix(FR-2475): add fetchKey prop to ProjectSelect for data refetch on modal open#6468

Closed
ironAiken2 wants to merge 1 commit intomainfrom
04-07-fix_fr-2475_add_fetchkey_prop_to_projectselect_for_data_refetch_on_modal_open
Closed

fix(FR-2475): add fetchKey prop to ProjectSelect for data refetch on modal open#6468
ironAiken2 wants to merge 1 commit intomainfrom
04-07-fix_fr-2475_add_fetchkey_prop_to_projectselect_for_data_refetch_on_modal_open

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented Apr 7, 2026

Resolves #6433(FR-2475)

Summary

  • Add fetchKey?: string prop to ProjectSelect component and pass it to useLazyLoadQuery options, enabling Relay to trigger a fresh network request when the key changes
  • Pass the existing fetchKey state from UserSettingModal to ProjectSelect, matching how AccessKeySelect already handles this
  • Add fetchKey state management to UpdateUsersModal using useUpdatableState('initial-fetch') and trigger an update via afterOpenChange when the modal opens

Test plan

  • Open user edit modal, verify project list shows fresh data (not stale cache)
  • Change project membership externally, reopen the modal, verify the updated project list appears
  • Open the bulk user update modal, verify project list is fetched fresh on each open

Copilot AI review requested due to automatic review settings April 7, 2026 03:37
Copy link
Copy Markdown
Contributor Author

ironAiken2 commented Apr 7, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
9.22% (-0% 🔻)
1750/18984
🔴 Branches
8.3% (-0% 🔻)
1100/13246
🔴 Functions
5.59% (-0% 🔻)
288/5154
🔴 Lines
8.9% (-0% 🔻)
1641/18443

Test suite run success

854 tests passing in 39 suites.

Report generated by 🧪jest coverage report action from e7ad108

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a fetchKey pathway to ProjectSelect so project options can be reliably refetched when modals are reopened (avoiding stale Relay-cached group lists).

Changes:

  • Add optional fetchKey prop to ProjectSelect and forward it to useLazyLoadQuery options.
  • Wire fetchKey into UserSettingModal and refresh it on UpdateUsersModal open via afterOpenChange.
  • Update E2E config TOML parsing path to pre-process duplicate keys before parsing.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
react/src/components/UserSettingModal.tsx Passes modal-level fetchKey into ProjectSelect so project list can refetch when the modal’s data refreshes.
react/src/components/UpdateUsersModal.tsx Introduces a fetchKey that updates whenever the modal opens, and forwards it to ProjectSelect.
react/src/components/ProjectSelect.tsx Adds fetchKey prop and uses it in Relay query options to force refetch.
e2e/utils/test-util.ts Attempts to deduplicate TOML keys before parsing config fetched from /config.toml.

Comment thread e2e/utils/test-util.ts
Comment thread react/src/components/ProjectSelect.tsx
@ironAiken2 ironAiken2 changed the base branch from 04-07-fix_fr-2476_add_missing_permission_argument_to_admin_vfolder_queries to graphite-base/6468 April 7, 2026 04:28
@ironAiken2 ironAiken2 force-pushed the graphite-base/6468 branch from f819ac5 to a26a287 Compare April 7, 2026 04:33
@ironAiken2 ironAiken2 force-pushed the 04-07-fix_fr-2475_add_fetchkey_prop_to_projectselect_for_data_refetch_on_modal_open branch from f19a6fe to ab5be2d Compare April 7, 2026 04:33
@ironAiken2 ironAiken2 changed the base branch from graphite-base/6468 to 04-07-fix_fr-2476_add_missing_permission_argument_to_admin_vfolder_queries April 7, 2026 04:33
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:S 10~30 LoC labels Apr 7, 2026
@ironAiken2 ironAiken2 marked this pull request as draft April 7, 2026 06:23
@graphite-app graphite-app Bot changed the base branch from 04-07-fix_fr-2476_add_missing_permission_argument_to_admin_vfolder_queries to graphite-base/6468 April 9, 2026 04:04
@graphite-app graphite-app Bot force-pushed the 04-07-fix_fr-2475_add_fetchkey_prop_to_projectselect_for_data_refetch_on_modal_open branch from ab5be2d to a78313d Compare April 9, 2026 04:07
@graphite-app graphite-app Bot force-pushed the graphite-base/6468 branch from a26a287 to 9f3cb82 Compare April 9, 2026 04:07
@graphite-app graphite-app Bot changed the base branch from graphite-base/6468 to main April 9, 2026 04:08
@graphite-app graphite-app Bot force-pushed the 04-07-fix_fr-2475_add_fetchkey_prop_to_projectselect_for_data_refetch_on_modal_open branch from a78313d to e7ad108 Compare April 9, 2026 04:08
@ironAiken2 ironAiken2 closed this Apr 14, 2026
Copy link
Copy Markdown
Contributor Author

This is resolved in the PR below.
#6670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project selector in user edit modal does not refetch data on open

2 participants