mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #23274] feat: adding open-terminal virtual desktop #50165
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23274
Author: @volkermauel
Created: 3/31/2026
Status: 🔄 Open
Base:
dev← Head:feature-desktop📝 Commits (5)
9d86ac8Add remote desktop (noVNC) viewer to terminal server feature6ec66f5Fix desktop feature detection on initial mount683f126Fix: guard desktop stop state update on stopDesktop successd16bd61feat: integrate grounding model for computer use desktop with bbox coordinate scalingc510045Merge branch 'dev' into feature-desktop📊 Changes
14 files changed (+1617 additions, -14 deletions)
View changed files
📝
backend/open_webui/config.py(+18 -0)📝
backend/open_webui/main.py(+6 -0)📝
backend/open_webui/routers/tasks.py(+12 -0)📝
backend/open_webui/routers/terminals.py(+146 -0)➕
backend/open_webui/test/apps/webui/routers/test_terminals.py(+433 -0)📝
backend/open_webui/utils/middleware.py(+230 -9)➕
src/lib/apis/terminal/desktop.test.ts(+135 -0)📝
src/lib/apis/terminal/index.ts(+63 -0)📝
src/lib/components/admin/Settings/Interface.svelte(+78 -0)📝
src/lib/components/chat/Chat.svelte(+41 -0)📝
src/lib/components/chat/FileNav.svelte(+90 -3)➕
src/lib/components/chat/FileNav/DesktopViewer.svelte(+333 -0)📝
src/lib/components/chat/Messages/Markdown.svelte(+31 -1)📝
src/lib/components/common/Image.svelte(+1 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. PRs targetingmainwill be immediately closed.devto ensure no unrelated commits (e.g. frommain) are included. Push updates to the existing PR branch instead of closing and reopening.Changelog Entry
Description
Added
ws_desktopendpoint at/{server_id}/desktop/ws): Authenticates via JWT query parameter, discovers the websockify port from the terminal server, and performs a bidirectional binary RFB relay between the browser and the terminal server_resolve_desktop_connectionand_fetch_novnc_porthelpers inbackend/open_webui/routers/terminals.pyfor connection resolution and port discovery (falls back to port6080on failure)DesktopStatustype,getDesktopStatus,startDesktop,stopDesktop,getDesktopViewerUrlfrontend API helpers insrc/lib/apis/terminal/index.tsdesktopflag added to theTerminalFeaturestypeDesktopViewer.sveltecomponent: Embeds noVNC in an iframe with a toolbar providing Start/Stop toggle, Refresh, Open in new tab, Fullscreen mode, and a status indicator (connected / starting / stopped). Auto-starts desktop on mount and polls status every 10 secondsFileNav.svelte: Collapsible panel with drag handle appears below the terminal when the terminal server reportsfeatures.desktop === true. Desktop state (enabled/expanded/height) is managed independently from the terminalbackend/open_webui/test/apps/webui/routers/test_terminals.py, 433 lines): Covers path sanitization, noVNC port discovery, HTTP proxy endpoints, desktop status/start, access control, and WebSocket route registrationsrc/lib/apis/terminal/desktop.test.ts, 135 lines): CoversgetDesktopStatus,startDesktop,stopDesktop,getDesktopViewerUrl, andgetPortProxyUrlChanged
src/lib/components/chat/FileNav.svelte: Added desktop feature detection in both the reactive block and theonMountblock to ensure the Desktop panel appears correctly on first load and subsequent chat switchesDeprecated
Removed
Fixed
desktopEnabledwas only set in the reactive block but not inonMount, causing the Desktop panel to not appear on first page loadSecurity
_resolve_desktop_connectionhelper, consistent with the terminal WebSocket proxyBreaking Changes
Additional Information
GET /desktop,POST /desktop/start,POST /desktop/stopendpoints and run websockify for this feature to workdocker compose -f docker-compose.integration.yml up --buildwith both open-webui and open-terminal containers healthyArchitecture
Files Changed
backend/open_webui/routers/terminals.pysrc/lib/apis/terminal/index.tssrc/lib/components/chat/FileNav.sveltesrc/lib/components/chat/FileNav/DesktopViewer.sveltebackend/open_webui/test/apps/webui/routers/test_terminals.pysrc/lib/apis/terminal/desktop.test.tsContributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.