Skip to content

Conversation

Copy link

Copilot AI commented Nov 7, 2025

Closes desktop#11685

Description

When files have only permission changes (e.g., chmod +x), Desktop displayed misleading messages like "Only whitespace changes found" with no indication of what actually changed.

This PR has been rebased onto the development branch and properly integrates with upstream changes including submodule status tracking, rename score features, and path highlighting functionality.

Implementation

  • Status parsing: Extract mode fields (mH, mI, mW) from existing git status v2 output, compare HEAD→index or index→working tree based on change location
  • Data model: Add optional oldMode/newMode to PlainFileStatus and CopiedOrRenamedFileStatus, alongside upstream's submoduleStatus and renameIncludesModifications fields
  • UI rendering: Display mode changes as (100644 → 100755) next to filename in PathLabel component, integrated with upstream's span-based rendering and matches prop
  • Styling: Subtle gray text at 0.7 opacity, 0.9em font size
  • Testing: Added 3 unit tests for mode change parsing in index, working tree, and unchanged scenarios

The mode information flows from status parser → file status model → UI without additional git calls. Handles all status types (Modified, New, Renamed, Copied, Deleted). Changes are properly merged with upstream features for submodule tracking and rename detection.

Screenshots

Before: File with permission change shows no indication

✓ script.sh [M]

After: Permission change clearly visible

✓ script.sh (100644 → 100755) [M]

Release notes

Notes: When files have only permission changes, the mode change (e.g., 100644 → 100755) now displays next to the filename in the changes list.

Original prompt

desktop#11685
Addressed this issue by displaying the permission index changes next to the file name


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits November 7, 2025 01:26
Co-authored-by: say25 <7467062+say25@users.noreply.github.com>
Co-authored-by: say25 <7467062+say25@users.noreply.github.com>
Co-authored-by: say25 <7467062+say25@users.noreply.github.com>
Copilot AI changed the title [WIP] Display permission index changes next to file name Display file permission changes next to filenames Nov 7, 2025
Copilot AI requested a review from say25 November 7, 2025 01:49
@say25
Copy link
Owner

say25 commented Nov 7, 2025

@copilot rebase these changes off the default branch

Copy link
Author

Copilot AI commented Nov 7, 2025

@copilot rebase these changes off the default branch

I've rebased the changes onto the development branch (upstream/development). The commits have been successfully rebased and merged with the latest upstream changes including submodule status tracking and rename score features.

The new commit is 1d3030a which includes all the permission display changes properly merged with the upstream code. However, I'm unable to force push the rebased branch due to authentication constraints with the git push command.

To complete the rebase, you'll need to manually force push the local copilot/add-permission-index-display branch to origin.

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.

Permission changes are classified as whitespace changes

2 participants