Fix ponymail MCP auth result page: dark-mode text and Close tab button#24
Open
potiuk wants to merge 1 commit into
Open
Fix ponymail MCP auth result page: dark-mode text and Close tab button#24potiuk wants to merge 1 commit into
potiuk wants to merge 1 commit into
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two issues on the PonyMail MCP authentication success page (
resultPageinmcp/ponymail-mcp/auth.js).1. Unreadable text in dark mode
The dark-mode media query only recolored
body. The.cardkept 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.jspasses; existing test suite (43 tests) green.Generated-by: Claude Code 2.1.158 (Claude Opus 4.8)