diff --git a/apps/x/apps/renderer/src/components/settings/account-settings.tsx b/apps/x/apps/renderer/src/components/settings/account-settings.tsx index 04a1e805..e4d9b93f 100644 --- a/apps/x/apps/renderer/src/components/settings/account-settings.tsx +++ b/apps/x/apps/renderer/src/components/settings/account-settings.tsx @@ -27,6 +27,7 @@ export function AccountSettings({ dialogOpen }: AccountSettingsProps) { const [connectionLoading, setConnectionLoading] = useState(true) const [disconnecting, setDisconnecting] = useState(false) const [connecting, setConnecting] = useState(false) + const [appUrl, setAppUrl] = useState(null) const { billing, isLoading: billingLoading } = useBilling(isRowboatConnected) const checkConnection = useCallback(async () => { @@ -48,6 +49,14 @@ export function AccountSettings({ dialogOpen }: AccountSettingsProps) { } }, [dialogOpen, checkConnection]) + useEffect(() => { + if (isRowboatConnected) { + window.ipc.invoke('account:getRowboat', null) + .then((account) => setAppUrl(account.config?.appUrl ?? null)) + .catch(() => {}) + } + }, [isRowboatConnected]) + useEffect(() => { const cleanup = window.ipc.on('oauth:didConnect', (event) => { if (event.provider === 'rowboat') { @@ -158,7 +167,7 @@ export function AccountSettings({ dialogOpen }: AccountSettingsProps) {

{billing.subscriptionStatus}

)} - diff --git a/apps/x/apps/renderer/src/components/sidebar-content.tsx b/apps/x/apps/renderer/src/components/sidebar-content.tsx index 4442c01b..43770847 100644 --- a/apps/x/apps/renderer/src/components/sidebar-content.tsx +++ b/apps/x/apps/renderer/src/components/sidebar-content.tsx @@ -405,6 +405,7 @@ export function SidebarContentPanel({ const connectorsButtonRef = useRef(null) const [isRowboatConnected, setIsRowboatConnected] = useState(false) const [loggingIn, setLoggingIn] = useState(false) + const [appUrl, setAppUrl] = useState(null) const { billing } = useBilling(isRowboatConnected) const handleRowboatLogin = useCallback(async () => { @@ -427,13 +428,20 @@ export function SidebarContentPanel({ const result = await window.ipc.invoke('oauth:getState', null) const config = result.config || {} const hasError = Object.values(config).some((entry) => Boolean(entry?.error)) + const connected = config['rowboat']?.connected ?? false if (mounted) { setHasOauthError(hasError) - setIsRowboatConnected(config['rowboat']?.connected ?? false) + setIsRowboatConnected(connected) if (!hasError) { setShowOauthAlert(true) } } + if (connected && mounted) { + try { + const account = await window.ipc.invoke('account:getRowboat', null) + if (mounted) setAppUrl(account.config?.appUrl ?? null) + } catch { /* ignore */ } + } } catch (error) { console.error('Failed to fetch OAuth state:', error) if (mounted) { @@ -510,7 +518,10 @@ export function SidebarContentPanel({ {billing.subscriptionPlan ?? 'Free'} plan -