Conversation
What was broken Copilot users with displayMemberPaymentDetailsToCopilots disabled no longer saw inline member payment balances, but the billing account details icon still rendered on project rows and project detail pages. Root cause The prior PM-4954 fix gated payment amounts with the project flag, but the modal entry points still only checked the global billing details feature flag and a billing account id. What was changed Gate both project-list and project-detail billing account details buttons with the same per-project payment visibility decision used for copilot amounts. Prevent hidden modal entry points from fetching or rendering billing account details when the project flag is off for restricted copilot users. Leave admin, manager, and flag-enabled copilot visibility unchanged. Any added/updated tests Updated ProjectsTable and ProjectBillingAccountExpiredNotice coverage so flag-off copilots no longer see or open the billing account details modal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
The previous PM-4954 fix added the project displayMemberPaymentDetailsToCopilots flag and hid copilot payment amounts when the flag was off.
QA reported on 2026-05-04 that in dev, flag-off copilot users could still see the button that opens the billing account details modal.
Root cause
The amount display used the project-level visibility gate, but the billing account details modal buttons still only checked the global modal feature flag and the presence of a billing account id.
What was changed
Gate the billing account details modal buttons in both project rows and project detail notices with the same project-level copilot payment visibility decision.
Prevent those hidden modal entry points from fetching or rendering billing account details when the flag is off for restricted copilot users.
Keep admin, manager, and flag-enabled copilot behavior unchanged.
Any added/updated tests
Updated ProjectsTable and ProjectBillingAccountExpiredNotice coverage so flag-off copilots no longer see or open the billing account details modal.
Validation
Passed: yarn lint
Passed: yarn test --watchAll=false src/apps/work/src/lib/components/ProjectBillingAccountExpiredNotice/ProjectBillingAccountExpiredNotice.spec.tsx src/apps/work/src/lib/components/ProjectsTable/ProjectsTable.spec.tsx
Passed: yarn run build
Full suite note: yarn test --watchAll=false is blocked by existing ChallengeEditorForm.spec.tsx launch/budget-approval failures, and the same spec reproduces those failures when run by itself.