[PR #16903] [CLOSED] chore: prevent static files deletion when frontend build does not exist #11073

Closed
opened 2025-11-11 19:21:27 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16903
Author: @DmitriyAlergant
Created: 8/25/2025
Status: Closed

Base: devHead: fix/prevent-static-deletion-without-build


📝 Commits (2)

  • 407dc9a Merge pull request #16507 from open-webui/dev
  • c4cef0c fix: prevent static file deletion when frontend build directory doesn't exist

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/open_webui/config.py (+1 -1)

📄 Description

When running in development mode (npm run dev + dev.sh), if the frontend build directory does not yes exist, the backend was is deleting static files (mostly PNGs) during startup and not restoring them. This complicates git version control, showing this files deletion as a change (which is unwanted).

Pull Request Checklist

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • [n/a] Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title

Changelog Entry

Fixed

  • Fixed config.py, added a check that the frontend build directory exists before proceeding with static files deletion. This only affects development experience and should not make impact for production.

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/16903 **Author:** [@DmitriyAlergant](https://github.com/DmitriyAlergant) **Created:** 8/25/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/prevent-static-deletion-without-build` --- ### 📝 Commits (2) - [`407dc9a`](https://github.com/open-webui/open-webui/commit/407dc9a401fc2382df06d776dbd8ba95dffda38a) Merge pull request #16507 from open-webui/dev - [`c4cef0c`](https://github.com/open-webui/open-webui/commit/c4cef0c5a3dffe008d5dc700533f04dd02155736) fix: prevent static file deletion when frontend build directory doesn't exist ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+1 -1) </details> ### 📄 Description When running in development mode (npm run dev + dev.sh), if the frontend build directory does not yes exist, the backend was is deleting static files (mostly PNGs) during startup and not restoring them. This complicates git version control, showing this files deletion as a change (which is unwanted). # Pull Request Checklist - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [n/a] **Testing:** Have you written and run sufficient tests to validate the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title # Changelog Entry ### Fixed - Fixed config.py, added a check that the frontend build directory exists before proceeding with static files deletion. This only affects development experience and should not make impact for production. ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 19:21:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#11073