Skip to content

feat(loops): surface loop ownership and notifications#3723

Merged
charlesvien merged 9 commits into
mainfrom
posthog-code/surface-loop-metadata
Jul 23, 2026
Merged

feat(loops): surface loop ownership and notifications#3723
charlesvien merged 9 commits into
mainfrom
posthog-code/surface-loop-metadata

Conversation

@MattPua

@MattPua MattPua commented Jul 22, 2026

Copy link
Copy Markdown
Member

Problem

Loop lists and details hide notification channels and ownership, and personal and team loops are mixed together.

Changes

Before:
CleanShot 2026-07-22 at 13 18 39@2x
CleanShot 2026-07-22 at 13 18 48@2x

After:
CleanShot 2026-07-22 at 13 32 17@2x

CleanShot 2026-07-22 at 13 19 02@2x CleanShot 2026-07-22 at 13 33 19@2x
  • Split personal and team loops into separate sections
  • Show notification channels and creator attribution in list rows and details
  • Handle creator loading, missing-member, and lookup-error states

How did you test this?

  • pnpm --filter @posthog/ui typecheck
  • pnpm --dir packages/ui exec vitest run src/features/loops/loopDisplay.test.ts src/features/canvas/utils/mentionComposer.test.ts
  • pnpm exec biome check on changed files

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit f1b2b5e.

@MattPua
MattPua requested a review from charlesvien July 22, 2026 17:34
@posthog

posthog Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @MattPua — baseline updated in 9c0efc5.

View this run in PostHog

4 new.

@MattPua
MattPua marked this pull request as ready for review July 22, 2026 18:20
@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
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
packages/ui/src/features/loops/components/LoopsListView.tsx:67
**Members Cache Crosses Organizations**

`useOrgMembers` uses the shared `['org-members']` cache key, so switching organizations can leave this new creator lookup reading the previous organization's members during the stale window. Team loops can then show another user's name when numeric IDs overlap, or incorrectly label a current creator as a former member.

### Issue 2 of 2
packages/ui/src/features/loops/components/LoopDetailView.tsx:264-265
**Partial Results Imply Former Member**

The organization-members request stops after 20 pages and returns the members loaded so far. In an organization with more than 4,000 members, a current creator on a later page is absent from `members`, so this branch incorrectly displays “Former organization member.”

Reviews (1): Last reviewed commit: "chore(visual): update storybook baseline..." | Re-trigger Greptile

Comment thread packages/ui/src/features/loops/components/LoopsListView.tsx
Comment thread packages/ui/src/features/loops/components/LoopDetailView.tsx Outdated
MattPua and others added 9 commits July 22, 2026 21:18
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
Generated-By: PostHog Code
Task-Id: 5e66a9a6-6aca-44f1-8f6a-ba8a7c1dbd7b
4 updated
Run: 96ef43a9-bfac-48d5-a987-da09c8ad27f1

Co-authored-by: MattPua <3376526+MattPua@users.noreply.github.com>
Generated-By: PostHog Code
Task-Id: 9edb68e1-a82b-48f8-9d42-f3c635939c09
@charlesvien
charlesvien force-pushed the posthog-code/surface-loop-metadata branch from 11346fe to f1b2b5e Compare July 23, 2026 04:25
@charlesvien
charlesvien enabled auto-merge (squash) July 23, 2026 04:32
@charlesvien
charlesvien disabled auto-merge July 23, 2026 04:32
@charlesvien
charlesvien merged commit 3d7fc62 into main Jul 23, 2026
32 checks passed
@charlesvien
charlesvien deleted the posthog-code/surface-loop-metadata branch July 23, 2026 04:34
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