feat(code): Skeleton state for "Configure inbox" modal#2374
Conversation
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
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx:104-131
**Auto-start threshold renders with a wrong default during load**
Previously, when `isLoading` was `true` (signal source configs still pending), the entire component returned early — including the "Your PR auto-start threshold" section. Now that early return is removed, the threshold select renders immediately with `userAutonomyConfig?.autostart_priority ?? NEVER_VALUE`. While `isLoading` is still `true`, `userAutonomyConfig` is `undefined`, so the dropdown shows "Never — opt out of auto-assigned tasks" regardless of the user's actual saved preference. A user who quickly changes the dropdown during this window would overwrite their real setting with a value derived from an `undefined` config.
### Issue 2 of 2
apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx:162-168
The skeleton border uses an inline `style` prop with a raw CSS variable, while `GitHubIntegrationSection`'s equivalent skeleton uses the `className="border-(--gray-5) border-b border-dashed"` utility-class approach. Using the same pattern keeps styling consistent.
```suggestion
if (isLoading) {
return (
<Flex
direction="column"
gap="2"
pt="3"
className="border-(--gray-5) border-t border-dashed"
```
Reviews (1): Last reviewed commit: "feat(code): Skeleton state for "Configur..." | Re-trigger Greptile |
| @@ -128,6 +131,7 @@ export function SignalSourcesSettings({ | |||
| </Flex> | |||
There was a problem hiding this comment.
Auto-start threshold renders with a wrong default during load
Previously, when isLoading was true (signal source configs still pending), the entire component returned early — including the "Your PR auto-start threshold" section. Now that early return is removed, the threshold select renders immediately with userAutonomyConfig?.autostart_priority ?? NEVER_VALUE. While isLoading is still true, userAutonomyConfig is undefined, so the dropdown shows "Never — opt out of auto-assigned tasks" regardless of the user's actual saved preference. A user who quickly changes the dropdown during this window would overwrite their real setting with a value derived from an undefined config.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/settings/components/sections/SignalSourcesSettings.tsx
Line: 104-131
Comment:
**Auto-start threshold renders with a wrong default during load**
Previously, when `isLoading` was `true` (signal source configs still pending), the entire component returned early — including the "Your PR auto-start threshold" section. Now that early return is removed, the threshold select renders immediately with `userAutonomyConfig?.autostart_priority ?? NEVER_VALUE`. While `isLoading` is still `true`, `userAutonomyConfig` is `undefined`, so the dropdown shows "Never — opt out of auto-assigned tasks" regardless of the user's actual saved preference. A user who quickly changes the dropdown during this window would overwrite their real setting with a value derived from an `undefined` config.
How can I resolve this? If you propose a fix, please make it concise.| if (isLoading) { | ||
| return ( | ||
| <Flex | ||
| direction="column" | ||
| gap="2" | ||
| pt="3" | ||
| style={{ borderTop: "1px dashed var(--gray-5)" }} |
There was a problem hiding this comment.
The skeleton border uses an inline
style prop with a raw CSS variable, while GitHubIntegrationSection's equivalent skeleton uses the className="border-(--gray-5) border-b border-dashed" utility-class approach. Using the same pattern keeps styling consistent.
| if (isLoading) { | |
| return ( | |
| <Flex | |
| direction="column" | |
| gap="2" | |
| pt="3" | |
| style={{ borderTop: "1px dashed var(--gray-5)" }} | |
| if (isLoading) { | |
| return ( | |
| <Flex | |
| direction="column" | |
| gap="2" | |
| pt="3" | |
| className="border-(--gray-5) border-t border-dashed" |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/settings/components/sections/SignalSlackNotificationsSettings.tsx
Line: 162-168
Comment:
The skeleton border uses an inline `style` prop with a raw CSS variable, while `GitHubIntegrationSection`'s equivalent skeleton uses the `className="border-(--gray-5) border-b border-dashed"` utility-class approach. Using the same pattern keeps styling consistent.
```suggestion
if (isLoading) {
return (
<Flex
direction="column"
gap="2"
pt="3"
className="border-(--gray-5) border-t border-dashed"
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
- 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
Problem
As @annikaschmid pointed out, the "Configure sources" modal in the Inbox takes a moent to load sometimes, in which case the whole modal body is "Loading signal source configurations..." text until both source configs and warehouse sources load.
With the modal having organically grown to also cover GitHub access, PR auto-start, and Slack, "sources" no longer captures what's in there either.
Changes
Let's render the Inbox configuration modal body immediately and skeleton-load each section independently:
Also renaming the toolbar / empty-state button from "Configure sources" to "Configure inbox".
Skeleton bars use the same style already used elsewhere in the Inbox.
How did you test this?
Ran it. CI green.
Publish to changelog?
no
Created with PostHog Code