From 2a5c69211d25c3c53c5b159e6fddc592db5421dc Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Thu, 9 Jul 2026 14:25:05 -0400 Subject: [PATCH] fix: restore login page render and clear CI lint/format The plan-review port removed the authRedirectUrl import from login.tsx but left its call site, crashing the login page at runtime (blank page, no 'Sign in to open-swe'). Pass the relative path straight to loginUrl, matching the plan route and the backend relative-redirect handling. Also drop an unused os import in the guard test and reformat workflow_push_guard.py to satisfy ruff. --- agent/middleware/workflow_push_guard.py | 7 +++---- tests/test_workflow_push_guard.py | 1 - ui/src/routes/login.tsx | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/agent/middleware/workflow_push_guard.py b/agent/middleware/workflow_push_guard.py index dfd9291f..5a1f3359 100644 --- a/agent/middleware/workflow_push_guard.py +++ b/agent/middleware/workflow_push_guard.py @@ -653,9 +653,7 @@ def _workflow_change_for_push(backend: Any, parsed: ParsedGitPush) -> WorkflowPu fixed_command = _git_command(root, " ".join(shlex.quote(arg) for arg in fixed_args)) # Fetch diff preview for the workflow approval card. - diff_range = ( - f"{shlex.quote(base_ref)}...{shlex.quote(head)}" if base_ref else shlex.quote(head) - ) + diff_range = f"{shlex.quote(base_ref)}...{shlex.quote(head)}" if base_ref else shlex.quote(head) diff = _run_git(backend, root, f"diff --binary --full-index {diff_range} -- .github/workflows") numstat = None diff_preview = "" @@ -669,7 +667,8 @@ def _workflow_change_for_push(backend: Any, parsed: ParsedGitPush) -> WorkflowPu diff_stats_val = _diff_stats(files, numstat.output) elif base_ref and not diff.ok: diff_only_head = _run_git( - backend, root, + backend, + root, f"diff --binary --full-index --root {shlex.quote(head)} -- .github/workflows", ) if diff_only_head.ok and diff_only_head.output: diff --git a/tests/test_workflow_push_guard.py b/tests/test_workflow_push_guard.py index 934c7aa9..8334a0fc 100644 --- a/tests/test_workflow_push_guard.py +++ b/tests/test_workflow_push_guard.py @@ -1,7 +1,6 @@ from __future__ import annotations import json -import os from typing import Any import pytest diff --git a/ui/src/routes/login.tsx b/ui/src/routes/login.tsx index cd5071aa..ade6620f 100644 --- a/ui/src/routes/login.tsx +++ b/ui/src/routes/login.tsx @@ -63,7 +63,7 @@ function Login() { Continue with GitHub