debt: Consolidate FUNDS_GRANTS_MANAGEMENT + RECEIVE_GRANTS - #12071
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
73930ed to
7f7e771
Compare
7f7e771 to
0b3d809
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (12)
💤 Files with no reviewable changes (3)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughThis PR updates frontend feature-flag checks from Estimated code review effort: 4 (Complex) | ~60 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
0b3d809 to
f1766ed
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Now that
RECEIVE_GRANTSis consolidated intoFUNDS_GRANTS_MANAGEMENT, consider introducing a small helper (e.g.,canSubmitExpensesOrGrants(collective)) instead of repeating combined feature checks in multiple places (webhooks, create-expense, CTA logic) to keep the behavior centralized and less error-prone. - The GraphQL schema changes remove
RECEIVE_GRANTSfrom several feature types but do not introduceFUNDS_GRANTS_MANAGEMENTin the corresponding platform subscription feature inputs; double-check that the intended feature can still be configured through the subscription APIs and update the input types if necessary.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `RECEIVE_GRANTS` is consolidated into `FUNDS_GRANTS_MANAGEMENT`, consider introducing a small helper (e.g., `canSubmitExpensesOrGrants(collective)`) instead of repeating combined feature checks in multiple places (webhooks, create-expense, CTA logic) to keep the behavior centralized and less error-prone.
- The GraphQL schema changes remove `RECEIVE_GRANTS` from several feature types but do not introduce `FUNDS_GRANTS_MANAGEMENT` in the corresponding platform subscription feature inputs; double-check that the intended feature can still be configured through the subscription APIs and update the input types if necessary.
## Individual Comments
### Comment 1
<location path="lib/graphql/schema.graphql" line_range="1098" />
<code_context>
PROJECTS: CollectiveFeatureStatus
USE_EXPENSES: CollectiveFeatureStatus
RECEIVE_EXPENSES: CollectiveFeatureStatus
- RECEIVE_GRANTS: CollectiveFeatureStatus
MULTI_CURRENCY_EXPENSES: CollectiveFeatureStatus
COLLECTIVE_GOALS: CollectiveFeatureStatus
</code_context>
<issue_to_address>
**issue (bug_risk):** New FUNDS_GRANTS_MANAGEMENT feature is queried in v1 fragments but not exposed on CollectiveFeatures here.
`features { FUNDS_GRANTS_MANAGEMENT }` is now requested in several v1 queries (e.g., `editCollectiveWebhooksQuery` and `collectiveNavbarFieldsFragment`), but `CollectiveFeatures` in `schema.graphql` no longer exposes `RECEIVE_GRANTS` and does not define `FUNDS_GRANTS_MANAGEMENT` here. Unless this enum value is added to `CollectiveFeatures` (and any related input types) in the v1 schema, these queries will fail at runtime. Please ensure the enum is defined and exposed consistently with the new feature usage.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| PROJECTS: CollectiveFeatureStatus | ||
| USE_EXPENSES: CollectiveFeatureStatus | ||
| RECEIVE_EXPENSES: CollectiveFeatureStatus | ||
| RECEIVE_GRANTS: CollectiveFeatureStatus |
There was a problem hiding this comment.
issue (bug_risk): New FUNDS_GRANTS_MANAGEMENT feature is queried in v1 fragments but not exposed on CollectiveFeatures here.
features { FUNDS_GRANTS_MANAGEMENT } is now requested in several v1 queries (e.g., editCollectiveWebhooksQuery and collectiveNavbarFieldsFragment), but CollectiveFeatures in schema.graphql no longer exposes RECEIVE_GRANTS and does not define FUNDS_GRANTS_MANAGEMENT here. Unless this enum value is added to CollectiveFeatures (and any related input types) in the v1 schema, these queries will fail at runtime. Please ensure the enum is defined and exposed consistently with the new feature usage.
f1766ed to
86c5198
Compare
ae3eb0b to
c4fb5b6
Compare
Require opencollective/opencollective-api#11646