NEXT_PUBLIC_ variables are a lazy developer hack #12547

Closed
opened 2026-02-21 19:07:55 -05:00 by yindo · 5 comments
Owner

Originally created by @DavideDelbianco on GitHub (Apr 4, 2025).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Injecting configuration variables in the DOM using those NEXT_PUBLIC_ variables just to avoid restarting the Docker image during development time is increasing the amount of non-necessary variables in HTML and also led to two PR where the "contributor" did not understand what he was copying and the code submitted is not working.

2. Additional context or comments

#15964
#16805

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @DavideDelbianco on GitHub (Apr 4, 2025). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Injecting configuration variables in the DOM using those NEXT_PUBLIC_ variables just to avoid restarting the Docker image during development time is increasing the amount of non-necessary variables in HTML and also led to two PR where the "contributor" did not understand what he was copying and the code submitted is not working. ### 2. Additional context or comments #15964 #16805 ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo closed this issue 2026-02-21 19:07:55 -05:00
Author
Owner

@crazywoola commented on GitHub (Apr 6, 2025):

I don't remember why we add those variables at the first place, I will check it with our frontend developers later.

Thanks for the feedback again :)

@crazywoola commented on GitHub (Apr 6, 2025): I don't remember why we add those variables at the first place, I will check it with our frontend developers later. Thanks for the feedback again :)
Author
Owner

@DavideDelbianco commented on GitHub (Apr 6, 2025):

In the linked PRs there's a passive-aggressive explanation of why the code submitted does not work.
It's not that I don't know how to write in English, I'm just tired of untested code being submitted and merged in the repo that's used for paying customers too.

Sometimes they don't harm the project (like those 2 PRs) sometimes they do.

I could have fixed it, instead of explaining why it is wrong, but i think it is better to point out the error and have the author fix their mistake (if they will ever come back to the repo to fix it) otherwise they think they did good and continue to spread garbage contributions to open source projects

@DavideDelbianco commented on GitHub (Apr 6, 2025): In the linked PRs there's a passive-aggressive explanation of why the code submitted does not work. It's not that I don't know how to write in English, I'm just tired of untested code being submitted and merged in the repo that's used for paying customers too. Sometimes they don't harm the project (like those 2 PRs) sometimes they do. I could have fixed it, instead of explaining why it is wrong, but i think it is better to point out the error and have the author fix their mistake (if they will ever come back to the repo to fix it) otherwise they think they did good and continue to spread garbage contributions to open source projects
Author
Owner

@dosubot[bot] commented on GitHub (May 8, 2025):

Hi, @DavideDelbianco. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • Concerns raised about the use of NEXT_PUBLIC_ variables to avoid Docker restarts during development.
  • This practice has led to confusion and non-functional code submissions.
  • Two related pull requests (#15964 and #16805) highlight the issue.
  • Crazywoola plans to discuss the matter with frontend developers.
  • Emphasis on addressing these errors to prevent poor contributions.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting on this issue.
  • If no further input is provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (May 8, 2025): Hi, @DavideDelbianco. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary** - Concerns raised about the use of `NEXT_PUBLIC_` variables to avoid Docker restarts during development. - This practice has led to confusion and non-functional code submissions. - Two related pull requests (#15964 and #16805) highlight the issue. - Crazywoola plans to discuss the matter with frontend developers. - Emphasis on addressing these errors to prevent poor contributions. **Next Steps** - Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting on this issue. - If no further input is provided, the issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@DavideDelbianco commented on GitHub (May 8, 2025):

I still believe those env variables are being added to the web frontend for the reason I've already explained

@DavideDelbianco commented on GitHub (May 8, 2025): I still believe those env variables are being added to the web frontend for the reason I've already explained
Author
Owner

@dosubot[bot] commented on GitHub (May 8, 2025):

@crazywoola, the user @DavideDelbianco has indicated that the issue regarding the use of NEXT_PUBLIC_ variables in the web frontend is still relevant. Could you please assist them with this matter?

@dosubot[bot] commented on GitHub (May 8, 2025): @crazywoola, the user @DavideDelbianco has indicated that the issue regarding the use of `NEXT_PUBLIC_` variables in the web frontend is still relevant. Could you please assist them with this matter?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12547