Add tracking for Preserve Intent banner actions (#9409)#12849
Merged
mekarpeles merged 2 commits intoJun 11, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds client-side link tracking metadata for “pending action” banner interactions on the account view page.
Changes:
- Add
data-ol-link-trackto the “Continue” link. - Add
data-ol-link-trackto the dismiss/close control for the banner.
Member
|
Thanks for the PR, @Sadashii! Copilot has been assigned for an initial review. @mekarpeles is assigned to this PR and currently has:
Possible improvements for this PR
PR triage checklist (maintainers / Pam)
Note This comment was automatically generated by Pam, Open Library's Project AI Manager, on behalf of @mekarpeles. Pam is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9409
Adds link tracking tags (
data-ol-link-track) to the "continue" and "dismiss" options on the Preserve Intent login-redirect banner, and ensures thepending_actioncookie is cleared upon successful login with a valid redirect target.Technical
data-ol-link-track="PreserveIntent|Continue"anddata-ol-link-track="PreserveIntent|Dismiss"to the respective banner elements using JavaScript atDOMContentLoadedinview.html.pending_actioncookie in the legacy login handler (openlibrary/plugins/upstream/account.py) and the FastAPI login handler (openlibrary/fastapi/account.py) when the redirect is safe and not blacklisted.Testing
Run Python tests:
Manually verified behaviour, cookie is deleted with correct redirect and the html attributes are present on web view.
Screenshot
N/A
Stakeholders
@mekarpeles