Repository navigation
perf(ui): evaluate retaining the sidebar mounting budget - #1188
Draft
benvinegar wants to merge 1 commit into
Draft
benvinegar wants to merge 1 commit into
benvinegar wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
benvinegar
marked this pull request as ready for review
October 14, 2026 13:31
Contributor
|
benvinegar
marked this pull request as draft
October 14, 2026 14:35
This branch has not been deployed
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.
Status: experiment not validated for shipping
Do not merge this as the navigation latency fix. Follow-up confidence testing recovers the cold test-renderer result but does not establish a compiled-CLI responsiveness benefit. This candidate should be withdrawn or reworked, rather than promoted on the benchmark result alone. Returned to draft after these tests.
Proposed policy
The candidate separates the sidebar's mounted-row allocation budget from its measured visible viewport, retaining a terminal-height minimum mounting budget. Actual pane height still governs visibility and selected-row reveal; other planner callers retain their existing default.
This preserves #1085's correctness changes, but correctness and boundedness do not by themselves justify the allocation policy. No protocol, original benchmark, threshold or accepted-regression setting changes.
What the original benchmark established
The unchanged benchmark, 16 sequential AB/BA samples per revision on Bun 1.4.2, recovered
hunk_nav_press_p95_msfrom 43.58 to 36.11 ms (−17.14%), using its existing nearest-rank aggregation.#1085 publishes the measured sidebar height of 24 in a 28-row terminal, shrinking the initial mounted window from 32 entries to 28. The six timed selected files remain visible: traces show no viewport notifications, reveal retries or sidebar scrolls during those presses. Much measured time is in the deferred
actflush. An accurate smaller initial estimate did not fully recover performance, and disabling Bun DFG/FTL eliminated the candidate's advantage. The exact lower-level mechanism remains unproven; startup row destruction alone is not an established root cause.Follow-up confidence tests
Clean frozen worktrees: pre-#1085
08c3da70, mainab300399, candidatec8bfddad. Same dependencies and Bun 1.4.2. Each revision received 16 renderer runs and 16 compiled-binary PTY runs, sequentially with all revision-pair orderings balanced 8/8. No concurrent tests/builds and no excluded primary samples. Existing benchmark files remain unchanged.The added renderer probe tests six cold presses, 100 warmup presses, adjacent visible files, 50-file forward/backward crossings, hunk/file navigation and 40-key batches. Its cold result reproduces the gap: pre/main/candidate 36.24 / 44.43 / 36.29 ms. Warmed inside-window hunk p95s are 19.63 / 19.10 / 18.87 ms; other warmed results are smaller and mixed.
The compiled artifacts use the repository's unmodified shipping
build:binpath. They review a real 180-file Git diff in a 240×28 PTY. Timing starts before input delivery and ends at an observed native synchronized-output frame containing the requested header and code. No polling or idle/fixed-sleep delay is included in this interval. Held tests deliver keys independently at 30 Hz and retain every input's progress latency. Each app is awaited through exit before the next run.Compiled CLI input-to-observed-frame results
Conventional median of 16 session p95s, ms. Positive change is slower. This aggregation differs from the original benchmark runner's lower-middle convention.
These results do not establish a consistent product-level improvement. Most nominal paired-bootstrap intervals span zero. The approximately 17–23% cold-renderer gap does not reproduce as cold compiled-CLI first-paint latency in this fixture; that does not rule out costs in other workflows.
Pre-#1085 batches are not a correctness-parity comparator because its stale-bounds reveal can leave selection offscreen. Four additional strict sessions per main/candidate required the selected sidebar marker together with the target header and code. In all 2,736 press/batch requests, the first observed target-main frame already included the visible sidebar selection. Strict held sequences also crossed the window edge successfully. A separate framing audit found no combined or partial-next-frame chunks in 962 observed native frames. Measurements are PTY-output observations, not physical display scanout.
Work-count evidence
Separate temporary instrumentation, excluded from performance samples and removed afterward, counts React/sidebar/window/file-row renders, row identities/destruction, viewport updates, reveals/scrolls and native layouts.
Thus the demonstrated change is startup retention and a permanently larger row set—not reduced steady navigation work. The retention regression test enforces that policy, not a product performance guarantee.
Correctness and scope
After restoring all instrumentation, fresh checks pass:
bun run typecheck,git diff --check: pass; tracked worktrees clean.Earlier full validation of this commit remains: 2,418 unit passes/3 skips; 263 integration passes plus the known comment-target failure reproduced on unchanged main; 11 TTY smoke passes; lint, dependency and format checks passed. Those full suites were not rerun during this follow-up. No assertions or skips were weakened. macOS/Windows were not tested locally.
Raw distributions, scripts, hashes, counter patches, bootstrap intervals and fresh logs are retained locally under
/home/bentlegen/Projects/hunk-sidebar-fix/tmp/sidebar-navigation-confidence/; the detailed report isCONFIDENCE.md. Original investigation evidence remains undertmp/sidebar-navigation-regression/. These artifacts are ignored and uncommitted.No follow-up source commit/push, merge, tag, installation or publication was performed. The release worktree remains clean on
release/0.24.0-beta.1. Related release preparation: #1187.This PR description was generated by Pi using GPT-6.1 (gpt-6.1-sol)