Clarify diff view controls - #3906
Conversation
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
| onSplitPanel={ | ||
| isCloud ? undefined : (direction) => onSplitPanel(node.id, direction) | ||
| } |
There was a problem hiding this comment.
Cloud drag splitting remains enabled
When a tab is dragged onto an edge drop zone in a cloud layout, PanelDropZones invokes the store's split operation independently of onSplitPanel, causing an unsupported split pane—including an empty pane when its terminal tab is filtered—to be created and persisted despite this cloud guard.
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/panels/components/LeafNodeRenderer.tsx
Line: 110-112
Comment:
**Cloud drag splitting remains enabled**
When a tab is dragged onto an edge drop zone in a cloud layout, `PanelDropZones` invokes the store's split operation independently of `onSplitPanel`, causing an unsupported split pane—including an empty pane when its terminal tab is filtered—to be created and persisted despite this cloud guard.
**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)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Prompt To Fix All With AI### Issue 1
packages/ui/src/features/panels/components/LeafNodeRenderer.tsx:110-112
**Cloud drag splitting remains enabled**
When a tab is dragged onto an edge drop zone in a cloud layout, `PanelDropZones` invokes the store's split operation independently of `onSplitPanel`, causing an unsupported split pane—including an empty pane when its terminal tab is filtered—to be created and persisted despite this cloud guard.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Format panel close control" | Re-trigger Greptile |
Generated-By: PostHog Code Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
puemos
left a comment
There was a problem hiding this comment.
Looks good, just one unblocking commit and also the greptile finding
| label: "Open review panel", | ||
| label: "Open diff view", | ||
| icon: ( | ||
| <ViewVerticalIcon className="h-3 w-3 rotate-180 text-gray-11" /> |
There was a problem hiding this comment.
🟡 Non-blocking: I wonder if we should change the icon to reflect that it's just a diff wheel view and not a split
Problem
Task diff controls use “review panel” terminology, making the diff surface harder to discover. Cloud runs also expose panel splitting despite not supporting the local workspace content that makes split panes useful, leaving behind an empty pane.
Why: Users should be able to identify where code changes can be reviewed without accidentally creating a cloud pane they cannot use or dismiss.
Changes
Rename the relevant controls to use “diff view,” hide panel splitting for cloud runs while preserving it for local runs, and add a top-right close action for previously-created empty cloud panes.
How did you test this?
Tested locally in the Electron dev app:
Automatic notifications
Created with PostHog Code