Skip to content

feat(ui-egui): open where the window was left - #391

Open
leifrossau wants to merge 5 commits into
AlienTechSoftware:mainfrom
leifrossau:feat/reopen-where-left-off
Open

leifrossau wants to merge 5 commits into
AlienTechSoftware:mainfrom
leifrossau:feat/reopen-where-left-off

Conversation

@leifrossau

Copy link
Copy Markdown
Collaborator

What and why

The window opens on the page it closed on, at the same zoom and scroll. A notebook kept outside the notebooks folder (a synced folder) is remembered by the page's whole path; before, last_page was not remembered for it at all. A note window of its own does not change what the main window remembers.

The scroll is set only once the page is tall enough to reach it, tried for a few seconds while pictures arrive. Set earlier, past the page's end, egui sprang it back with a great speed: the page coasted far from the place and the scroll area went on asking for frames, so the window redrew sixty times a second with nothing happening.

Quality level L3 (see SKILLS/nc-devx/SKILL.md)

  • cargo xtask pre-push passes on the current branch before pushing
  • The pre-push hook confirms the validation still matches origin/main
  • CI checks pass for this pull request
  • Coverage: the coverage job's warnings are read; cargo xtask coverage --update is in
    this pull request if coverage rose
  • Docs match the change: no command, control-protocol or gap changes
  • A new user action is a CommandSpec with a test (no new user action)
  • Page or demo changes: none
  • UI changes: no visual change
  • New files under assets/ or docs/images/ have a row in ATTRIBUTION.md (none added)

How it was checked

  • cargo xtask pre-push on this branch.
  • Tests the_window_opens_where_it_was_left and coming_back_further_down_than_the_page_reaches_leaves_the_window_still (fails without the scroll change).
  • By hand: a long page of printouts on onedriver reopened at the place left, and the window idles without frames.

🤖 Generated with Claude Code

leifrossau and others added 5 commits November 18, 2026 20:04
The window came back to the page it last remembered, but a page in a
notebook kept outside the notebooks folder (one in a synced folder,
say) was never remembered: its path was only ever stored relative to
the notebooks folder, so the window kept opening an old page instead.
It is now remembered by its whole path, and the tree opens down to it.

It also comes back at the zoom it was left at and scrolled to the same
place on the page, both kept when the window closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scroll was set before the page was tall enough, past its end. egui
sprang it back with a great speed; the page coasted far from the place,
and the scroll area kept asking for frames, so the window redrew sixty
times a second with nothing happening. The place is now set once the
page reaches it, tried for a few seconds while pictures arrive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-off

# Conflicts:
#	crates/ui-egui/src/app.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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