Skip to content

fix: implement last visited page tracking for users in sessionStorage#5191

Merged
greenbonebot merged 1 commit intomainfrom
GEA-1580
Mar 23, 2026
Merged

fix: implement last visited page tracking for users in sessionStorage#5191
greenbonebot merged 1 commit intomainfrom
GEA-1580

Conversation

@daniele-mng
Copy link
Copy Markdown
Contributor

What

  • Save each user’s last visited page in sessionStorage under gsa_last_visited_page_<username> and use it on login.
  • Remove router location-state fallback to avoid redirecting user B to user A’s page. Clear the stored key after use.

Why

  • Prevent cross-user redirects: store each user’s last page in sessionStorage (keyed by username) and remove the router location.state fallback, so users only get redirected to their own saved page (or homepage).

References

GEA-1580

Checklist

  • Tests

@daniele-mng daniele-mng requested a review from a team as a code owner March 23, 2026 10:23
@greenbonebot greenbonebot enabled auto-merge (rebase) March 23, 2026 10:24
@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA c1f0c65.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@greenbonebot greenbonebot merged commit 04b99d5 into main Mar 23, 2026
27 checks passed
@greenbonebot greenbonebot deleted the GEA-1580 branch March 23, 2026 10:35
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 87.87879% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.46%. Comparing base (377882d) to head (c1f0c65).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/web/utils/user-last-visited-page.ts 82.60% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5191   +/-   ##
=======================================
  Coverage   77.45%   77.46%           
=======================================
  Files        1179     1180    +1     
  Lines       30923    30946   +23     
  Branches     9294     9295    +1     
=======================================
+ Hits        23952    23971   +19     
- Misses       6237     6241    +4     
  Partials      734      734           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants