Repository navigation
feat: restyle the OAuth pairing page with brand logo and light/dark theme - #5
Merged
Merged
Conversation
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.
What
The page where the pairing code is entered during the Grok OAuth flow was an unstyled HTML form. This restyles it:
brand/icon.svg, inlined) above the titleprefers-color-scheme, HA-blue accentNo text, translation key or behaviour changes; all five languages render as before. The page still shows only entity/action counts, never names or states.
Security
The consent page CSP was
default-src 'none', which would block even a single inline<style>. Instead of addingunsafe-inline, the CSP now carriesstyle-src 'sha256-...'computed from the exact stylesheet text (STYLE_SOURCEinoauth_page.py), so only that one stylesheet is allowed. Scripts, images, fonts, frames and theform-actioncallback-origin rule are unchanged.Tests / verification
tools/check_package.pypass on top of currentmain(2026.10.5.2).tests/test_http.pyCSP assertions updated to the new header (and assert there is nounsafe-inline).docs/ARCHITECTURE.mdnotes the hashedstyle-src.Not included
I also tried advertising the brand icon via
serverInfo.iconsin the MCPinitializeresponse. grok.com currently shows a generic placeholder for every custom connector regardless of server metadata, so that change is dropped from this PR.