feat(landing): per-link branding overrides#209
Merged
Conversation
Adds an optional per-link override that merges over the tenant's LandingTheme at render time — every field optional, Some replaces, None inherits. Lets a single link tweak branding (e.g. hide the agent panel or change the CTA on an acquisition link) without a separate tenant. - LandingThemeOverride (all-optional mirror of LandingTheme) + LandingTheme::merged_with. - Link.landing_theme; CreateLinkInput (+builder), CreateLinkRequest, LinkDetail; UpdateLinkRequest with the absent/null/value pattern (null clears). - Resolve path merges the link override over the tenant theme. - Validation: LinkError::InvalidLandingTheme via validate_landing_theme_override (reuses core::validation). OpenAPI schema registered. Shared over MCP (the create tool takes CreateLinkRequest, which now carries landing_theme). Test: per-link override hides the agent panel on one link while a control link (no override) keeps it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Why
Branding (
LandingTheme) is tenant-wide — you couldn't, e.g., hide the agent panel on one acquisition link but keep it on others. This adds a per-link override that merges over the tenant theme at render time.How
LandingThemeOverride— an all-optional mirror ofLandingTheme;Somereplaces the tenant value,Noneinherits.LandingTheme::merged_with(override)does the merge.Link.landing_theme(DB) + plumbed throughCreateLinkInput(+builder),CreateLinkRequest,LinkDetail, andUpdateLinkRequest(absent = unchanged,null= clear, object = replace).tenant default → tenant theme → link override.LinkError::InvalidLandingTheme(reusescore::validation); OpenAPI schema registered.links.createtool takesCreateLinkRequest, which now carrieslanding_theme, so it's available over MCP automatically.Usage
Tests
Per-link override hides the agent panel on one link while a control link (no override) keeps it.
fmt+clippy -D warningsclean.🤖 Generated with Claude Code