Repository navigation
fix: four more upstream ports — OSC-8 across resize, mobile timestamps, and two hot-path walks - #371
Merged
Merged
Conversation
Cold restore seeded a checkpoint's OSC-8 link ranges and then replayed records that resize, so any resize record after the checkpoint dropped them and restored hyperlinks in scrollback lost clickability. Same-size resize records reach the durable log routinely, because every attach re-asserts the pane's dimensions and session-output-plane records each one without a same-size dedupe — so an ordinary reattach was enough to lose the links. Restored ranges are row-indexed, so clearing them on a reflow is right; a resize to the size already applied is not a reflow. Gate on the dimensions actually changing. Introduced in d46349c ("fix: improve mobile link modifier handling", #5597), which added setRestoredOscLinks along with unconditional clearing in both resize() and clearScrollback(). clearScrollback's clearing is correct and is unchanged, with a test pinning it. Found during adversarial review of #17752 and filed as #17756. Not a regression from that PR: #17667 had incidentally masked it by gating no-op resizes to protect a snapshot cache, and removing the cache removed the gate. The same gate returns here on its own terms — as a correctness fix with tests, rather than as a side effect of a cache. (cherry picked from commit ae35e04)
…17731) Co-authored-by: Claude <[email protected]> Co-authored-by: Jinwoo-H <[email protected]> (cherry picked from commit c300913)
…pstream #19214) Port de la idea de stablyai/orca#19214. Dos call sites del redraw seguian con `line.replace(/[ \t]+$/g, '')`: el `+` anclado hace que el motor retroceda sobre la corrida de padding por cada posicion de inicio que prueba, o sea tiempo cuadratico en una fila que un TUI rellena hasta el ancho de la ventana. Y un redraw a pantalla completa trimea CADA fila retenida en cada frame. No hace falta traer nada: nuestro `trimTerminalLineRight` (orca-runtime.ts:39163) ya camina la cadena y es identico al de upstream, solo que esos dos sitios nunca lo usaron. El diff son dos lineas. El test de upstream no se trae: importa `terminal-tail-buffer` y `terminal-tail-line-controls`, dos modulos que extrajo despues de nuestra divergencia, y nuestro helper es privado del monolito. Sin cambio de comportamiento —las dos implementaciones son equivalentes, leidas lado a lado— y los 4554 tests de `src/main/runtime` que cubren ese camino siguen verdes. La medicion de la mejora es de upstream, no mia.
…eam #19400) Port de stablyai/orca#19400 a nuestro monolito. `containsTerminalVerticalLineControl` corre una vez por chunk de PTY, en el main thread, para CADA terminal —visible, oculta o aparcada— y caminaba la cadena posicion por posicion. Solo un ESC puede introducir un control vertical, asi que para salida ordinaria (logs de build, `cat`, texto por pipe) el walk entero es trabajo tirado. Nuestra version era incluso mas lenta que la de upstream ANTES de su fix: leia `value[index]`, que crea un string de un caracter por posicion. Ahora salta con `indexOf` de ESC en ESC, conservando el skip de `parsed.endIndex` en el cuerpo. 4554 tests de `src/main/runtime` en verde, sin cambio de comportamiento.
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 15, 2026
…ntries (#28990) * fix(layout): drop the pre-tab-bar session migration; orphan adoption writes tab-bar entries The window and main's Loader now both ignore sessions saved before the tab bar (pre-#371). Orphan adoption, the one present-day writer that saved terminal rows without tab-bar entries, now writes them through the shared serializer. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: drop the pre-tab-bar case from terminal tab id hydration It exercised only the deleted converter; the tab-bar case above covers the live rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth slice. #368, #369 and #370 carry the first eleven; these four are the cheapest remaining items from the sweep of what upstream has already merged.
ae35e044f2c300913f90formatCommitTimemultiplied ×1000 a timestamp already in milliseconds, so every relative commit time in the phone's history is wrong by a factor of 10002ccf35b135replace(/[ \t]+$/g, '')373a670abacontainsTerminalVerticalLineControlwalked every code unit of every chunkThe mobile one carried a test that hid it
c300913f90is the only fully clean cherry-pick out of the 89 candidates the sweep verified, and it fixes a live bug:git-history-log-parser.tsproducesauthorDateSeconds * 1000(milliseconds), andmobile-git-history.tsthen didnowMs - timestampSeconds * 1000.Our own test encoded the wrong unit (
timestamp: NOW / 1000 - 3600), so it passed green while production was broken. The upstream patch corrects code and test together — which is why this one is worth taking as-is rather than hand-fixing the multiply.The two walks
2ccf35b135— an anchored+makes the engine backtrack across the padding run for every start position it tries, so a row a TUI padded to the window width costs quadratic time, and a fullscreen redraw trims every retained row per frame. Nothing needed importing: ourtrimTerminalLineRight(orca-runtime.ts:39163) already walks the string and is identical to upstream's — those two call sites simply never used it. Upstream's test is not brought: it imports two modules extracted after our divergence, and our helper is private to the monolith.373a670aba— this runs once per PTY chunk, on the main thread, for every terminal, visible or not. Only ESC can introduce a vertical control, so for ordinary output the whole walk is wasted. Ours was slower than upstream's pre-fix version: it readvalue[index], minting a one-character string per position. Now it jumps ESC to ESC withindexOf, keeping theparsed.endIndexskip in the body.Both perf numbers in those commit messages are upstream's measurements, not mine — what I verified here is that the code paths are ours and that behaviour is unchanged.
Tests
4554
src/main/runtime, 4305 terminal-pane, 194 mobile source-control. Gates: max-lines OK,check:test-case-deletionOK (61786 cases, none lost).