Skip to content

Fix ponymail MCP auth result page: dark-mode text and Close tab button#24

Open
potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:fix-ponymail-auth-result-page
Open

Fix ponymail MCP auth result page: dark-mode text and Close tab button#24
potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:fix-ponymail-auth-result-page

Conversation

@potiuk

@potiuk potiuk commented Jul 8, 2026

Copy link
Copy Markdown
Member

Fixes two issues on the PonyMail MCP authentication success page (resultPage in mcp/ponymail-mcp/auth.js).

1. Unreadable text in dark mode

The dark-mode media query only recolored body. The .card kept its light green/red background, while paragraph text inherited the light body color (#ddd) — rendering as light-on-light and merging into the background. The card now switches background and text color together via CSS custom properties (--card-bg, --text, --accent), reusing the same dark palette already used on the main auth page.

2. "Close tab" button did nothing

window.close() is blocked by browsers for any tab the user navigated to — only script-opened tabs may self-close. This cannot be forced, so the button now fails gracefully: if the tab is still open shortly after the attempt, the button is hidden and a "press Ctrl/Cmd + W" hint is shown instead of leaving a dead button.

Tested: node -c auth.js passes; existing test suite (43 tests) green.

Generated-by: Claude Code 2.1.158 (Claude Opus 4.8)

Two issues on the authentication success page (resultPage in auth.js):

- Dark mode text merged into the background: the dark-mode media query
  only recolored `body`, so the `.card` kept its light green/red
  background while paragraph text inherited the light body color,
  rendering as light-on-light. The card now switches background and
  text color together via CSS custom properties (--card-bg, --text,
  --accent), using the same dark palette as the main page.

- "Close tab" button did nothing: window.close() is blocked by browsers
  for tabs the user navigated to (only script-opened tabs can
  self-close). This can't be forced, so it now fails gracefully — if
  the tab is still open shortly after the attempt, the button is hidden
  and a "press Ctrl/Cmd + W" hint is shown instead.

Generated-by: Claude Code 2.1.158 (Claude Opus 4.8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant