detached 4ee449b

docs(diff): say that files over the one-file cap take no line comment

commit
4ee449b2f550f20e1a694e8f09bcf5fec56c439d
author
brice · · 2026-10-20 08:19 UTC
parent
17fbcbb
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +5 -4
M docs/merge-requests.md +1 -1
@@ -67,7 +67,7 @@ In the web merge box a mode that is not possible is disabled with its reason, an
6767
6868 The merge request, commit and compare pages list every changed file. Generated files (lockfiles, `vendor/`, `node_modules/`, minified or generated code) and large files (over 2,000 changed lines) are collapsed: the header and the counts show, the lines do not. "load diff" fetches that one file in place, in full, and you can comment on its lines. Without scripts the link reloads the page with that file loaded. After the first 25 files of a merge request, the other files load as you scroll.
6969
70-A commit page reads the hunks of its first 300 files with the page; the other files are listed collapsed and load one at a time. A file that cannot be shown in the browser, over 8 MiB of text or over 50,000 changed lines when loaded alone, has no "load diff": the page links to its raw blob instead.
70+A commit page reads the hunks of its first 300 files with the page; the other files are listed collapsed and load one at a time. A file that cannot be shown in the browser, over 8 MiB of text or over 50,000 changed lines when loaded alone, has no "load diff": the page links to its raw blob instead, and its lines take no comment.
7171
7272 ## Notes
7373
@@ -67,7 +67,7 @@ In the web merge box a mode that is not possible is disabled with its reason, an
67 67
68 The merge request, commit and compare pages list every changed file. Generated files (lockfiles, `vendor/`, `node_modules/`, minified or generated code) and large files (over 2,000 changed lines) are collapsed: the header and the counts show, the lines do not. "load diff" fetches that one file in place, in full, and you can comment on its lines. Without scripts the link reloads the page with that file loaded. After the first 25 files of a merge request, the other files load as you scroll.68 The merge request, commit and compare pages list every changed file. Generated files (lockfiles, `vendor/`, `node_modules/`, minified or generated code) and large files (over 2,000 changed lines) are collapsed: the header and the counts show, the lines do not. "load diff" fetches that one file in place, in full, and you can comment on its lines. Without scripts the link reloads the page with that file loaded. After the first 25 files of a merge request, the other files load as you scroll.
69 69
70-A commit page reads the hunks of its first 300 files with the page; the other files are listed collapsed and load one at a time. A file that cannot be shown in the browser, over 8 MiB of text or over 50,000 changed lines when loaded alone, has no "load diff": the page links to its raw blob instead.70+A commit page reads the hunks of its first 300 files with the page; the other files are listed collapsed and load one at a time. A file that cannot be shown in the browser, over 8 MiB of text or over 50,000 changed lines when loaded alone, has no "load diff": the page links to its raw blob instead, and its lines take no comment.
71 71
72 ## Notes72 ## Notes
73 73
M internal/usecase/mergerequests.go +4 -3
@@ -780,9 +780,10 @@ func (m *MergeRequests) checkLine(ctx context.Context, mr domain.MergeRequest, p
780780 // file's hunks within the default total limits would reject a comment on a
781781 // file the earlier ones left no budget for. So a first read lists the files
782782 // with no hunks (From past the end: cheap, git is stopped at once), and a
783- // second loads the one file in full (a Full window: no line cap, the byte
784- // guard only, generated files included), as the web view does when it loads
785- // a collapsed file: any line the page can show can be commented on.
783+ // second loads the one file in full (a Full window: the byte guard and
784+ // domain.MaxOneFileLines only, generated files included), as the web view
785+ // does when it loads a collapsed file: any line the page can show can be
786+ // commented on, and a file over those limits takes no line comment.
786787 list := domain.DefaultDiffLimits()
787788 list.MaxFiles, list.From = 0, math.MaxInt
788789 _, diff, err := m.git.DiffCommits(ctx, mr.Repo, base, mr.HeadID, list)
@@ -780,9 +780,10 @@ func (m *MergeRequests) checkLine(ctx context.Context, mr domain.MergeRequest, p
780 // file's hunks within the default total limits would reject a comment on a780 // file's hunks within the default total limits would reject a comment on a
781 // file the earlier ones left no budget for. So a first read lists the files781 // file the earlier ones left no budget for. So a first read lists the files
782 // with no hunks (From past the end: cheap, git is stopped at once), and a782 // with no hunks (From past the end: cheap, git is stopped at once), and a
783- // second loads the one file in full (a Full window: no line cap, the byte783+ // second loads the one file in full (a Full window: the byte guard and
784- // guard only, generated files included), as the web view does when it loads784+ // domain.MaxOneFileLines only, generated files included), as the web view
785- // a collapsed file: any line the page can show can be commented on.785+ // does when it loads a collapsed file: any line the page can show can be
786+ // commented on, and a file over those limits takes no line comment.
786 list := domain.DefaultDiffLimits()787 list := domain.DefaultDiffLimits()
787 list.MaxFiles, list.From = 0, math.MaxInt788 list.MaxFiles, list.From = 0, math.MaxInt
788 _, diff, err := m.git.DiffCommits(ctx, mr.Repo, base, mr.HeadID, list)789 _, diff, err := m.git.DiffCommits(ctx, mr.Repo, base, mr.HeadID, list)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 45

↑↓ moveenter openesc close