Skip to content

Leave the page where it stands when a press opens a thread - #809

Merged
max-sixty merged 3 commits into
mainfrom
thread-open-no-scroll
Sep 18, 2026
Merged

max-sixty merged 3 commits into
mainfrom
thread-open-no-scroll

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Pressing marked words that carry a thread — prose, an Ask, a widget — moved the viewport: at 1440×900, a passage low in the window jumped 391px (an Ask's words, 399px) as the page centred it. openPageThread travelled to the anchor for every caller, and scrollToThread skips the trip only while the passage clears the bottom shortcut bar's scroll-padding, so words the reader could see and press inside that band still counted as covered.

A press on the words now passes travel: false. The t/T walk and the comment-count skip link keep travelling, since both can open a thread about a passage off screen. The card needs no trip: placeThreadPreview keeps it inside the viewport, and without the centring it opens taller (502px rather than 416px).

openPageThread's reply landing on the margin card is deleted. No caller reached it: the mark press asks for the reply box only while the Threads panel is open, and that case goes to showThread first.

The new test shares its fixture with the walk's clearance test, so the two differ only in the gesture.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

max-sixty and others added 3 commits September 18, 2026 13:26
Pressing marked words that carry a thread moved the viewport: at 1440x900, a
passage low in the window jumped 391px (an Ask's words, 399px) as the page centred
it. `openPageThread` travels to the anchor for every caller, and `scrollToThread`
skips the trip only while the passage clears the bottom shortcut bar's
scroll-padding, so words the reader can see and press inside that band still
counted as covered.

A press on the words now passes `travel: false`. The t/T walk and the comment note
keep travelling, since both can open a thread about a passage off screen. The card
needs no trip: placeThreadPreview keeps it inside the viewport, and without the
centring it opens taller (502px rather than 416px).

The new test shares its fixture with the keyboard walk's clearance test: same words,
same place, and only the gesture differs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The margin card branch computed a reply-box destination and handed it to
landInConversation when `focus` was "reply". No caller reaches it: the walk and the
comment note pass "thread", and the mark press passes "reply" only when the Threads
panel is open, which `setPanel` writes together with the state `openPageThread`
checks first, so that press goes to `showThread` instead. The card now always lands
on the thread, and margin-projection no longer takes landInConversation.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0d405a1 into main Sep 18, 2026
5 checks passed
@max-sixty
max-sixty deleted the thread-open-no-scroll branch September 18, 2026 21:05
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