diff --git a/app/auth/callback/page.tsx b/app/auth/callback/page.tsx
index 21be4cb..c3fe5ac 100644
--- a/app/auth/callback/page.tsx
+++ b/app/auth/callback/page.tsx
@@ -36,7 +36,9 @@ function AuthCallbackContent() {
if (localStorage.getItem('pulse_pending_checkout')) {
router.push('/welcome')
} else {
- router.push('/')
+ const raw = searchParams.get('returnTo') || '/'
+ const safe = (typeof raw === 'string' && raw.startsWith('/') && !raw.startsWith('//')) ? raw : '/'
+ router.push(safe)
}
} else {
setError(authMessageFromErrorType(result.error as AuthErrorType))
diff --git a/app/layout-content.tsx b/app/layout-content.tsx
index 320c367..abb2838 100644
--- a/app/layout-content.tsx
+++ b/app/layout-content.tsx
@@ -26,7 +26,7 @@ export default function LayoutContent({ children }: { children: React.ReactNode
}
}, [auth.user])
- const handleSwitchWorkspace = async (orgId: string | null) => {
+ const handleSwitchOrganization = async (orgId: string | null) => {
if (!orgId) return // Pulse doesn't support personal workspace
try {
const { access_token } = await switchContext(orgId)
@@ -56,9 +56,9 @@ export default function LayoutContent({ children }: { children: React.ReactNode
appName="Pulse"
orgs={orgs}
activeOrgId={auth.user?.org_id}
- onSwitchWorkspace={handleSwitchWorkspace}
+ onSwitchOrganization={handleSwitchOrganization}
onCreateOrganization={handleCreateOrganization}
- allowPersonalWorkspace={false}
+ allowPersonalOrganization={false}
showFaq={false}
showSecurity={false}
showPricing={true}
diff --git a/app/welcome/page.tsx b/app/welcome/page.tsx
index 4116fb3..e56efa8 100644
--- a/app/welcome/page.tsx
+++ b/app/welcome/page.tsx
@@ -686,9 +686,15 @@ function WelcomeContent() {
variant="primary"
className="flex-1"
disabled={siteLoading || !siteName.trim() || !siteDomain.trim()}
- isLoading={siteLoading}
>
- Add site
+ {siteLoading ? (
+ <>
+
+ Adding...
+ >
+ ) : (
+ 'Add site'
+ )}