Skip to content

feat(chat): Admin UI for invitation redirect URIs - #318

Merged
kkopanidis merged 2 commits into
ui-rewritefrom
cursor/feat-chat-invitation-redirect-uris-aa3b
Sep 13, 2026
Merged

feat(chat): Admin UI for invitation redirect URIs#318
kkopanidis merged 2 commits into
ui-rewritefrom
cursor/feat-chat-invitation-redirect-uris-aa3b

Conversation

@ChrisPdgn

@ChrisPdgn ChrisPdgn commented Sep 3, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Draft Admin UI for Chat invitation redirects so operators can configure the login / accept / decline destinations that Conduit chat invitation emails now depend on. Without these fields, the admin panel cannot persist explicit_room_joins.redirect and unauthenticated email-link clicks fail until login_uri is set.

This is a draft PR against ui-rewrite. Do not mark ready or merge until backend Conduit #1512 lands and the form is verified against a live Chat config that includes explicit_room_joins.redirect.

Summary

Chat Settings now exposes three invitation redirect URI inputs that map 1:1 to Conduit explicit_room_joins.redirect:

Admin field Config key Behavior
Login Redirect URI login_uri Absolute login page for unauthenticated email-link clicks. The hook appends ?redirectUri=...&answer=...&invitationToken=... so login can return to the hook. Empty means those clicks fail until configured.
Accept Redirect URI accept_uri Post-accept destination. Supports {roomId}. Empty returns JSON instead of redirecting.
Decline Redirect URI decline_uri Post-decline destination. Supports {roomId}. Empty returns JSON instead of redirecting.

Validation uses plain strings, not z.string().url(), so {roomId} placeholders are accepted. Missing redirect from older Chat config is merged to empty strings so RHF stays controlled. The optional Zod object also defaults to empty strings so patchChatSettings stays assignable to ChatSettings.

Existing explicit-join switches, ModuleToggle, and patchChatSettings are unchanged — the new object rides the same submit path.

Validation

Exercised on the ui-rewrite admin at Chat → Settings against a local Conduit 0.17 standalone (admin/admin):

  • Invitation Redirects section renders under the switch grid with the three labeled fields and descriptions.
  • Inputs stay disabled while "Require invite to join room" is off; they enable in Edit mode once that switch is on.
  • https://example.com/chat/{roomId} is accepted (no URL-schema error).
  • Save of the existing explicit_room_joins.enabled flag succeeds.
  • GET /config/chat after save does not contain redirect — expected until Conduit #1512 is deployed. This 0.17 convict config has no explicit_room_joins.redirect keys, so those values are stripped server-side.

Test plan

  • Open Chat → Settings with Chat serving
  • With "Require invite to join room" off: Invitation Redirects heading/labels muted, inputs disabled
  • Enable invite-required + Edit: all three URI fields become editable
  • Form accepts accept_uri with {roomId} (no z.string().url() rejection)
  • Save login_uri / accept_uri / decline_uri and confirm they persist after reload — blocked until Conduit #1512
  • Save empty accept/decline URIs (allowed; backend returns JSON)
  • Cancel / view mode leaves the existing switch grid and ModuleToggle path unchanged
  • After Conduit #1512: unauthenticated email accept click redirects to login_uri?redirectUri=...

Related: ConduitPlatform/Conduit#1512

Open in Web Open in Cursor 

@ChrisPdgn
ChrisPdgn force-pushed the cursor/feat-chat-invitation-redirect-uris-aa3b branch from 4be52a7 to 5fb2d11 Compare September 10, 2026 12:58
@ChrisPdgn
ChrisPdgn marked this pull request as ready for review September 10, 2026 13:13
ChrisPdgn and others added 2 commits September 13, 2026 14:28
Wire Chat admin settings to explicit_room_joins.redirect
from Conduit #1512 so login/accept/decline URIs can be
configured without treating {roomId} as an invalid URL.

Co-authored-by: Christina Papadogianni <ChrisPdgn@users.noreply.github.com>
Use equivalent empty-string fallbacks so TypeScript does not
see overwritten keys, and default the optional redirect object
so submit stays assignable to ChatSettings.
@kkopanidis
kkopanidis force-pushed the cursor/feat-chat-invitation-redirect-uris-aa3b branch from 5fb2d11 to 70737de Compare September 13, 2026 11:28
@kkopanidis
kkopanidis merged commit 36584ba into ui-rewrite Sep 13, 2026
3 checks passed
@kkopanidis
kkopanidis deleted the cursor/feat-chat-invitation-redirect-uris-aa3b branch September 13, 2026 11:30
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.

2 participants