Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

fix(loops): restore loops registry in Personal space - #4023

Merged
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/fix-personal-space-loops
Jul 30, 2026
Merged

fix(loops): restore loops registry in Personal space#4023
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/fix-personal-space-loops

Conversation

@dmarticus

@dmarticus dmarticus commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Problem

The Spaces layout showed a context-scoped loop list in the Personal space. Unattached loops and resumable loop-builder tasks were therefore hidden behind a misleading empty state.

Why: People need to reliably find both the loop definitions they created and any active builder chats after leaving the creation task.

Changes

  • Render the existing project-level Loops registry in the Personal space.
  • Keep team space Loops pages scoped to loops attached to that space.
  • Add regression coverage for the Personal-space route.

How did you test this?

Manually; got this list view

image

and the individual view

image

Automatic notifications

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

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 0b782cef-7a2c-4061-b4ac-3c2908a096ba
@trunk-io

trunk-io Bot commented Jul 30, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/canvas/components/WebsiteChannelLoops.tsx

Reviewed by React Doctor for commit 1917793.

@dmarticus
dmarticus marked this pull request as ready for review July 30, 2026 20:38
@dmarticus dmarticus added the Stamphog This will request an autostamp by stamphog on small changes label Jul 30, 2026
Comment thread packages/ui/src/features/canvas/components/WebsiteChannelLoops.tsx Outdated
Comment thread packages/ui/src/features/canvas/components/WebsiteChannelLoops.tsx Outdated
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
packages/ui/src/features/canvas/components/WebsiteChannelLoops.tsx:60-68
**Handle unresolved Personal channels**

On a fresh Personal-space route load, `useChannels` initially returns an empty channel list, so this falls through to `SpaceAttachedLoops` and briefly shows the scoped skeleton or raw-ID empty state while running its header side effects before switching to the registry.

### Issue 2
packages/ui/src/features/canvas/components/WebsiteChannelLoops.tsx:68
**Preserve Personal-space navigation context**

Embedding `LoopsListView` here also runs its standalone-page header behavior, which clears the Spaces layout header and leaves the Personal loops view without its breadcrumb navigation context.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(loops): restore loops registry in pe..." | Re-trigger Greptile

@stamphog

stamphog Bot commented Jul 30, 2026

Copy link
Copy Markdown

Note

🤖 stamphog reviewed af38871ff129f05b3f4f293fadc7008adf87ceab — verdict: REFUSED

Both unresolved Greptile findings check out against the diff: LoopsListView unconditionally clears the Spaces layout header (useSetHeaderContent(null)) so embedding it in the Personal-space route drops the breadcrumb navigation context, and useChannels starts with an empty channel list on load so the route briefly falls through to the scoped SpaceAttachedLoops empty state before switching — both are real, substantive UX regressions directly undercutting the PR's stated goal.

  • greptile-apps[bot] reviewed the current head.
  • Unresolved: embedding LoopsListView in the Personal-space route clears the Spaces layout header/breadcrumb via useSetHeaderContent(null) (WebsiteChannelLoops.tsx line 96 area)
  • Unresolved: on initial route load, useChannels() returns an empty channel list, so the Personal-space check falls through to the scoped SpaceAttachedLoops skeleton/empty state before flipping to the registry view
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 37L, 1F substantive, 102L/2F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1c-medium (102L, 2F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 49667b7 · reviewed head af38871

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 30, 2026
Generated-By: PostHog Code
Task-Id: 0b782cef-7a2c-4061-b4ac-3c2908a096ba
@dmarticus
dmarticus enabled auto-merge (squash) July 30, 2026 21:21
@trunk-io
trunk-io Bot merged commit 681f705 into main Jul 30, 2026
33 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-personal-space-loops branch July 30, 2026 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants