Skip to content

fix: keep body focus from replacing the reading pane - #4593

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-4458
Oct 28, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-4458

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Closing Threads can leave focus on document.body. The landing lookup introduced in #4332 treated that as a selected passage and scanned the entire document, choosing the workspace heading ahead of the pane the user was reading. Body now takes the existing reading-region fallback, so Escape keeps the pane and d/u continue scrolling it. Landing beside a real selected destination remains intact.

The reported journey fails before the correction and passes afterward; the related thread-exit and obligation-walk checks also pass. The journey now explicitly checks the region before opening Threads. All 695 runtime tests and pnpm run check pass. The kernel is rebuilt. Local Ruff and Prettier executables are unavailable; PR CI owns those checks.

A served release-notes comparison against the starting main retains 42 code requests through widget upgrade and server-state presentation, adds 26 JavaScript bytes, and reports no startup layout shifts or console errors. The guard adds no startup task or dependency.

Closes #4458 — automated triage

The landing lookup added in #4332 treated body as a selected passage after a focused panel closed. Scanning its descendants found the workspace heading before the remembered pane. Body means no selected passage, so use the existing page-region fallback instead. This preserves landing beside a real selected destination and the reading and scroll behavior covered by the navigation journey.

Closes #4458
# Conflicts:
#	dist/kernel/kernel.json
@leaf-agent
leaf-agent merged commit 65fdcfc into main Oct 28, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4458 branch October 28, 2026 19:16
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.

Let go loses the current right reading pane

1 participant