fix(loops): group loops by visibility - #81654
Merged
Merged
Conversation
Ports PostHog/code#3957 into the monorepo products/desktop tree. - group personal and team loops by their visibility instead of creator ownership - move team-visible loops created by the current user into Team loops - remove the current-user request that was only needed for ownership grouping - add regression coverage for team loops created by the signed-in user Generated-By: PostHog Desktop Task-Id: af12ea6d-4341-4ab3-8ff6-8faf1ae36e08
|
😎 Merged successfully - details. |
Contributor
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(loops): group loops by visibility" | Re-trigger Greptile |
There was a problem hiding this comment.
Contained UI bug fix that changes loop grouping to key off visibility instead of creator ownership, removing an unneeded currentUser fetch; diff matches the description, tests were updated to match new behavior, and no risky-territory (auth/billing/API/schema/CI/deps) is touched.
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 34L, 1F substantive, 56L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (56L, 2F, single-area, fix) |
| stamphog 2.0.0b4 | .stamphog/policy.yml @ 824d8b3 · reviewed head 911e80c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Anyone with a team loop they created themselves sees it filed under "My loops" instead of "Team loops", because the loops list groups by creator ownership rather than by the loop's own visibility. Teammates browsing Team loops miss loops that happen to be authored by the person viewing.
Ports PostHog/code#3957.
Changes
visibilityvalue instead of creator ownership.LoopsListView— it only existed to support ownership grouping.The monorepo tree has drifted from the source repo (a
sharedPageHeaderprop landed since, and the tab-switching test was split), so the port was applied by hand rather thangit am; the third source hunk targeted a test that no longer exists in that form, and its intent is already covered.How did you test this code?
pnpm exec vitest run src/features/loops/components/LoopsListView.test.tsx— 3 passed (frompackages/uiroot)pnpm exec vitest run src/features/loops— all 12 loops test files, 206 tests passedpnpm exec biome checkon both changed files — cleanpnpm typecheckinpackages/ui— clean (after building workspace deps)Did not run the app or exercise the UI manually.
Automatic notifications
Docs update
None — internal grouping behavior no user-facing docs describe.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Ported with PostHog Desktop using the repo's
porting-code-prsskill (mentioned in a comment on the source PR). The source tree and the importedproducts/desktoptree had drifted, so the agent applied the patch's intent manually, verified no other consumers relied on the removedcurrentUserIdprop, and kept the stories file untouched since it never used the prop.Created with PostHog Desktop