[PR #22932] [CLOSED] fix : missing edit button and empty save for markdown in terminal file #49981

Closed
opened 2026-04-30 02:26:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22932
Author: @nehaaprasad
Created: 3/22/2026
Status: Closed

Base: mainHead: fix/mrk-edi-miss-opn-ter-pan


📝 Commits (1)

  • 1872ec7 fix missing edit button and empty save for markdown in terminal file panel

📊 Changes

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

View changed files

📝 src/lib/components/chat/FileNav.svelte (+3 -1)

📄 Description

Description

  • Terminal file panel: markdown was treated as a code file for the toolbar, so the Edit button was hidden and Save used saveCodeFile() without a mounted CodeMirror editor, which could overwrite the file with empty content. This PR uses isPreviewFormat / isCodeEditorFile so preview-first types use the textarea edit/save flow.

Added

  • isPreviewFormat and isCodeEditorFile in FileNav.svelte.

Changed

  • Toolbar Save for code files uses isCodeEditorFile instead of isCode.

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • Missing Edit control for markdown (and other preview-first types) in the terminal file panel.
  • Save overwriting markdown with empty content.

Security

  • N/A

Breaking Changes

  • BREAKING CHANGE: N/A

Additional Information

  • Fixes issue with terminal file browser when opening .md files (pip install / Windows reported in original report).

Screenshots or Videos

  • [Optional: add before/after screenshots]

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/22932 **Author:** [@nehaaprasad](https://github.com/nehaaprasad) **Created:** 3/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/mrk-edi-miss-opn-ter-pan` --- ### 📝 Commits (1) - [`1872ec7`](https://github.com/open-webui/open-webui/commit/1872ec75ca3005ace74e17ee3e24e069d8e71950) fix missing edit button and empty save for markdown in terminal file panel ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/FileNav.svelte` (+3 -1) </details> ### 📄 Description ### Description - Terminal file panel: markdown was treated as a code file for the toolbar, so the Edit button was hidden and Save used `saveCodeFile()` without a mounted CodeMirror editor, which could overwrite the file with empty content. This PR uses `isPreviewFormat` / `isCodeEditorFile` so preview-first types use the textarea edit/save flow. ### Added - `isPreviewFormat` and `isCodeEditorFile` in `FileNav.svelte`. ### Changed - Toolbar Save for code files uses `isCodeEditorFile` instead of `isCode`. ### Deprecated - N/A ### Removed - N/A ### Fixed - Missing Edit control for markdown (and other preview-first types) in the terminal file panel. - Save overwriting markdown with empty content. ### Security - N/A ### Breaking Changes - **BREAKING CHANGE**: N/A --- ### Additional Information - Fixes issue with terminal file browser when opening `.md` files (pip install / Windows reported in original report). ### Screenshots or Videos - [Optional: add before/after screenshots] ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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 2026-04-30 02:26:05 -05: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#49981