Skip to content

✨ Restore scroll position and route on login#218

Merged
clubanderson merged 1 commit intomainfrom
feat/scroll-restore-login
Jan 29, 2026
Merged

✨ Restore scroll position and route on login#218
clubanderson merged 1 commit intomainfrom
feat/scroll-restore-login

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

  • Navigate directly to the last visited dashboard route after login (avoids flash of default dashboard)
  • Enhanced scroll position persistence with card-based identity restore, robust across layout shifts from lazy-loaded cards
  • Added debounced scroll listener to capture position before sign-out
  • Added restore guard to prevent scroll save during active restoration

Test plan

  • Scroll to Deployment Missions card on /deploy dashboard
  • Sign out and log back in
  • Verify the Deployment Missions card is visible after login
  • Navigate between /deploy and /clusters, verify scroll position restores
  • Verify no flash of default dashboard on login

🤖 Generated with Claude Code

Navigate directly to the last visited dashboard route after login
instead of going to '/' first (avoids flash). Also enhance scroll
position persistence with card-based identity restore, which is
robust across layout shifts caused by lazy-loaded dashboard cards.

Key changes:
- AuthCallback: Use getLastRoute() to navigate to last dashboard
- Save card title (h3) alongside pixel position for identity-based restore
- Add debounced scroll listener to capture position before sign-out
- Prevent scroll save during active restoration (isRestoringRef)
- Detect content-still-loading state to avoid premature stabilization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jan 29, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 29, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit cbdb6d8
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/697be89abcb0f90008407b34
😎 Deploy Preview https://deploy-preview-218.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request.

Before your PR can be merged, please ensure:

DCO Sign-off - All commits must be signed off with git commit -s to certify the Developer Certificate of Origin

PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), ⚠️ (breaking change)

Getting Started with KubeStellar:

Contributor Resources:


🌟 Help KubeStellar Grow - We Need Adopters!

Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes:

📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction!


A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack!

@clubanderson clubanderson merged commit 531b31e into main Jan 29, 2026
14 of 15 checks passed
@kubestellar-prow kubestellar-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 29, 2026
@kubestellar-prow kubestellar-prow bot deleted the feat/scroll-restore-login branch January 29, 2026 23:09
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution! Your PR has been successfully merged.


🌟 Help KubeStellar Grow - We Need Adopters!

Our roadmap is driven entirely by adopter feedback - nothing else. Whether you're using KubeStellar yourself or know organizations that could benefit from multi-cluster Kubernetes, we need your help:

📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction!

🗣️ Spread the word - Tell colleagues, write blog posts, present at meetups

💬 Share feedback on Slack #kubestellar-dev

Every adopter story helps us prioritize what matters most. Thank you for being part of the KubeStellar community!

@github-actions
Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

clubanderson added a commit that referenced this pull request Feb 13, 2026
Navigate directly to the last visited dashboard route after login
instead of going to '/' first (avoids flash). Also enhance scroll
position persistence with card-based identity restore, which is
robust across layout shifts caused by lazy-loaded dashboard cards.

Key changes:
- AuthCallback: Use getLastRoute() to navigate to last dashboard
- Save card title (h3) alongside pixel position for identity-based restore
- Add debounced scroll listener to capture position before sign-out
- Prevent scroll save during active restoration (isRestoringRef)
- Detect content-still-loading state to avoid premature stabilization

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant