Skip to content

Let a planet's vanity URL double as an invite link - #1650

Open
SkyJoshua wants to merge 1 commit into
version/0.8.0from
feat/vanity-invite-link
Open

Let a planet's vanity URL double as an invite link#1650
SkyJoshua wants to merge 1 commit into
version/0.8.0from
feat/vanity-invite-link

Conversation

@SkyJoshua

@SkyJoshua SkyJoshua commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a "Use Vanity URL as Invite" toggle to a planet's Invites settings, only shown once Invites Enabled is on. When turned on, /i/{vanity} (e.g. /i/valourcentral) works as a standing, permanent invite link alongside a planet's regular randomly-generated invite codes — a memorable name instead of a random code, without needing to manage a separate invite entry.

Changes

  • Planet.VanityInviteEnabled (bool), plumbed through the Database/Shared/Sdk/Server models and mapper, with a migration
  • Server validates the toggle can only be turned on when the planet has a vanity name claimed and Invites are enabled, and auto-clears it if the vanity name is ever removed
  • Invite resolution (/i/{code} screen + join flow) falls back to checking a planet's vanity name when the code doesn't match a real invite — no client routing changes needed, since the existing invite page and deep-link parsing are already code-agnostic
  • The vanity invite shows up in the "Invite Links" list itself (labeled "Vanity URL · Never expires") with its own copy button; its delete button turns the toggle off instead of trying to delete a nonexistent invite row

Test plan

  • Toggle is hidden when Invites Enabled is off, and disabled (with a hint) when no vanity URL is set
  • Turning the toggle on with a vanity URL set works, and /i/{vanity} resolves and lets someone join
  • Turning it off (via the toggle or the invite list's delete button) makes /i/{vanity} stop working
  • Clearing the planet's vanity URL (Info tab) automatically disables the toggle
  • Regular invite codes are unaffected throughout
  • Migration applies cleanly to an existing database

Images

Invites Disabled image
Invites Enabled with VanityURL set image
Invites Enabled without VanityURL set image
Vanity Invite Enabled image
Vanity Invite in Invite Links image

Adds a toggle in the Invites settings (only shown once Invites Enabled is
on) that lets /i/{vanity} work as a standing, permanent invite alongside
regular invite codes.
@SkyJoshua
SkyJoshua requested a review from a team as a code owner August 2, 2026 01:45
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying valour with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e1d0a6
Status: ✅  Deploy successful!
Preview URL: https://a6429050.valour.pages.dev
Branch Preview URL: https://feat-vanity-invite-link.valour.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant