Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mathijs81
Copy link
Contributor

@mathijs81 mathijs81 commented Dec 6, 2025

🧢 Changes

Clicking the commit details title opens the edit dialog.

☕️ Reasoning

Currently, branch names can be inline-edited, but commit details not.
The UX is still a bit different as the implementing svelte classes are totally different (the branch name is rendered as an edit box, but for the commit details we have to pop up the little edit pane).

I chose to make the cursor a caret/text-pointer on hover to mimic the same look as with the branch editing, but I think cursor: pointer would also be good as it is not inline editing after all.

See video for before and after:

butler2.mp4

just like for branches
Copilot AI review requested due to automatic review settings December 6, 2025 10:10
@vercel
Copy link

vercel bot commented Dec 6, 2025

@mathijs81 is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ability to edit commit messages by clicking on the commit title, improving UX consistency with how branch names are currently edited. The implementation makes the commit title interactive when it's editable, opening the commit message editor dialog on click.

Key Changes:

  • Added click-to-edit functionality for commit titles
  • Implemented proper keyboard accessibility (Enter/Space support)
  • Applied visual feedback (cursor change and hover opacity)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/desktop/src/components/CommitView.svelte Added onclick prop to CommitTitle component that triggers edit mode when conditions are met
apps/desktop/src/components/CommitTitle.svelte Made the title element interactive with proper accessibility attributes (role, tabindex, keyboard handlers) and styling for the clickable state

truncate
commitMessage={commit.message}
className="text-14 text-semibold text-body"
editable={!isReadOnly}
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent conditions: editable is set to !isReadOnly, but onclick checks canEdit() which requires both modeService !== undefined and !isReadOnly. This means when modeService is undefined but isReadOnly is false, the title will appear editable (cursor: text, hover opacity) but won't be clickable. Consider changing line 169 to editable={canEdit()} to ensure both conditions match.

Suggested change
editable={!isReadOnly}
editable={canEdit()}

Copilot uses AI. Check for mistakes.
@PavelLaptev PavelLaptev marked this pull request as draft December 6, 2025 21:05
@PavelLaptev
Copy link
Contributor

Thank you for splitting this up :-) I’ll try to check it this week.

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