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
Confirmed present in v0.7.0-rc. Accepted for this release — cosmetic, and it self-corrects.
Symptom
On restore, the input line in a Claude pane is drawn about one character into the placeholder text, so the leading character of the placeholder survives (e.g. Thi there typed into Try "how do I log an error?"). Text elsewhere can also wrap oddly mid-line.
Resizing the window, or changing layout, fixes every pane immediately.
What we know
That resize detail is the clue. A resize fires the page's ResizeObserver → fitAddon.fit() → a new column count → term.onResize → the PTY is resized. So the correction is a column-count change, which means at startup xterm and the PTY disagree about the width. Claude wraps its placeholder at one column while xterm draws at another, and the offset follows.
What it is NOT — two theories already disproved
Recording these so nobody re-treads them:
Font loading.fix(terminal): re-fit once the font has loaded, not on a timing guess #113 added a re-fit on document.fonts.ready, on the theory that xterm measured the fallback font's advance width before Cascadia Code loaded. It was a no-op.document.fonts.ready resolves once at page load and stays resolved, so the callback ran immediately with the same metrics.
document.fonts.load(). Also a no-op here: it only matches CSS-connected FontFace objects, i.e. @font-face rules. There are none — the fonts in play are OS-installed — so it resolves having matched nothing.
The setTimeout(50) / setTimeout(250) fits in terminal-init.js are what currently correct the separate 0×0-container case, and they do not fix this.
Suggested next step: measure, don't theorise
Two guesses have already been wrong. The decisive probe is small — log both sides and compare:
In terminal-init.js, on every fit() and every term.onResize, log the resulting cols/rows.
In TerminalBridge, log the cols/rows the PTY is actually set to, with the session name.
If they diverge, the log shows exactly when and which side is stale. If they agree, the cause is elsewhere and both remaining theories die.
One specific thing worth checking in that data: term.onResize only fires when dimensions change. If the PTY is started from a stale TerminalSize and a later fit() happens to compute the same cols xterm already had, no resize message is sent and the PTY keeps the wrong width indefinitely — which would match "only an external resize fixes it".
Confirmed present in v0.7.0-rc. Accepted for this release — cosmetic, and it self-corrects.
Symptom
On restore, the input line in a Claude pane is drawn about one character into the placeholder text, so the leading character of the placeholder survives (e.g.
Thi theretyped intoTry "how do I log an error?"). Text elsewhere can also wrap oddly mid-line.Resizing the window, or changing layout, fixes every pane immediately.
What we know
That resize detail is the clue. A resize fires the page's
ResizeObserver→fitAddon.fit()→ a new column count →term.onResize→ the PTY is resized. So the correction is a column-count change, which means at startup xterm and the PTY disagree about the width. Claude wraps its placeholder at one column while xterm draws at another, and the offset follows.What it is NOT — two theories already disproved
Recording these so nobody re-treads them:
document.fonts.ready, on the theory that xterm measured the fallback font's advance width before Cascadia Code loaded. It was a no-op.document.fonts.readyresolves once at page load and stays resolved, so the callback ran immediately with the same metrics.document.fonts.load(). Also a no-op here: it only matches CSS-connectedFontFaceobjects, i.e.@font-facerules. There are none — the fonts in play are OS-installed — so it resolves having matched nothing.The
setTimeout(50)/setTimeout(250)fits interminal-init.jsare what currently correct the separate 0×0-container case, and they do not fix this.Suggested next step: measure, don't theorise
Two guesses have already been wrong. The decisive probe is small — log both sides and compare:
terminal-init.js, on everyfit()and everyterm.onResize, log the resultingcols/rows.TerminalBridge, log thecols/rowsthe PTY is actually set to, with the session name.If they diverge, the log shows exactly when and which side is stale. If they agree, the cause is elsewhere and both remaining theories die.
One specific thing worth checking in that data:
term.onResizeonly fires when dimensions change. If the PTY is started from a staleTerminalSizeand a laterfit()happens to compute the same cols xterm already had, no resize message is sent and the PTY keeps the wrong width indefinitely — which would match "only an external resize fixes it".Related
0x0container case that thesetTimeoutfits cover is a different problem with a similar symptom; don't conflate them.