Skip to content

[v5] Suggest a suite's existing branches when editing a commit's branch - #677

Merged
ldionne merged 1 commit into
llvm:mainfrom
ldionne:v5-commit-branch-suggestions
Nov 27, 2026
Merged

ldionne merged 1 commit into
llvm:mainfrom
ldionne:v5-commit-branch-suggestions

Conversation

@ldionne

@ldionne ldionne commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

A commit's branch is free-form text, so a typo (relase/22.x) silently started a new branch. The Commit Detail page's branch editor now suggests the suite's existing branches (from GET branches, listed anew each time it opens) while still taking any text. A muted "New branch" note below the input shows when the text is none of them.

  • Picking a suggestion only fills the input. Save or Enter saves, as in any inline edit.
  • Typing filters the suggestions. Opening the list from its button or with ArrowDown lists every branch, even when the text matches none.
  • Enter picks only a suggestion moved to from the keyboard, and Tab never picks.
  • If the branches can't be listed, the note's place says so, with Retry, and the input still saves any text.
  • AR14 now describes this free-text combobox variant, and DT3 describes the suggestions and the note.

Fixes #674

@ldionne
ldionne force-pushed the v5-commit-branch-suggestions branch from 5e2e7f6 to e93797f Compare November 19, 2026 21:08
A commit's branch is free-form text, edited in place on the Commit Detail
page, and nothing helped to pick an existing name: a typo such as
`relase/22.x` silently started a new branch, taking the commit out of its
branch's history on the Graph and the Dashboard. The branch's editor now
suggests the suite's branches, from GET branches, listed anew each time it
opens, while still taking any text. A muted "New branch" note below the
input shows when the trimmed text is not empty, not the commit's branch,
and none of the suggested branches, which is what catches typos.

The editor stays an inline text field (AR12): picking a suggestion only
fills the input, and Save or Enter saves, so that a misclick or an arrow
key too many cannot move a commit to another branch. Typing filters the
suggestions, and opening the list from its button or with ArrowDown lists
them all, so that the real branches can be seen next to a typo. Enter picks
only a suggestion highlighted from the keyboard, never one highlighted
under the pointer, and Tab never picks. AR14 now scopes its value-model
rules to comboboxes whose value is a suggestion, and describes this
free-text variant. If the branches cannot be listed, the note's place says
so, with Retry, which leaves the focus in the input, and the input still
saves any text.

The editor is a small TextCombobox of its own rather than a mode of the
manual-selection Combobox, whose value model does not apply; it reuses
Combobox's list and the popover. Branches are few, so it filters its
suggestions at once rather than through useLocalSuggestions' deferred
render, which would show the list for a moment on each keystroke that
matches nothing. It closes its list itself when nothing matches, since
React Aria's collection lags a render behind controlled items. Its
selection is controlled to null, which already keeps React Aria from
putting text back, so it does not also set allowsCustomValue. React Aria
does not move the highlight on hover once the keyboard has moved it, but a
suggestion the pointer highlighted since the last arrow key is still not
picked by Enter. InlineEdit gains a `below` slot for the note.

Fixes llvm#674
@ldionne
ldionne force-pushed the v5-commit-branch-suggestions branch from e93797f to 09509b0 Compare November 27, 2026 15:33
@ldionne
ldionne enabled auto-merge (squash) November 27, 2026 15:36
@ldionne
ldionne merged commit b7e542b into llvm:main Nov 27, 2026
9 checks passed
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.

[v5] Suggest a suite's existing branches when editing a commit's branch

1 participant