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

Clarify diff view controls - #3906

Merged
trunk-io[bot] merged 6 commits into
mainfrom
posthog-code/clarify-diff-view-controls
Jul 29, 2026
Merged

Clarify diff view controls#3906
trunk-io[bot] merged 6 commits into
mainfrom
posthog-code/clarify-diff-view-controls

Conversation

@dmarticus

@dmarticus dmarticus commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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:

  • Verified a local run retains the panel splitter with a single Chat tab.
Screenshot 2026-07-28 at 9 44 39 PM
  • Verified a cloud run does not offer the panel splitter.
Screenshot 2026-07-28 at 9 44 47 PM

Automatic notifications

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

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 4a2adf0e-b339-400e-a390-5e08ceab8265
@trunk-io

trunk-io Bot commented Jul 29, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit aeef48a.

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
@dmarticus
dmarticus marked this pull request as ready for review July 29, 2026 04:52
Comment on lines +110 to +112
onSplitPanel={
isCloud ? undefined : (direction) => onSplitPanel(node.id, direction)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
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
puemos self-requested a review July 29, 2026 05:38

@puemos puemos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Non-blocking: I wonder if we should change the icon to reflect that it's just a diff wheel view and not a split

@trunk-io
trunk-io Bot merged commit 80de28f into main Jul 29, 2026
33 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/clarify-diff-view-controls branch July 29, 2026 05:57
@dmarticus dmarticus mentioned this pull request Jul 29, 2026
2 tasks
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