Skip to content

[BUG REPORT] Long branch names squeeze “Amend last commit” while resizing the Git panel #20

Closed

Description

@YIzhongyue

Where

Windows

What happened

When the current Git branch has a long name, resizing the right-hand Git panel can squeeze the “Amend last commit” label into a very narrow column.

Image

As shown in the screenshot, the label wraps into individual letters or short fragments while the “Commit to …” button occupies most of the row. This makes the commit controls unusually tall and pushes the Commits section downward.

Static code inspection suggests a width-allocation issue in the shared CommitInput component. Its footer already uses flex wrapping, but the amend wrapper uses flex_1().min_w_0(), allowing it to collapse instead of moving the commit button onto another row. The checkbox label is also shrinkable.
A possible fix would be to preserve a usable width for the amend control and place the commit button on a full-width second row when both controls cannot fit. Long branch names should remain constrained and ellipsized within the button. This likely requires a change in Ely-GPUI-Components followed by updating ELYTerminal’s pinned dependency.

Relevant code:
ELYTerminal’s CommitInput usage
Shared CommitInput footer

Steps to reproduce

  1. Open a Git repository with a long current branch name.
  2. Open the Git tab in the right-hand panel.
  3. Drag the divider to reduce and increase the panel width.
  4. Observe the “Amend last commit” label beside the “Commit to …” button.

Example branch name for testing: feature/ui-amend-layout-with-a-very-long-branch-name.
These steps describe the reported interaction; they have not been independently rerun during code inspection.

What you expected

The amend label should remain readable and its checkbox usable while resizing, without character-by-character wrapping or an excessively tall footer.
When space is limited, the controls should reflow cleanly, for example by moving the commit button onto a second row and truncating its branch text. Commit and amend behavior should remain unchanged.

Commit or version

ELYTerminal 0.1.8

Logs

No logs provided. The attached screenshot shows the visual issue.

Activity

  1. added
    bug
    on Oct 23, 2026
  2. YIzhongyue commented on Oct 23, 2026

    @YIzhongyue
    Author

    I looked into this further while trying to fix it in my ELYTerminal fork. The layout issue appears to originate in the shared CommitInput component in Ely-GPUI-Components, rather than ELYTerminal’s panel-resizing logic.

    The footer already allows wrapping, but the amend control can shrink too far when the commit button contains a long branch name. I also explored an app-local workaround, but preserving the existing keyboard-submit behavior would require access to a private action type in the component library. Fixing the layout directly in the shared component seems cleaner and would avoid duplicating it in ELYTerminal.

    I plan to try a fix in my fork of Ely-GPUI-Components, keeping the amend label readable and allowing the commit button to move onto another row when space is limited. I’ll also check that resizing and the existing commit/amend interactions remain unchanged.

    Please let me know if you have a preferred approach for the narrow-panel layout.

  3. Raiden-MeixElysia commented on Oct 24, 2026

    @Raiden-MeixElysia
    Contributor

    Thank you, @YIzhongyue. You found the cause, the amend box's flex_1().min_w_0() in Ely's CommitInput, and you wrote the fix and its tests. I took your commit as it stands.

    • ELYTerminal now pins 996bd22, your commit, on a new branch of Ely, elyterminal-0.1.1. You built it on the 7f7a715 that 0.1.8 pins, as your note says, so the pin moves by your change alone. Ely's main has since split into crates and moved to gpui 0.3.9; that move is a task of its own.
    • Ely's main has it too: 6075389 is your commit, your name on it. 64fad26 ports your Linux test to the ely-git crate, where the old crate::assets::load_fonts and gpui_platform now come through ely_core::Assets and dev-dependencies.

    On macOS, with your branch name and a staged change, the old pin broke the label into letters at a 480-pixel panel and into two lines at 560; the new one keeps it whole from 160 to 560, Commit on its own row. A review then laid out every width from 143 to 960 pixels over four branches, amend off and on, and committed and amended at 160 by press and by Cmd-Enter. A Windows run at your display scale is still to come. The fix ships in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions