Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 11, 2025

Previously, executable files showed a separate "Ex" badge alongside the file icon, which didn't integrate well with the visual design. This change makes executable indicators additive by overlaying a small "x" badge on the base file icon, while ensuring symlinks and submodules always display their specific icons regardless of executable status.

Changes

File Icon System Overhaul:

  • Added new fileType prop to FileIcon, FileName, FileListItem, and FileViewHeader components
  • Created fileTypeUtils.ts with functions to determine file types from TreeChange objects
  • Added new SVG icons for symlinks, submodules, and executable overlay
  • Removed the separate ExecutableLabel component in favor of integrated overlay

Icon Behavior:

  • Regular files: Show base icon without overlay
  • Executable files: Show base icon with small green "x" overlay in top-right corner
  • Symlinks: Always show cyan chain/link icon, never executable overlay
  • Submodules: Always show orange folder-with-git-badge icon, never executable overlay

Backend Integration:

  • Updated FileList and FileListItemWrapper to detect file types from ChangeState.kind
  • Maintains backward compatibility with existing executable prop
  • Properly handles all git object types: Blob, BlobExecutable, Link, Commit

Visual Result

File Icon Comparison

The new system provides a cleaner, more integrated approach where:

  • Executable status is visually additive rather than separate
  • Symlinks and submodules maintain their distinct visual identity
  • File type hierarchy is respected (symlink/submodule > executable > regular)

This addresses the issue where executable files should have their base icon with an executable indicator, while ensuring symlinks and submodules always look like what they are regardless of their executable status.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
gitbutler-web Ignored Ignored Preview Sep 11, 2025 10:14am

@Copilot Copilot AI changed the title [WIP] @gitbutlerapp/gitbutler/issues/10215 With this as basis, make executable bits additive, so that executable files have their base icon, with a little x indicator added on top showing they are executable. Symlinks should always look like a link, and su... Make executable bits additive with symlink/submodule priority in file icons Sep 11, 2025
Copilot finished work on behalf of Byron September 11, 2025 10:20
@Copilot Copilot AI requested a review from Byron September 11, 2025 10:20
@Byron Byron marked this pull request as ready for review September 11, 2025 10:36
@Byron
Copy link
Collaborator

Byron commented Sep 11, 2025

Screenshot 2025-09-11 at 12 52 31

This already kind-of works, even though I think the code needs a lot of cleanup and that it's easier to just do it by hand. Would this be a quick-thing for @estib-vega ?
If so, the PR could be finalised by @PavelLaptev so we get proper icons and merge this 🎉.

@Byron Byron requested a review from estib-vega September 11, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants