fix(portal): white-label document branding + separate favicon + brand-color theming#39
Merged
Merged
Conversation
index.html ships hardcoded 'OpenPartner' + the platform favicon: the one pair of brand marks no in-app setting, cache clear, or incognito window can change. First real-world report came from a white-label admin who 'changed the name and logo but it still appears' — in the browser tab. BrandDocument (mounted once in App) sets document.title, swaps the favicon, and rewrites og:title from the public branding payload: white-label → brand name + brand logo (or a brand-colored SVG monogram — never the platform mark); branded non-white-label → 'Brand · OpenPartner'; platform surfaces keep the shipped defaults. usePublicBrand now keys its cache by the /t/<slug>/ prefix so SPA navigation between platform and tenant surfaces can't serve stale branding, and exposes brandColor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Three tightly-coupled branding changes (all plumbed through the same BrandDocument/branding-payload path):
1. Document branding (the customer bug).
index.htmlhardcodes the tab title, og:title, and platform favicon — the one place branding never applied, and exactly what survives cache clears ('I changed the name and logo but it still appears').BrandDocumentnow sets title, favicon, and og:title from the public branding payload.2. Separate favicon. Logos are lockups; favicons are square marks. New
Tenant.faviconUrl+/uploads/favicon+ a second uploader in Settings → Brand info. Tab icon preference: favicon → logo → brand-colored monogram (never the platform mark). PNG/JPEG/WebP only — no SVG (script vector) or ICO.3. Brand-color theming (spec §5.4).
Tenant.brandColorexisted but was never applied. All accent tokens intheme.tsare now CSS custom properties (teal fallback); BrandDocument derives + injects--op-accent*(hover shade, WCAG-luminance ink, alpha tints) so buttons, links, and active nav re-tint app-wide. All${theme.accent}NNhex-concats swept to explicitaccentA*tokens — string-concat tints break againstvar()values.Also:
usePublicBrandcaches by/t/<slug>/prefix (stale-branding-on-SPA-navigation fix) and exposes brandColor/faviconUrl.Suites green: api 192/192, portal 12/12 (migration applied).
🤖 Generated with Claude Code