fix(loops): Improve loop detail back navigation - #3876
Conversation
Generated-By: PostHog Code Task-Id: 3e0a680c-b843-46f6-ba7e-7898c06bcdb8
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Generated-By: PostHog Code Task-Id: 3e0a680c-b843-46f6-ba7e-7898c06bcdb8
Prompt To Fix All With AI### Issue 1
packages/ui/src/features/loops/components/LoopDetailView.tsx:213-218
**Direct links use unrelated history**
When a user directly opens a loop-detail URL after visiting another route in the same session, `canGoBackInHistory()` treats that unrelated entry as the opening surface, causing Back to navigate there instead of using the documented loops-page fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Use history for loop back navigation" | Re-trigger Greptile |
|
Note 🤖 stamphog reviewed Small, low-risk UI navigation tweak, but Greptile's unresolved comment flags a real edge case (direct-link visits can trigger back-navigation to unrelated history instead of the documented loops-page fallback) that the diff doesn't address.
Gate mechanics and policy version
|
Generated-By: PostHog Code Task-Id: f4cc7312-bef8-46af-86a7-84a19118d770
There was a problem hiding this comment.
Small, contained UI navigation fix outside risky territory; the prior Greptile concern about direct-link history is resolved by gating on the new loopListOrigin state flag before falling back to the loops page, and no other reviewer concerns are outstanding.
- Author wrote 0% of the modified lines and has 10 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 23L, 2F substantive — within ceiling |
| tier | ✓ | T1-agent / T1b-small (23L, 2F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 2a074aa · reviewed head 65db0dc |
Generated-By: PostHog Code Task-Id: f4cc7312-bef8-46af-86a7-84a19118d770
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Contained UI navigation fix in a single feature area, outside risky territory; the one prior reviewer concern (direct links using unrelated history) is resolved and the diff's hasLoopListOrigin gate concretely addresses it.
- Author wrote 0% of the modified lines and has 10 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 23L, 2F substantive — within ceiling |
| tier | ✓ | T1-agent / T1b-small (23L, 2F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ cd0509a · reviewed head c174cc7 |
Problem
Why: Loop detail should return users to the surface they opened it from instead of always sending them to the main loops page.
Changes
How did you test this?
Automatic notifications
Created with PostHog Code