Skip to content

Repainting every line is repaint_lines; refresh_lines keeps its one meaning - #248

Merged
trissim merged 1 commit into
mainfrom
fix/repaint-lines-own-name
Nov 6, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/repaint-lines-own-name

Conversation

@trissim

@trissim trissim commented Nov 6, 2026

Copy link
Copy Markdown

Hotfix, 2 lines in 2 files. The installed Toad raises TypeError: ScrollView.refresh_lines() missing 1 required positional argument: 'y_start' on every fade repaint of a scrolling block.

Before: #246/#247 declared refresh_lines() on DOMNode (dom.py:2293) and Widget (widget.py:4248) to mean "repaint every line". ScrollView already declares refresh_lines(y_start, line_count=1) (scroll_view.py:182), the range refresh Log (_log.py:354) and TextArea call. One name, two facts: a no-argument call that lands on a ScrollView raises. Toad's block_navigation.py:363 calls it on every child.

After: the repaint-everything meaning is repaint_lines(). refresh_lines keeps its one meaning, the range refresh.

Callers: git grep -n "refresh_lines()" over src, tests and docs finds none of the no-argument form. TextArea's four calls (_text_area.py:821, 1651, 1954, 1959) pass a line and keep ScrollView's meaning. Toad's three callers (block_navigation.py:363, frame_presentation.py:351, switch_toast.py:199) move to repaint_lines() in the Toad PR claude-b-ui opens on this merge commit, with the relock.

Proof: claude-b-ui ran Toad's six test files that died on the TypeError against this commit plus the three Toad renames, with toad#1557's fail-fast: 10 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbFMSqJMarXn2ZE8iAL7Sd

…eaning

#246 and #247 declared refresh_lines() on Widget and DOMNode to mean
"repaint every line", but ScrollView already declares
refresh_lines(y_start, line_count=1), the range refresh Log and TextArea
call. A no-argument call on a ScrollView raised TypeError, and Toad's
block navigation calls it on every child, so every fade repaint of a
scrolling block failed on the installed Toad. The new meaning takes its
own name. Nothing in Textual's src, tests or docs calls the no-argument
form; TextArea's four calls pass a line and keep ScrollView's meaning.

Found and proven by claude-b-ui (Toad's six failing test files: 10 passed
with this plus Toad's three caller renames).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbFMSqJMarXn2ZE8iAL7Sd
Copilot AI balanced review requested due to automatic review settings November 6, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit a377051 into main Nov 6, 2026
2 of 22 checks passed
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