fix: read DISPLAY_FEEDBACK_WIDGET from getConfig instead of process.env#552
Open
eemaanamir wants to merge 1 commit intoopenedx:release/teakfrom
Open
fix: read DISPLAY_FEEDBACK_WIDGET from getConfig instead of process.env#552eemaanamir wants to merge 1 commit intoopenedx:release/teakfrom
eemaanamir wants to merge 1 commit intoopenedx:release/teakfrom
Conversation
This was referenced Feb 20, 2026
arbrandes
requested changes
Mar 2, 2026
Contributor
arbrandes
left a comment
There was a problem hiding this comment.
Besides the requested change, do you mind submitting this PR to master so we can merge it there first?
| import { getConfig } from '@edx/frontend-platform'; | ||
|
|
||
| const lightning = () => { | ||
| if (getConfig().DISPLAY_FEEDBACK_WIDGET === "true") { |
Contributor
There was a problem hiding this comment.
This is technically correct, but the problem is that with getConfig the operator can also supply a boolean. Best to handle both cases (such as is done elsewhere):
Suggested change
| if (getConfig().DISPLAY_FEEDBACK_WIDGET === "true") { | |
| if (getConfig().DISPLAY_FEEDBACK_WIDGET.toString().toLowerCase() === "true") { |
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.
Summary
This PR updates the feedback widget initialization to read
DISPLAY_FEEDBACK_WIDGETfrom the runtime configuration (getConfig()) instead of directly fromprocess.env.Problem
Previously, the value was read using:
This makes the flag build-time only, meaning it cannot be overridden dynamically in Tutor-based deployments.
As a result, when patching or overriding environment variables via Tutor, the value would not change unless the MFE was rebuilt.
Root Cause
process.envvalues are inlined at build time by Webpack. In Open edX MFEs, deploy-time configuration is expected to be accessed via:Using
process.envdirectly prevents runtime overrides and breaks Tutor patching behavior.Fix
Replaced:
With:
This aligns with standard Open edX MFE configuration patterns and allows the flag to be properly overridden in Tutor environments.
Impact