Skip to content

Fix unstaging renamed files#3547

Closed
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-rename-unstage
Closed

Fix unstaging renamed files#3547
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-rename-unstage

Conversation

@MattPua

@MattPua MattPua commented Jul 17, 2026

Copy link
Copy Markdown
Member

Problem

Renamed files in code review could not be fully unstaged because the action only sent the original path to Git.

Why: Users need the unstage button to work consistently for staged renames.

Changes

  • Send both the original and current paths when toggling a renamed file
  • Add regression coverage for regular and renamed path selection

How did you test this?

  • pnpm --dir packages/ui exec vitest run src/features/task-detail/hooks/stageTogglePaths.test.ts
  • pnpm exec biome check packages/ui/src/features/task-detail/hooks/stageTogglePaths.ts packages/ui/src/features/task-detail/hooks/stageTogglePaths.test.ts packages/ui/src/features/task-detail/hooks/useStageToggle.ts
  • pnpm exec turbo typecheck --filter=@posthog/ui

Automatic notifications

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

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 496a1722-3291-4262-9b8b-1dccc2c7a652
@trunk-io

trunk-io Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 7f167ac.

@MattPua MattPua closed this Jul 17, 2026
@MattPua
MattPua deleted the posthog-code/fix-rename-unstage branch July 17, 2026 19:03
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.

1 participant