Simplify configuration and sidebar navigation - #3680
Conversation
Generated-By: PostHog Code Task-Id: 884159da-252c-4037-ab49-c6178d27732e
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Generated-By: PostHog Code Task-Id: 884159da-252c-4037-ab49-c6178d27732e
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsx:67
**Unavailable Items Remain Configurable**
This page now lists every customizable item, but `SidebarNavSection` still gates Contexts, Activity, and Loops with runtime feature state. When one of those features is unavailable, selecting its checkbox persists a visible override while the sidebar continues to omit it, so the control appears to succeed but has no effect.
Reviews (1): Last reviewed commit: "Simplify sidebar customization" | Re-trigger Greptile |
| const items = orderedNavItems(previewOrder ?? navItemOrder).filter( | ||
| ({ id }) => available?.[id] !== false, | ||
| ); | ||
| const items = orderedNavItems(previewOrder ?? navItemOrder); |
There was a problem hiding this comment.
Unavailable Items Remain Configurable
This page now lists every customizable item, but SidebarNavSection still gates Contexts, Activity, and Loops with runtime feature state. When one of those features is unavailable, selecting its checkbox persists a visible override while the sidebar continues to omit it, so the control appears to succeed but has no effect.
Rule Used: When implementing new features, ensure that the UI... (source)
Learned From
PostHog/posthog#32595
PostHog/posthog#32677
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsx
Line: 67
Comment:
**Unavailable Items Remain Configurable**
This page now lists every customizable item, but `SidebarNavSection` still gates Contexts, Activity, and Loops with runtime feature state. When one of those features is unavailable, selecting its checkbox persists a visible override while the sidebar continues to omit it, so the control appears to succeed but has no effect.
**Rule Used:** When implementing new features, ensure that the UI... ([source](https://app.greptile.com/posthog-org-19734/-/custom-context?memory=5d57f0af-0be1-44de-8885-055f27e2885f))
**Learned From**
[PostHog/posthog#32595](https://github.com/PostHog/posthog/pull/32595)
[PostHog/posthog#32677](https://github.com/PostHog/posthog/pull/32677)
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!
There was a problem hiding this comment.
Fixed in af048df. Sidebar settings now apply the same availability rules as the sidebar for Loops, Channels, and Activity, with regression coverage for unavailable features.
Generated-By: PostHog Code Task-Id: 884159da-252c-4037-ab49-c6178d27732e
There was a problem hiding this comment.
Contained frontend navigation/settings reorg with no auth, billing, API, schema, dependency, or CI surface touched; the one substantive review concern (unavailable items staying configurable) was fixed in the current head with matching regression tests and acknowledged by the bot reviewer's 👍.
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 329L, 8F substantive, 618L/13F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (618L, 13F, single-area, unknown) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ f1563f9 · reviewed head af048df |
|
/truck merge |
|
/trunk merge |
Problem
Configuration destinations were duplicated in the main navigation, while sidebar customization was hidden behind a More dropdown.
Why: Keep configuration destinations grouped in one place and make the primary navigation simpler and more predictable.
Changes
How did you test this?
Automatic notifications
Created with PostHog Code