Skip to content

tui: repaint transcript on resize and drop viewport shift heuristic - #11896

Closed
dagelf wants to merge 1 commit into
openai:mainfrom
dagelf:main
Closed

dagelf wants to merge 1 commit into
openai:mainfrom
dagelf:main

Conversation

@dagelf

@dagelf dagelf commented Feb 16, 2026

Copy link
Copy Markdown

The viewport shift heuristic only works if the viewport is enlarged, but corrupts it if its reduced. This works perfectly, every time, and reuses existing code.

Potentially fixes:
#5576
#5259
#3464

@github-actions

github-actions Bot commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dagelf

dagelf commented Feb 16, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Feb 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fda682f1e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/app.rs
}
}

tui.insert_history_lines(display);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear pending history queue before replaying on resize

tui.insert_history_lines(display) appends replayed transcript lines to Tui::pending_history_lines, but this resize path never clears any already-queued history lines first. Since AppEvent::InsertHistoryCell also enqueues into that same buffer and it is only drained later in Tui::draw (tui.rs), resizing between enqueue and draw will emit those newest cells twice, so users can see duplicated transcript chunks after a resize (common during streaming output).

Useful? React with 👍 / 👎.

@dagelf dagelf Feb 16, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is purely presentation layer and it requires deeper refactoring and its so timing sensitive the chances of it happening is almost zero.

Compared to the current situation where that the screen is completely corrupted on most resize operations, this is a non-issue for this PR which improves the situation from terrible to perfect.

My suggestion is to address this in a future PR

@etraut-openai

Copy link
Copy Markdown
Contributor

We've updated our contribution guidelines to indicate that we're no longer accepting unsolicited code contributions. All code contributions are by invitation only. To read more about why we've taken this step, please refer to this announcement.

@dagelf

dagelf commented Feb 16, 2026

Copy link
Copy Markdown
Author

Presentation is important - its why Apple is successful.

This is an issue that's been frustrating many users for weeks now, please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants