Skip to content

feat(code): Skeleton state for "Configure inbox" modal#2374

Merged
Twixes merged 4 commits into
mainfrom
posthog-code/inbox-configuration-skeleton
May 26, 2026
Merged

feat(code): Skeleton state for "Configure inbox" modal#2374
Twixes merged 4 commits into
mainfrom
posthog-code/inbox-configuration-skeleton

Conversation

@Twixes
Copy link
Copy Markdown
Member

@Twixes Twixes commented May 26, 2026

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:

  • 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 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

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
@Twixes Twixes requested review from andrewm4894 and sortafreel May 26, 2026 14:45
@Twixes Twixes marked this pull request as ready for review May 26, 2026 14:45
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 26, 2026

Prompt To Fix All With AI
Fix 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

Comment on lines 104 to 131
@@ -128,6 +131,7 @@ export function SignalSourcesSettings({
</Flex>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +162 to +168
if (isLoading) {
return (
<Flex
direction="column"
gap="2"
pt="3"
style={{ borderTop: "1px dashed var(--gray-5)" }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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!

Twixes added 3 commits May 26, 2026 17:05
- 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
@Twixes Twixes enabled auto-merge (squash) May 26, 2026 20:03
@Twixes Twixes merged commit 799e470 into main May 26, 2026
14 checks passed
@Twixes Twixes deleted the posthog-code/inbox-configuration-skeleton branch May 26, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants