Skip to content

Make diff stats indicator clickable to toggle review mode#1560

Merged
adboio merged 1 commit intomainfrom
posthog-code/add-diff-toggle-button-to-message-input
Apr 8, 2026
Merged

Make diff stats indicator clickable to toggle review mode#1560
adboio merged 1 commit intomainfrom
posthog-code/add-diff-toggle-button-to-message-input

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented Apr 8, 2026

TL;DR

The diff stats indicator in the message editor is now clickable to toggle between split and closed review modes, providing a more intuitive way for users to control the code review interface.

Problem

Users need a quick way to toggle the code review mode without using alternative controls. Making the diff stats indicator interactive provides an obvious, discoverable control point.

Changes

  • DiffStatsIndicator component:

    • Converted from a Flex container to a clickable button element with transparent background and pointer cursor
    • Added taskId prop to identify which review task to control
    • Integrated with useReviewNavigationStore to read and update review mode state
    • Added click handler that toggles review mode between "closed" and "split" states
    • Applied inline-flex styling to maintain visual layout while functioning as a button
  • MessageEditor component:

    • Passed taskId prop to DiffStatsIndicator component

How did you test this?

The changes maintain the visual appearance of the diff stats while converting it to a functional button element. The component will properly read the current review mode state and toggle it when clicked.


Created with PostHog Code

Generated-By: PostHog Code
Task-Id: c5212e57-a098-4590-b83f-0f0e56cd6331
@adboio adboio requested a review from a team April 8, 2026 16:21
@adboio adboio merged commit 80d59e0 into main Apr 8, 2026
15 checks passed
@adboio adboio deleted the posthog-code/add-diff-toggle-button-to-message-input branch April 8, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants