Skip to content

πŸ™Œ OpenHands: AI-Driven Development

[codex] Fix OpenAI subscription device code contrast (#1531)

Graham Neubigd4f825c7f387
diff --git a/__tests__/routes/llm-settings.test.tsx b/__tests__/routes/llm-settings.test.tsx
index 86a615a8a8..a725a37291 100644
--- a/__tests__/routes/llm-settings.test.tsx
+++ b/__tests__/routes/llm-settings.test.tsx
@@ -314,7 +314,9 @@ describe("LlmSettingsScreen", () => {
await screen.findByTestId("llm-subscription-settings");
fireEvent.click(screen.getByTestId("subscription-connect"));
- await screen.findByText("USER-CODE");
+ const userCode = await screen.findByTestId("subscription-user-code");
+ expect(userCode).toHaveTextContent("USER-CODE");
+ expect(userCode.parentElement).toHaveClass("text-white");
expect(openSpy).toHaveBeenCalledWith(
"https://auth.openai.com/activate?user_code=USER-CODE",
diff --git a/src/components/features/settings/llm-settings/openai-subscription-auth-card.tsx b/src/components/features/settings/llm-settings/openai-subscription-auth-card.tsx
index 7de0076424..4b0dcf9e04 100644
--- a/src/components/features/settings/llm-settings/openai-subscription-auth-card.tsx
+++ b/src/components/features/settings/llm-settings/openai-subscription-auth-card.tsx
@@ -201,8 +201,13 @@ export function OpenAISubscriptionAuthCard({
className="flex flex-col gap-2 rounded-lg border border-[var(--oh-border-subtle)] p-3 text-sm"
>
<span>{t(I18nKey.SETTINGS$SUBSCRIPTION_DEVICE_INSTRUCTIONS)}</span>
- <div className="flex items-center gap-2 rounded-lg bg-[var(--oh-surface-deep)] px-3 py-2 font-mono text-base text-[var(--oh-foreground)]">
- <span className="flex-1 select-all">{challenge.userCode}</span>
+ <div className="flex items-center gap-2 rounded-lg bg-[var(--oh-surface-deep)] px-3 py-2 font-mono text-base font-semibold text-white">
+ <span
+ data-testid="subscription-user-code"
+ className="flex-1 select-all tracking-[0.08em]"
+ >
+ {challenge.userCode}
+ </span>
<CopyToClipboardButton
isHidden={false}
isDisabled={false}