-
Previous Value Current Value Workspace web terminal does not copy TUI text or paste clipboard text into Codex
Workspace web terminal clipboard copy and paste fail with basic shell commands
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
17.0.0
|
| Labels |
No labels
|
Issue Votes (0)
Summary
In OneDev 17.0.0, the Workspace web terminal does not handle a terminal application's OSC 52 clipboard write. Pressing Ctrl+V can also reach the application as byte
0x16instead of pasting browser clipboard text. These cases can be tested with onlytmux,printf, and Python. No third-party TUI is needed.Reproduce clipboard copy
Open a Workspace terminal in the OneDev web UI. OneDev starts its Workspace shell inside tmux.
Run these commands in that terminal:
The OSC 52 payload is the UTF-8 text
ONEDEV-CLIPBOARD-TEST.Paste into a normal browser text field outside the terminal.
Expected: the text field receives
ONEDEV-CLIPBOARD-TEST.Actual: the browser clipboard is not updated. The Workspace terminal code does not load xterm.js's ClipboardAddon or register an OSC 52 handler. The test uses tmux passthrough to send OSC 52 to the browser terminal without relying on an application's copy implementation.
Reproduce text paste
Copy the literal text
PASTE-TESTfrom this issue into the browser clipboard.In the Workspace web terminal, run:
Press Ctrl+V once.
Expected:
first byte: 50, the UTF-8 byte forPin the copied text.If the terminal sends the key as a control character instead, the output is
first byte: 16. This was observed in an isolated browser run of OneDev's bundled xterm.js. The full Workspace web page and different browser/OS combinations still need verification.Code location
server-core/src/main/java/io/onedev/server/web/component/terminal/terminal.jsloads only the Fit and WebGL addons. Itsxterm.onDatacallback forwards terminal input asSHELL_INPUTwithout clipboard-specific handling. The output path decodesSHELL_OUTPUTand writes it to xterm.js.The
terminal.jsbundled in the deployed OneDev 17.0.0 server was byte-for-byte identical to upstream main when checked on 2026-11-15.