Open
Conversation
Add server-side custom domain resolution so forms can be served on white-label domains (e.g. forms.acme.com/contact-us). Includes: - resolveCustomDomain / loadFormForCustomDomain shared helpers - /$slug route for slug-based lookups on custom domains - /f/$formId route for UUID-based lookups on custom domains - Host header check to distinguish app vs custom domain requests - Automatic branding:false for custom domain forms
Required for React Server Components support introduced in @tanstack/react-start@1.167+. Bumps router-plugin/generator/devtools-core so the top-level router-core resolves to 1.168+ (RSC seroval adapter), avoiding a silent version drift where the serializer couldn't handle Composite Component RawStream payloads.
Flips rsc.enabled on the tanstackStart plugin and adds the @vitejs/plugin-rsc entry. ssr.external and environments.rsc.resolve.external cover the Node-only postgres / drizzle stack so server-fn modules never leak pg into the client graph. @base-ui/react is excluded per the RSC plugin's inconsistent-optimization warning. Adds /rsc-test as a minimal Composite Component sanity route — server renders a timestamp, a named slot is filled by a client counter. Lets future RSC regressions be isolated to a 70-line file. btca.config.jsonc: registers the TanStack router repo as a research resource.
Moves the Plate static render path off the client for public form views. Each step of the form is pre-rendered on the server as a Composite Component; the client fills named Field / ButtonGroup slots with interactive widgets. Result: @platejs/* no longer ships in the public form bundle (keeps shipping in the editor path, which is unchanged). - new getPublicFormViewRSC server fn — gates, per-step RSCs, thank-you RSC. - new FormPreviewRSC client consumer — no platejs imports, reads the pre-baked Composite Components, owns TanStack Form state per step. - PublicFormPage grows an optional rsc prop; $formId.tsx loader switches to the RSC server fn. $i8n.$formId.tsx keeps the legacy client-render path for now. - public-form-view.ts: data fetcher extracted as a private helper (not exported — non-server-fn exports would teach the bundler to keep drizzle/pg in the client graph). Also fixes the long-standing theme flash on public forms via generateDualThemeCss: both light and dark tokens are emitted at SSR, scoped by root html class. The pre-paint script selects one before paint, no client-side regeneration.
The outer trigger was a <button> containing the per-tag "remove" <button> children. Nested interactive elements are invalid HTML and surface as React 19 hydration errors. Switch the trigger to a <div role="button"> with Enter/Space/Escape keyboard handlers and aria-haspopup/aria-expanded; inner remove buttons stay as real <button>s.
The floating bubble was dropped during the scripts→embed TypeScript modularization (commit 37582cd). Ported back into the new module layout: - new lib/bubble.ts: reads popup.js script-tag data-* attrs, mounts a floating button immediately, upgrades icon/title once /api/forms/:id/meta resolves, delegates to the existing openPopup() on click with an onClose that restores bubble visibility. - styles.ts: restores .bf-bubble rules (positions, default icon sizing, hidden state transitions). - embed-popup.ts: init() now also calls setupAutoBubble(openPopup). - iframe.ts / overlay.ts: clamp iframe + popup height to min(600, viewport - 40) so tall forms scroll inside the iframe's own page instead of overflowing the popup container with no scrollbar. Drops a dead if/else where both branches were identical. Default icon is built inline via createElementNS to avoid a network roundtrip for forms without a custom icon. Bubble renders synchronously; the meta fetch upgrades it in the background instead of blocking mount.
After the TanStack dep bumps, two copies of @tanstack/query-core ended up in the tree (top-level 5.99.0, nested 5.91.2), causing TS2345 on the QueryClient parameter in _authenticated.tsx and router.tsx. Pin react-query to 5.99.0 so its pinned query-core dep matches the top-level copy. Also fixes an unrelated Select onValueChange signature mismatch in embed-config-panel.tsx — @base-ui's SelectRootChangeEventDetails now passes value: string | null, not string.
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.
No description provided.