From 31e27b76b634d18dbb3f6a0aefa14e54fff8b74d Mon Sep 17 00:00:00 2001 From: seidnerj <4147381+seidnerj@users.noreply.github.com> Date: Sat, 14 Mar 2026 01:36:34 +0200 Subject: [PATCH 1/2] fix: improve OAuth response pages for browser compatibility window.close() is blocked by modern browsers for tabs not opened via window.open(). The success page's close button and auto-close timer silently fail as a result. - Add tryClose() that attempts window.close() and falls back to showing "You can close this tab manually" after 500ms - Remove ineffective auto-close scripts from error pages --- auth/oauth_responses.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/auth/oauth_responses.py b/auth/oauth_responses.py index ee31b6e..ef79ef6 100644 --- a/auth/oauth_responses.py +++ b/auth/oauth_responses.py @@ -26,8 +26,7 @@ def create_error_response(error_message: str, status_code: int = 400) -> HTMLRes

Authentication Error

{error_message}

-

Please ensure you grant the requested permissions. You can close this window and try again.

- +

Please ensure you grant the requested permissions. You can close this tab and try again.

""" @@ -176,9 +175,17 @@ def create_success_response(verified_user_id: Optional[str] = None) -> HTMLRespo }} @@ -191,7 +198,7 @@ def create_success_response(verified_user_id: Optional[str] = None) -> HTMLRespo
Your credentials have been securely saved. You can now close this window and retry your original command.
- +
This window will close automatically in 10 seconds
@@ -215,8 +222,7 @@ def create_server_error_response(error_detail: str) -> HTMLResponse:

Authentication Processing Error

An unexpected error occurred while processing your authentication: {error_detail}

-

Please try again. You can close this window.

- +

Please try again. You can close this tab.

""" From 4bdc96a554e322bef4b7515e915034e555ea2f95 Mon Sep 17 00:00:00 2001 From: seidnerj <4147381+seidnerj@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:35:18 +0200 Subject: [PATCH 2/2] fix: use consistent "tab" wording in success page CTAs Change "Close Window" to "Close Tab" and "This window will close" to "This tab will close" on the success page to match the rest of the PR. --- auth/oauth_responses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/oauth_responses.py b/auth/oauth_responses.py index ef79ef6..5c2a0a9 100644 --- a/auth/oauth_responses.py +++ b/auth/oauth_responses.py @@ -196,10 +196,10 @@ def create_success_response(verified_user_id: Optional[str] = None) -> HTMLRespo You've been authenticated as {user_display}
- Your credentials have been securely saved. You can now close this window and retry your original command. + Your credentials have been securely saved. You can now close this tab and retry your original command.
- -
This window will close automatically in 10 seconds
+ +
This tab will close automatically in 10 seconds
"""