Skip to content

spec: horizontal scrolling per terminal pane (#9828)#10231

Open
lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
lonexreb:spec/9828-horizontal-scroll
Open

spec: horizontal scrolling per terminal pane (#9828)#10231
lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
lonexreb:spec/9828-horizontal-scroll

Conversation

@lonexreb
Copy link
Copy Markdown
Contributor

@lonexreb lonexreb commented May 6, 2026

Spec for #9828. Per-pane horizontal scroll when line-wrap is off and content exceeds pane width. Trackpad swipe, Shift-wheel, and a bottom scrollbar all drive it. Snaps to offset 0 on new output by default. Selection copies logical text.

Closes (spec-only) #9828.

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@lonexreb

I'm starting a first review of this spec-only pull request.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This spec defines per-pane horizontal scrolling for terminal panes when line-wrap is disabled, with trackpad, Shift-wheel, and scrollbar controls.

Concerns

  • The behavior contract does not define how horizontal offsets are clamped or reset when the visible long-line set changes, the pane resizes, line-wrap is toggled, or vertical scroll moves to shorter content.
  • The snap-on-new-output behavior is ambiguous for terminal output patterns like partial line updates, prompt redraws, tailing logs, and alternate-screen/TUI updates.
  • The new snap setting needs a small implementation/discovery note so implementers know where it is exposed and persisted.

Found: 0 critical, 2 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH9828/SPEC.md
Comment on lines +21 to +25
- B1. Horizontal scrolling is gated on:
- The pane's `terminal.line_wrap = false` setting (existing).
- At least one visible row exceeding pane width.
When either condition is false, the pane behaves as today (no
horizontal scroll, no scrollbar).
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.

⚠️ [IMPORTANT] Define how h_offset is clamped or reset when the visible long-line set changes, the pane resizes, line-wrap toggles, or vertical scrolling moves to shorter content; otherwise implementations can show blank shifted columns or stale scrollbars.

Comment thread specs/GH9828/SPEC.md
Comment on lines +38 to +42
- B6. Auto-scroll on new output: by default the pane snaps back
to horizontal offset 0 when new output arrives at the bottom
(new prompt, new line). User-controlled snap behavior can be
disabled via `terminal.h_scroll_snap_on_new_output` (default
`true`).
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.

⚠️ [IMPORTANT] Specify the exact snap trigger and exceptions for partial-line updates, prompt redraws, tailing output, alternate-screen/TUI updates, and when the user is viewing scrollback; new output arrives at the bottom is too broad to implement consistently.

Comment thread specs/GH9828/SPEC.md
- B6. Auto-scroll on new output: by default the pane snaps back
to horizontal offset 0 when new output arrives at the bottom
(new prompt, new line). User-controlled snap behavior can be
disabled via `terminal.h_scroll_snap_on_new_output` (default
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.

💡 [SUGGESTION] Add where terminal.h_scroll_snap_on_new_output is exposed and persisted, plus a test or acceptance criterion for disabling it.

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant