fix(portal): inline destination-URL validation on program create#40
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>
The API requires a full URL (z.string().url()); typing 'yourbrand.com' without the scheme bounced an opaque 400 — five times in a row for the first white-label customer. The form now validates inline, says what a valid value looks like, offers a one-click 'Use https://…' fix when the input is scheme-less but otherwise a plausible host, and gates the submit button on validity. 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.
The program form's Destination URL field bounced an opaque 400 when given a scheme-less value like
yourbrand.com(the API requiresz.string().url()). Observed 5× in a row from the first white-label customer.Now: inline validation mirroring the API rule, plain-words error ("Must be a full URL starting with https://…"), a one-click Use https://yourbrand.com fix when the input is scheme-less but plausibly a host, and the submit button is gated on validity.
🤖 Generated with Claude Code