Correct the baseY-is-zero rationale for alt-buffer agents (CROW-1020 follow-up) - #1022
Open
dgershman wants to merge 1 commit into
Open
Correct the baseY-is-zero rationale for alt-buffer agents (CROW-1020 follow-up)#1022dgershman wants to merge 1 commit into
dgershman wants to merge 1 commit into
Conversation
The gate is right; the reason given for it was not. crow-tmux.conf strips smcup/rmcup toward the CLIENT (`terminal-overrides ,xterm*:smcup@:rmcup@`), so the web xterm is permanently in its main buffer — `buffer.active.type` is never 'alternate' there, which is the same trap ADR-0013 calls out for the wheel routing. What actually zeroes baseY on a Claude Code surface is applySurfaceScrollback pinning `options.scrollback = 0`, capping the main buffer at `rows`. Comment only; no behaviour change. 🐦⬛ Generated with Claude Code, orchestrated by Crow Co-Authored-By: Claude <noreply@anthropic.com> Crow-Session: FE1DC79B-EC98-4859-B79D-CC30AB6FD455
dhilgaertner
approved these changes
Aug 14, 2026
dhilgaertner
left a comment
Contributor
There was a problem hiding this comment.
Code & Security Review
Critical Issues (if any)
None.
Security Review
Strengths:
- Comment-only change; no runtime behavior, attack surface, or data-handling paths are modified.
Concerns:
- None.
Code Quality
- The corrected comment in
Packages/CrowDaemon/Sources/CrowDaemon/Resources/web/app.jsaccurately documents whybaseY > 0hides the scrollbar on alt-buffer agents (Claude Code): the web xterm stays in its main buffer becausecrow-tmux.confstripssmcup/rmcuptoward the client, sobuffer.active.type === 'alternate'is never true here;applySurfaceScrollbackpinningscrollback = 0is what keepsbaseYat zero. This aligns with ADR-0013 and the existingcrow-tmux.confcommentary, and closes the trap that could invite rewriting the gate on buffer type. - The
updateTerminalScrollbargate (buf.baseY > 0) is unchanged and remains correct. node --checkonapp.js: clean.npm run test:ci(web-tests): exit 0, 0 failures (includingterminal-scrollbar.test.js).
Summary Table
| Color | Meaning | Verdict effect |
|---|---|---|
| Red | Must fix | Request changes |
| Yellow | Should fix | Request changes |
| Green | Consider | Approve allowed |
Recommendation: Approve — driven by [0 Red, 0 Yellow, 1 Green] findings.
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.
Comment-only follow-up to #1021. No behaviour change.
#1021's
updateTerminalScrollbarexplains itsbaseY > 0gate like this:The gate is right. That reason is not, and it happens to be the exact trap
crow-tmux.confspends a paragraph warning about:The strip cancels the client terminal's alt-screen capability, so the browser's xterm never enters its alternate buffer no matter what the tmux pane is doing. What actually zeroes
baseYon a Claude Code surface isapplySurfaceScrollbackpinningoptions.scrollback = 0, which caps the main buffer atrows.Left as-is this reads as license to rewrite the gate as
buffer.active.type === 'alternate'— which is always false on this client, so the bar would then show on Claude Code tabs with a full-height slider and nothing to scroll. ADR-0013 already had to learn this once for the wheel routing (#824); the comment now says so rather than implying the opposite.This missed #1021 by 27 minutes — the
crow:mergewatcher squashed the branch at 09:36 and the correction was pushed at 10:04, after the PR had already closed.node --checkon app.js: cleannpm run test:ci(web-tests): exit 0, 0 failures🤖 Generated with Claude Code