π OpenHands: AI-Driven Development
fix(theme): keep device authorization feedback readable (#18528)
Engel Nyst8da32cbb462e
diff --git a/__tests__/routes/device-verify.test.tsx b/__tests__/routes/device-verify.test.tsxindex e42679693d..fce06a7b2d 100644--- a/__tests__/routes/device-verify.test.tsx+++ b/__tests__/routes/device-verify.test.tsx@@ -374,9 +374,6 @@ describe("DeviceVerify", () => {});expect(screen.getByText("DEVICE$SUCCESS_MESSAGE")).toBeInTheDocument();- // Should show success icon (checkmark)- const successIcon = document.querySelector(".text-green-600");- expect(successIcon).toBeInTheDocument();});it("should not show try again button on success", async () => {@@ -462,9 +459,6 @@ describe("DeviceVerify", () => {});expect(screen.getByText("DEVICE$ERROR_FAILED")).toBeInTheDocument();- // Should show error icon (X)- const errorIcon = document.querySelector(".text-red-600");- expect(errorIcon).toBeInTheDocument();});it("should show error message when fetch throws an exception", async () => {diff --git a/src/components/features/backends/device-flow-auth.tsx b/src/components/features/backends/device-flow-auth.tsxindex 169dff7269..63e4178916 100644--- a/src/components/features/backends/device-flow-auth.tsx+++ b/src/components/features/backends/device-flow-auth.tsx@@ -309,7 +309,7 @@ function DeviceFlowStatusContent({href={validVerificationUrl}target="_blank"rel="noopener noreferrer"- className="max-h-16 overflow-auto break-all text-center text-xs text-blue-400 hover:underline"+ className="max-h-16 overflow-auto break-all text-center text-xs text-contrast hover:underline">{validVerificationUrl}</a>@@ -330,11 +330,11 @@ function DeviceFlowStatusContent({return (<div- className="flex flex-col gap-3 rounded-lg border border-red-700 bg-red-900/20 p-4"+ className="flex flex-col gap-3 rounded-lg border border-status-error/40 bg-status-error/5 p-4"data-testid={`${testIdRoot}-auth-error`}role="alert">- <p className="text-sm text-red-400">{error}</p>+ <p className="text-sm text-feedback-error">{error}</p><BrandButtontype="button"variant="secondary"diff --git a/src/routes/device-verify.tsx b/src/routes/device-verify.tsxindex 2765e4f576..bab51646de 100644--- a/src/routes/device-verify.tsx+++ b/src/routes/device-verify.tsx@@ -69,7 +69,9 @@ export default function DeviceVerify() {<divclassName={cn("mb-4",- verificationResult.success ? "text-green-600" : "text-red-600",+ verificationResult.success+ ? "text-feedback-success"+ : "text-feedback-error",)}>{verificationResult.success ? (@@ -154,11 +156,11 @@ export default function DeviceVerify() {{userCode}</p></div>- <div className="mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg">- <p className="text-sm font-medium text-amber-500 mb-1">+ <div className="mb-6 p-4 bg-warning/5 border-l-2 border-feedback-warning rounded-r-lg">+ <p className="text-sm font-medium text-feedback-warning mb-1">{t(I18nKey.DEVICE$SECURITY_NOTICE)}</p>- <p className="text-sm text-muted">+ <p className="text-sm text-contrast">{t(I18nKey.DEVICE$SECURITY_WARNING)}</p></div>@@ -176,7 +178,7 @@ export default function DeviceVerify() {<buttontype="button"onClick={() => processDeviceVerification(userCode)}- className="flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700"+ className="flex-1 px-4 py-2 bg-contrast text-contrast-foreground rounded-md hover:bg-contrast/90">{t(I18nKey.DEVICE$AUTHORIZE)}</button>