You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Vrajs16! This is a terminal sizing issue with xterm.js — the FitAddon calculates the terminal's column count once at mount time via addonFit.fit()[1], but there's no ResizeObserver or window resize handler to recalculate when the container dimensions change. This means the cols value goes stale, so the cursor position wraps incorrectly and new characters overwrite existing text instead of advancing.
A closed PR (#1135) addressed exactly this — it added a ResizeObserver to re-call addonFit.fit() on container resize and synchronized the updated cols/rows to the backend PTY via WebSocket [2]. It was never merged, but it serves as a good reference.
To fix this in docker-terminal.tsx, you'd need to:
Add a ResizeObserver that calls addonFit.fit() when the container size changes.
Send the new dimensions to the server via the WebSocket so the backend PTY resizes to match.
The server-side (docker-container-terminal.ts) would also need to handle a resize message to call pty.resize(cols, rows). PR #1135's diff has the full implementation you can use as a starting point [2].
Activity
linear-code commentedon Aug 15, 2026
DOK-642
dosubot commentedon Aug 15, 2026
Hi @Vrajs16! This is a terminal sizing issue with xterm.js — the
FitAddoncalculates the terminal's column count once at mount time viaaddonFit.fit()[1], but there's noResizeObserveror window resize handler to recalculate when the container dimensions change. This means thecolsvalue goes stale, so the cursor position wraps incorrectly and new characters overwrite existing text instead of advancing.A closed PR (#1135) addressed exactly this — it added a
ResizeObserverto re-calladdonFit.fit()on container resize and synchronized the updatedcols/rowsto the backend PTY via WebSocket [2]. It was never merged, but it serves as a good reference.To fix this in
docker-terminal.tsx, you'd need to:ResizeObserverthat callsaddonFit.fit()when the container size changes.A minimal client-side addition would look like:
The server-side (
docker-container-terminal.ts) would also need to handle a resize message to callpty.resize(cols, rows). PR #1135's diff has the full implementation you can use as a starting point [2].To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
Merge pull request #5104 from Dokploy/fix/issue-5092-terminal-resize-…
fix: sync terminal size with backend PTY, avoid connecting with place…
Merge pull request Dokploy#5104 from Dokploy/fix/issue-5092-terminal-…
Merge upstream v0.30.2 into main
chore(release): 0.42.0 [skip ci]