feat: add scrollback buffer and scroll wheel support to embedded terminal#349
Merged
Conversation
…inal Wire GPUI ScrollWheelEvent to alacritty_terminal's scroll_display() via a hitbox-based mouse event listener in TerminalElement. Supports both trackpad (pixel deltas) and mouse wheel (line deltas). Add a "Scrollback" badge at top-right when scrolled up from bottom so users know they're viewing history. The badge disappears when scrolled back to bottom. The 10,000-line scrollback buffer was already provided by TermConfig::default() — this change just adds the scroll UI. Closes #311
Owner
Author
PR Review SummaryReviewed by: code-reviewer, silent-failure-hunter, comment-analyzer, pr-test-analyzer Critical Issues (0 found)None. Important Issues (0 found)None. The code reviewer flagged handler registration in Suggestions (1 found)
Strengths
Error Handling Assessment
Comment Quality
Test Coverage
VerdictREADY TO MERGE Recommended Actions
|
Paint a thin accent bar when badge text rendering fails so the user still gets a visible "scrolled up" indicator.
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.
Summary
ScrollWheelEventto alacritty_terminal'sscroll_display()via hitbox-based mouse event listener inTerminalElementThe 10,000-line scrollback buffer was already provided by
TermConfig::default()— this adds the scroll UI to make it accessible.Closes #311
Test plan
seq 200, scroll wheel up — earlier lines visible