Repository navigation
fix(webapp): read valid stored org flags key-by-key in mergeOrgFeatureFlags - #5059
shafiktanbir wants to merge 1 commit into
Conversation
|
|
Caution Review failedThe pull request is closed. Finishing Touches
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 |
|
Hi @shafiktanbir, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
| ? validatePartialFeatureFlags(orgFeatureFlags as Record<string, unknown>) | ||
| : ({ success: false } as const); | ||
| return { ...globalFlags, ...(parsed.success ? parsed.data : {}) }; | ||
| return { ...globalFlags, ...parseStoredOrgFlags(orgFeatureFlags).valid }; |
There was a problem hiding this comment.
🟡 User-visible flag fix lacks release note
When mergeOrgFeatureFlags restores valid overrides, members see different navigation and sidebar options. This server-only user-facing fix has no required release note.
Learn more
Organization flags feed the member-facing navigation and account sidebar. This fix changes those views for organizations whose stored flags contain both valid and invalid values. The server changes policy requires a release note for a user-facing, server-only bug fix.
Example: An organization stores hasLogsPageAccess: true alongside an invalid realtimeBackend. Members regain the Logs navigation entry after this change, but receive no release note describing the fix.
Recommended fix: Add a .server-changes/ Markdown file with area: webapp, type: fix, and a one-line user-facing description of restored organization flag behavior.
Was this helpful? React with 👍 or 👎 to provide feedback.
Closes #5058
Follow-up to
a7f0f90e(#5052):mergeOrgFeatureFlagsinapps/webapp/app/v3/featureFlags.server.tswas still callingvalidatePartialFeatureFlags(orgFeatureFlags), so if an org had one invalid stored flag value (which the admin save routes now preserve when untouched), the whole parse failed and all valid org overrides were dropped forresolveOrganizationFeatureFlagscallers.Switched
mergeOrgFeatureFlagsto useparseStoredOrgFlags(orgFeatureFlags).validso valid overrides still apply key-by-key. Also updatedFeatureFlagsDialogsoderivedgrace-stamp flags stay locked when "Unlock read-only flags" is checked,unsetFlagclearsderivedFlagsClearedWith(key)in the draft preview, andunlockedresets when reopening the dialog.✅ Checklist
Testing
Added unit tests for
mergeOrgFeatureFlagsinapps/webapp/test/storedOrgFlags.test.tscovering mixed valid/invalid/unknown org flags and non-object inputs.Changelog
Parse stored org feature flags key-by-key in
mergeOrgFeatureFlagsand keep derived grace-stamp flags locked inFeatureFlagsDialog.