Repository navigation
Conversation
…tart (#439) A frame re-projected and re-wrapped the whole conversation, so its cost grew with transcript length. Committed messages now keep their wrapped rows, and a frame copies only the visible ones. An 80x24 frame with a 100,000-line answer goes from about 90 ms to about 1.1 ms in a debug build. A kept row is rebuilt when the message's displayed content, the width or the appearance changes. That is decided by comparing content rather than through a change counter, since App::messages is written from many places and a missed signal would show stale text. Live output and tool rows are still built every frame. Alt+G (jumpToStart, Next only) goes to the start of the transcript. Classic leaves the chord unbound.
…hanges (#439) The review found the original cost remained while an answer streamed: an 80x24 frame with 100,000 live lines still took about 94 ms. The complete lines of the streaming answer now keep their rows and only the unfinished line is rebuilt, so that frame takes about 1.2 ms in a debug build. Alt+G could land at the bottom when nothing had been measured, and a resize moved the reader off the first row. The reader now stays at the start until it scrolls down, through resizes and new output. Each frame still compares every message with the source of its rows and still builds tool rows, and the kept sources hold a second copy of the conversation's text. The earlier commit message and code comment overstated this; the comment is corrected here.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
Context
mainas the stack lands.Measurements
Debug build, one developer machine, 80x24 frame. These are observations printed by
next_workload.rs, not gates.The first frame after a width or appearance change still builds every row once.
What still grows
The review measured these on the first commit, before the streaming change; the committed-message path they measure did not change.
/clear.Design
TranscriptRowskeeps wrapped rows per message. A message is rebuilt when its displayed content, the width or the appearance changes.App::transcript_version.App::messagesis public and written from many places, some of which do not bump the counter, and a missed signal would show wrong text.terminal_safeworks one character at a time, so chunking gives the same rows; a test checks this at several chunk sizes with hostile bytes.jumpToStartholds the reader at the first row through resizes and new output until it scrolls down. "New activity below" still shows.Verification
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace: 2944 passed, 0 failedIndependent review
A fresh reviewer read
14bad5band probed it with an out-of-tree test crate. It found no stale-row, ordering,terminal_safe, panic or Classic defects. Resolved in the second commit:Left as is: Alt+G on a short transcript shows "scrolled up", the same as PageUp does. A selection survives Alt+G, as with every keybinding action.
Risk and Rollback
alt+gdefault binding goes with it.