Merge requests

A merge request view is a scope plus a filter, rendered as a table. The scope comes from browsing, the filter from the filter bar, and every column in the table arrives in the same query as the rows.

mr-group-section
Five sections, five queries, all issued at once. The preview pane fetches its extra detail only for the selected row.

Scope

Three scopes cover the ways people look for merge requests, and you reach all three from the browse tree:

  • Your own work, instance-wide, already on Home.
  • A group, including every subgroup beneath it, in one round trip.
  • A project, when the question is about one repository.

A group scope uses Group.mergeRequests(includeSubgroups: true), so a nested tree of projects costs one wait rather than one wait per project.

Columns

title, blockers and pipeline are drawn at every width. The rest have a priority and a minimum width, and drop in a fixed order as the terminal narrows. Draft is a marker in the leftmost cell and a filter, rather than a column of its own.

ColumnWhat it showsDrops at
titleThe title, truncated with rather than hard-clippednever
blockersWhy it cannot merge, in words, including train 3/7 for a merge trainnever
pipelineThe head pipeline's status, returned with the merge requestnever
approvals2/2, how many approvals it has against how many it needs< 60
projectWhich repository the merge request is in< 68
updatedRelative by default, absolute in the preview< 76
authorWho wrote it< 90
labelsGitLab's own label colours, with a +n overflow< 110
diff+412 −38, so review cost is visible from the row< 124
threadsTotal comments, and unresolved threads separately< 136
branchSource and target branch< 150
instanceWhich GitLab a row came from, in a mixed-instance tablemixed-instance tables only

Widths are in terminal columns. Under 80 columns the preview pane hides itself as well.

The preview pane

Enter focuses the preview and p hides it. Its position is automatic: to the right at 120 columns or wider, along the bottom below that.

The preview renders the description as markdown and shows branches, dates, approval detail with each reviewer's state, the head pipeline's stages, thread count, and diff stats. It fetches that detail for the selected row only, which keeps the table query to the fields the columns render.

Preview tabs cover Overview, Pipeline, Approvals, Threads, Commits and Files. [ and ] move between them.

What you can do

KeyActionKeyAction
oopen in the browservapprove or unapprove
y Ycopy the branch, copy the URLmmerge
Jload the next 50ccomment
/filter the loaded rowsCcheck out the branch
Spacemulti-selectt a slabels, assignees, reviewers

y and Y use OSC 52, so they work over SSH and inside tmux with no clipboard helper installed.

A team's queue

Your own queues are on Home. For somebody else's:

StepKeyWhat it does
1b then Enter on platformScopes the table to the group and every subgroup
2fstate:opened author:!@me updated < 3wOpen, not yours, still moving
3PKeeps it as a tab called platform/*

Paging

Every list is paginated at 50 rows, in GraphQL and REST alike. J loads the next page by cursor, and the tab count comes from the connection, so you know the size of a section before you page through it. A group with 1,447 open merge requests pages the same way as one with twelve.

A section holds a bounded number of rows and releases the head as you page past it, so a long session cannot exhaust memory.

Grouping by project

A cross-project table of two hundred rows reads better split by repository. Grouping collapses it into project headers with their own counts, and z folds one while Z folds all of them, the same keys that collapse a Home group or a tree node.

Prompts

Comment, labels, assignees and reviewers all use one prompt. A single-line value draws in the footer; a comment box opens over the table with room to write. Values complete from the project's real labels and members, so a name cannot be misspelled into a new label.

Esc leaves a prompt without submitting, and it asks first when you have typed something, so a half-written comment survives a stray keypress.