Repository navigation
Fix History opening in large REPL windows - #1222
Merged
Merged
Conversation
PR #1222: Fix History opening in large REPL windows3 files, +272 / -7 Scope✅ PR scope looks good. Structural✅ No structural bloat detected. Slop✅ Slop indicators look low. Static AnalysisOxlint: 5 diagnostics across 1 file (1 rule) no-shadow (5): packages/cli/src/repl/layout.ts CorrectnessNo extraneous code patterns detected. |
taras
marked this pull request as ready for review
November 10, 2026 04:10
taras
enabled auto-merge
November 10, 2026 04:10
Every History row is a control padded with spaces to the drawer's width, and each reached the engine as one text: a distinct label carrying a long run of empty words. Sixty settled entries at a tall window exhausted the engine's measured-word storage while History opened, so the click refused instead of showing the drawer (#1220). History controls now emit the label and its trailing spaces as two texts in the same element, with the same colour and attributes, so identical padding shares one measurement. The bytes, widths, styles and viewport admission are unchanged. Regressions cover opening from the control at 316x120, padded cells and fresh restoration, and a cold 60-entry journey. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
taras
force-pushed
the
codex/repl-history-capacity
branch
from
November 10, 2026 04:20
c111b9a to
82b7861
Compare
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.
Why
Clicking History in a large REPL window could crash before the drawer appeared with
TEXT_MEASUREMENT_CAPACITY_EXCEEDED, even after the drawing engine rebuilt. Fixes #1220.The saved 79-entry session reproduces this at 316×80. The same public History reproduction also fails with the old published tty 0.9.0 engine: this is a separate padding-capacity defect, and the earlier cache-identity repair remains necessary.
What changes
Before: every distinct History label was measured together with a long suffix of spaces filling its clickable row. Enough visible rows exhausted the measured-word cache.
After: History controls draw each label and its trailing ASCII spaces as separate text operations. Identical padding can share its measurement. Their concatenation, colours, attributes, full-width targets and navigation remain the same. The existing viewport, cache capacity, renderer recovery and vendor runtime keep their current behavior.
The production change is confined to
layout.ts’s existingwrittenpath. No public shape or dependency changes.How to verify it
Signed current head:
82b78619c89e182e50ea6896c543926142bebf1f, rebased onto Main220e54f86dd3698311ee57e660afd00b3e3bc2e1. The patch is identical by range-diff to the reviewed signed feedbackc111b9a06418be180059493539341c9874e76d91. Setup and all six frozen focused checks passed again at the rebased head.The first failing outputs are retained. Required CI owns the exhaustive cross-runtime suites. This source-only change moves no dependency state;
verify:cleanwas not rerun.Planner and independent Fable reviews both PASS on exact rebased head
82b78619c89e182e50ea6896c543926142bebf1f, with no blocking findings. Required CI passed: 61 successful jobs and one expected skip, includinggreenandmain-green. Main health was restored before merging; unchanged-source flake evidence is recorded in #1143 and #1200, both still open.Merged as
2bc5ef29b2966af27c7ba292dd42a759f6f69f79; its tracked tree equals the reviewed and CI-tested head.Scope confirmation