Repository navigation
fix: reset scroll position when opening another document - #653
Merged
Merged
Conversation
Azganoth
added a commit
that referenced
this pull request
Oct 13, 2026
## Summary Prepare v0.1.0-alpha.3 and promote the accumulated Unreleased changelog so the packaged app can display its own release notes. Align application and Cargo metadata with WiX's numeric `0.1.0.3` version, and point the desktop release-note scenarios' current-release highlight at alpha 3's first entry. The changelog entry for #653 moves from alpha 2 to alpha 3: it merged after the alpha 2 tag but had been filed under that release's section. It now speaks of a newly opened document rather than a replacement one, since opening a document adds a tab instead of replacing the active document. ## Related Issue Refs #698. ## Verification - `pnpm check` passed formatting, type, lint, production frontend build, frontend coverage, and backend checks. [PR CI](https://github.com/Azganoth/leafdown/actions/runs/38323432685) passed frontend checks, backend checks, and the complete desktop E2E suite, including the release-note scenarios against alpha 3's notes. Not verified: installer builds, left to the tagged Release workflow; NSIS and MSI install, upgrade from alpha 2, uninstall, and Open with lifecycle checks, deferred for this prerelease by maintainer decision in #698. ## Notes The alpha 3 section is dated 2026-10-12 and should match the day the tag is pushed.
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.
Summary
Opening another document retained the previous document's scroll offset. Reset the enclosing viewport when document identity changes, while same-document reloads keep their restoration path. Focus heading navigation and focused caret restoration before requesting ProseMirror scrolling so their targets are visible.
Related Issue
Closes #646
Verification
pnpm exec vitest run src/components/screens/document-screen.test.tsx src/features/editor/tests/wikiLink.test.ts --maxWorkers=2passed, covering viewport replacement, same-document caret and focus restoration, and wiki-link navigation.Desktop E2E
document-lifecycleandfolder-searchscenarios passed on Windows against a freshpnpm build:e2e:desktopbinary. They verify rendered viewport offsets and target visibility through navigator and Open recent replacements, cross-document heading navigation, external reloads, and folder-search navigation. The runner used an isolated WebDriver port because the default port was occupied.Frontend formatting, lint, typecheck, and production build passed through
pnpm check:oxfmt,pnpm lint:frontend, andpnpm build.pnpm exec vitest run --coverage --maxWorkers=2passed with the existing coverage thresholds.CI passed frontend checks, backend checks, the Rust dependency audit, and the full desktop E2E suite for commit
5ee2d39ef88df2d147900607eb7b630890ff4b92.Not verified: manual interaction with the native Open file picker.