Skip to content

Implement project tree scroll persistence#2711

Merged
stanislaw merged 3 commits intomainfrom
mettta/Tree_scroll_anchor
Mar 6, 2026
Merged

Implement project tree scroll persistence#2711
stanislaw merged 3 commits intomainfrom
mettta/Tree_scroll_anchor

Conversation

@mettta
Copy link
Collaborator

@mettta mettta commented Mar 6, 2026

This PR introduces persistent scroll behavior for the project tree on document screens and adds end-to-end coverage for both primary and fallback scenarios.

  • Implemented save/restore flow for tree scroll:
    • restore on page load (if saved value exists),
    • save on tree-link click (navigation intent).
  • Implemented fallback behavior:
    • if active tree item is outside visible tree viewport, scroll it to container center,
    • centered position is also saved, so subsequent reload keeps that centered state.
  • Added per-project localStorage namespacing using data-project-title

Closes #2710

@mettta mettta force-pushed the mettta/Tree_scroll_anchor branch from 0e587df to b898776 Compare March 6, 2026 05:25
@mettta mettta force-pushed the mettta/Tree_scroll_anchor branch from b898776 to 5e16132 Compare March 6, 2026 05:55
@stanislaw stanislaw added this to the 2026-Q1 milestone Mar 6, 2026
@stanislaw stanislaw merged commit e0d8ae4 into main Mar 6, 2026
33 checks passed
@stanislaw stanislaw deleted the mettta/Tree_scroll_anchor branch March 6, 2026 08:11
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.

Preserve project tree scroll and recenter active item when out of view

2 participants