From 185dc754827b3e589d5d9ba48f50ef956c41d906 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Tue, 26 May 2026 14:46:47 +0200 Subject: [PATCH 1/2] feat(code): Skeleton state for "Configure inbox" modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Render the Inbox configuration modal immediately and skeleton-load each section independently: - Sources area skeletons until signal source configs + warehouse sources load - "Project-level code access" skeletons until GitHub integration state loads - "Slack notifications" skeletons until GitHub integration state loads Also rename the toolbar/empty-state button from "Configure sources" to "Configure inbox" — the modal has grown well past just sources. Generated-By: PostHog Code Task-Id: 30eef32a-d2f3-439c-a18f-899e49cce085 --- .../inbox/components/InboxEmptyStates.tsx | 2 +- .../inbox/components/SignalSourceToggles.tsx | 49 +++++++++++ .../inbox/components/list/SignalsToolbar.tsx | 4 +- .../sections/GitHubIntegrationSection.tsx | 23 +++++ .../SignalSlackNotificationsSettings.tsx | 21 ++++- .../sections/SignalSourcesSettings.tsx | 88 ++++++++++--------- .../src/renderer/hooks/useIntegrations.ts | 1 + 7 files changed, 142 insertions(+), 46 deletions(-) diff --git a/apps/code/src/renderer/features/inbox/components/InboxEmptyStates.tsx b/apps/code/src/renderer/features/inbox/components/InboxEmptyStates.tsx index 66d1d572f2..e02a08f867 100644 --- a/apps/code/src/renderer/features/inbox/components/InboxEmptyStates.tsx +++ b/apps/code/src/renderer/features/inbox/components/InboxEmptyStates.tsx @@ -126,7 +126,7 @@ export function WarmingUpPane({ color="gray" onClick={onConfigureSources} > - Configure sources + Configure inbox diff --git a/apps/code/src/renderer/features/inbox/components/SignalSourceToggles.tsx b/apps/code/src/renderer/features/inbox/components/SignalSourceToggles.tsx index f727f23082..0fde7e8fb3 100644 --- a/apps/code/src/renderer/features/inbox/components/SignalSourceToggles.tsx +++ b/apps/code/src/renderer/features/inbox/components/SignalSourceToggles.tsx @@ -419,3 +419,52 @@ export function SignalSourceToggles({ ); } + +function SignalSourceToggleCardSkeleton() { + return ( + + + + + + + + + + + + + ); +} + +export function SignalSourceTogglesSkeleton() { + return ( + + + + PostHog data + + + {Array.from({ length: 3 }).map((_, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: static loading placeholders + + ))} + + + + + External connections + + + {Array.from({ length: 4 }).map((_, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: static loading placeholders + + ))} + + + + ); +} diff --git a/apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx b/apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx index 1304ea04d6..ad66c46a23 100644 --- a/apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx +++ b/apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx @@ -52,7 +52,7 @@ interface SignalsToolbarProps { effectiveBulkIds?: string[]; /** Called when the select-all checkbox is toggled. Parent owns all state transitions. */ onToggleSelectAll?: (checked: boolean) => void; - /** Called when the "Configure sources" button is clicked. */ + /** Called when the "Configure inbox" button is clicked. */ onConfigureSources?: () => void; /** * Opens the dismiss flow: exactly one report selected (snooze or permanent suppress, with a reason). @@ -505,7 +505,7 @@ export function SignalsToolbar({ className="flex shrink-0 cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-[12px] text-gray-10 transition-colors hover:text-gray-12" > - Configure sources + Configure inbox ) : null} diff --git a/apps/code/src/renderer/features/settings/components/sections/GitHubIntegrationSection.tsx b/apps/code/src/renderer/features/settings/components/sections/GitHubIntegrationSection.tsx index 4786b80373..8ec674fca0 100644 --- a/apps/code/src/renderer/features/settings/components/sections/GitHubIntegrationSection.tsx +++ b/apps/code/src/renderer/features/settings/components/sections/GitHubIntegrationSection.tsx @@ -34,8 +34,10 @@ function summarizeReposByOwner( export function GitHubIntegrationSection({ hasGithubIntegration, + isLoading = false, }: { hasGithubIntegration: boolean; + isLoading?: boolean; }) { const { repositories, isLoadingRepos } = useRepositoryIntegration(); const ownerSummary = useMemo( @@ -57,6 +59,27 @@ export function GitHubIntegrationSection({ projectHasTeamIntegration: hasGithubIntegration, }); + if (isLoading) { + return ( + + + + + + + + + + + ); + } + return ( + + + + + + + ); + } + if (!hasSlackIntegration) { return ( - Loading signal source configurations... - - ); - } + const { hasGithubIntegration, isLoadingIntegrations } = + useRepositoryIntegration(); const userPriorityValue = userAutonomyConfig?.autostart_priority ?? NEVER_VALUE; @@ -64,40 +60,47 @@ export function SignalSourcesSettings({ Choose which sources to enable for this project. - + - + + )} ); diff --git a/apps/code/src/renderer/hooks/useIntegrations.ts b/apps/code/src/renderer/hooks/useIntegrations.ts index c8761ac3c0..6ae0ffe860 100644 --- a/apps/code/src/renderer/hooks/useIntegrations.ts +++ b/apps/code/src/renderer/hooks/useIntegrations.ts @@ -656,6 +656,7 @@ export function useRepositoryIntegration() { repositories, getIntegrationIdForRepo, isRepoInIntegration, + isLoadingIntegrations: integrationsPending, isLoadingRepos: integrationsPending || reposPending, isRefreshingRepos, refreshRepositories, From 4b8585e8f0e4a3259b1b207e474785510ca86486 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Tue, 26 May 2026 17:05:54 +0200 Subject: [PATCH 2/2] fix(code): Skeleton PR auto-start dropdown while autonomy config loads - Gate the "Your PR auto-start threshold" select on the autonomy config query so it doesn't briefly default to "Never" while loading, which could overwrite the saved preference if the user interacts quickly. - Use the utility-class border pattern for the Slack section skeleton to match GitHubIntegrationSection. Generated-By: PostHog Code Task-Id: 30eef32a-d2f3-439c-a18f-899e49cce085 --- .../inbox/hooks/useSignalSourceManager.ts | 4 ++- .../SignalSlackNotificationsSettings.tsx | 2 +- .../sections/SignalSourcesSettings.tsx | 27 +++++++++++-------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts b/apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts index 7d9f0a642c..3ab9e5d31a 100644 --- a/apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts +++ b/apps/code/src/renderer/features/inbox/hooks/useSignalSourceManager.ts @@ -112,7 +112,8 @@ export function useSignalSourceManager() { useExternalDataSources(); const { data: evaluations } = useEvaluations(); const { data: teamConfig } = useSignalTeamConfig(); - const { data: userAutonomyConfig } = useSignalUserAutonomyConfig(); + const { data: userAutonomyConfig, isLoading: userAutonomyConfigLoading } = + useSignalUserAutonomyConfig(); // Optimistic overrides keyed by source product — only sources actively being // toggled get an entry, so unrelated sources never see a prop change. @@ -573,6 +574,7 @@ export function useSignalSourceManager() { teamConfig, handleUpdateAutostartPriority, userAutonomyConfig, + userAutonomyConfigLoading, handleUpdateUserAutonomyPriority, handleUpdateSlackNotifications, }; diff --git a/apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx b/apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx index 1e5cb142d8..814b2a43b2 100644 --- a/apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx +++ b/apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx @@ -165,7 +165,7 @@ export function SignalSlackNotificationsSettings({ direction="column" gap="2" pt="3" - style={{ borderTop: "1px dashed var(--gray-5)" }} + className="border-(--gray-5) border-t border-dashed" > diff --git a/apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx b/apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx index 32f185efa4..b5ae413733 100644 --- a/apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx +++ b/apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx @@ -44,6 +44,7 @@ export function SignalSourcesSettings({ handleSetupComplete, handleSetupCancel, userAutonomyConfig, + userAutonomyConfigLoading, handleUpdateUserAutonomyPriority, } = useSignalSourceManager(); @@ -117,17 +118,21 @@ export function SignalSourcesSettings({ "Never" to opt out. - - void handleUpdateUserAutonomyPriority( - value === NEVER_VALUE ? null : value, - ) - } - /> + {userAutonomyConfigLoading ? ( + + ) : ( + + void handleUpdateUserAutonomyPriority( + value === NEVER_VALUE ? null : value, + ) + } + /> + )}