Skip to content

fix(desktop): keep diff file header items left-aligned on wrap#3858

Merged
saddlepaddle merged 1 commit into
mainfrom
fix-diff-viewer-breakpoin
Apr 29, 2026
Merged

fix(desktop): keep diff file header items left-aligned on wrap#3858
saddlepaddle merged 1 commit into
mainfrom
fix-diff-viewer-breakpoin

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 29, 2026

Summary

  • The v2 diff file header used justify-between with flex-wrap. When the action cluster (additions count, Viewed checkbox, eye/copy/discard buttons) wrapped to a second row at narrow widths, the remaining chevron, status indicator, and file badge spread out across the first row with large gaps between them.
  • Removed justify-between so those items stay tight on the left; ml-auto on the action div still pushes it to the right when it wraps to row 2.

Test plan

  • Open a v2 workspace diff pane and shrink the pane horizontally until the action cluster wraps onto a second row — confirm the chevron, status icon, and file path badge stay grouped on the left of row 1 with no gap between them.
  • At wider widths, confirm the header still lays out on a single row with the actions anchored to the right.

Summary by cubic

Fixes the diff file header layout so items stay left-aligned when the actions wrap on narrow widths, removing awkward gaps. Removes justify-between from the header container; ml-auto still pushes the action group right when space allows.

  • Bug Fixes
    • Prevents chevron, status icon, and file badge from spreading across row 1 by removing justify-between on the flex container.
    • Preserves single-row layout at wider widths with actions anchored right.

Written for commit cc4bfa1. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Style
    • Refined spacing and alignment in the diff file header component.

The v2 diff file header used `justify-between` with `flex-wrap`, so when
the action cluster wrapped to a second row at narrow widths, the
remaining chevron, status indicator, and file badge spread out across
the first row with large gaps between them. Removing `justify-between`
keeps those items tight on the left while `ml-auto` on the action div
still anchors it to the right when it wraps.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 22875120-46c1-468e-8eeb-aaa1c2a40c4a

📥 Commits

Reviewing files that changed from the base of the PR and between 533e00f and cc4bfa1.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx

📝 Walkthrough

Walkthrough

Updated Tailwind styling in the DiffFileHeader component by removing the justify-between class and adding explicit gap-1 spacing to the flex container. This purely adjusts layout spacing without affecting component logic or UI structure.

Changes

Cohort / File(s) Summary
DiffFileHeader Styling
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx
Removed justify-between flex alignment and added gap-1 for explicit spacing in the root container's Tailwind classes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, a spacing delight!
Justify-between took its final flight,
Gap-one arrives to fill the space,
With gentle margins, more breathing room's grace!
Layout flows smooth—such pixel-perfect sight! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-diff-viewer-breakpoin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 6/8 reviews remaining, refill in 10 minutes and 10 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

Removes justify-between from the v2 diff file header container so that the chevron, status indicator, and file path badge stay left-aligned on the first row when the action cluster wraps to a second row. The ml-auto on the action div (line 87) continues to push the cluster to the right when it fits on the same row, so single-row layout is unaffected.

Confidence Score: 5/5

Safe to merge — minimal, targeted Tailwind class removal with no logic changes.

The only change is dropping justify-between from one className string. The existing ml-auto on the action div correctly handles right-alignment at wider widths, so neither layout mode regresses. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx Single-class removal of justify-between; ml-auto on the action cluster preserves right-alignment on wide viewports while fixing the left-spread bug on wrap.

Reviews (1): Last reviewed commit: "fix(desktop): keep diff file header item..." | Re-trigger Greptile

@saddlepaddle saddlepaddle merged commit 6cb2099 into main Apr 29, 2026
5 of 7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

@Kitenite Kitenite deleted the fix-diff-viewer-breakpoin branch May 6, 2026 04:52
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