• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThePalaceProject / web-patron / 25187090111
88%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 08:15PM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 08:13PM UTC coverage: 89.184%. Remained the same
25187090111

push

github

web-flow
Unable to navigate to previous page in browser history from login page (PP-4041) (#130)

## Description

<!--- Describe your changes -->
Updates how the Next.js Router updates the browser's history stack when
redirecting to the login screen based on the user's supported
authentication method.

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
When the `initLogin` function is called within an auth component
designed to redirect to the login page(`Login`, `Catch401`, or
`AuthProtectedRoute`), the router previously pushed the derived login
URL onto the browser's history stack. This would result in two separate
entries in the history stack for the login screen. The login hooks
update the URL to accommodate the supported auth type, but this does not
visually change what's rendered for the user. So when a user goes
backward in the history stack, they remain on the login page.

Previous behavior
Step | Stack | Behavior
-- | -- | --
User clicks "Sign In" | [home, /login] | /login mounts
Login.tsx effect fires | [home, /login, /login/[methodId] |
initLogin(methodId) pushes /login/[methodId]
User hits back | [home, /login] | /login mounts again
Login.tsx effect re-fires | [home, /login, /login/[methodId] | Pushes
again, keeps user on login screen

New behavior
Step | Stack | Behavior
-- | -- | --
User clicks "Sign In" | [home, /login] | /login mounts
Login.tsx effect fires | [home, /login/basic] |
replace overwrites /login
User hits back | [home] | User goes home

However, views that are reachable without authentication don't need to
have their locations replaced within the browser history. `BookDetails`
renders a "Borrow" button that redirects to the login screen.

Previous behavior
Step | Stack with replace | Behavior
-- | -- | --
User on book detail | [home, /book/123] |  
Clicks Borrow without token → initLogin() | [home, /login/basic] |
/book/123... (continued)

196 of 220 branches covered (89.09%)

Branch coverage included in aggregate %.

307 of 344 relevant lines covered (89.24%)

31.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25187090111.1 30 Apr 2026 08:15PM UTC 14
89.18
GitHub Action Run
Source Files on build 25187090111
  • Tree
  • List 14
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2cb56dd4 on github
  • Prev Build on main (#25076620177)
  • Next Build on main (#25221023683)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc