You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline lf-diff patches get no line or file comment controls #2124
An lf-diff whose patch is written inline in its <pre> renders the patch and its file navigation, but offers no comment control on any source line or file. The same patch bound to a data source gets a comment button in the gutter of every line, shown on hover, and one on each file header.
In the diff package's lf-diff.js, the file and line comment controls are attached only when the diff is bound (attachEntryControls(entry, { commentable: bound }), and attachLineComments behind if (bound)).
Expected
Either an inline patch gets the same comment controls as a bound one, or the widget's instructions say that line and file comments need a bound source. The lf-diff entry's instructions present the inline form ("With no source, write the exact patch in pre at column 0") as an equal alternative, so an author who picks it ships a diff the reader cannot comment on line by line, with nothing in leaf page check to flag it.
Repro
leaf page init --package diff <page>
Add an inline diff to the page: <lf-diff id="inline"><pre> followed by a one-file patch with a single hunk, then </pre></lf-diff>.
Serve the page and hover a line of the diff: no comment button appears.
Replace it with <lf-diff id="bound" source="patch-bound"><pre></pre></lf-diff>, and set the source from the same patch: git diff | leaf package run diff patch_manifest.py | leaf data set <page> patch-bound.
Hover a line again: a + comment button appears in the gutter.
#2125 makes inline diff files and lines commentable. Its browser regression creates both kinds of comment and confirms the stored anchors name the expected file and line; the focused checks passed. The PR is awaiting the separate shortcut-bar.js lint fix in #2123 before its CI can pass, then it can be reviewed for landing.
Activity
leaf-agent commentedon Oct 9, 2026
#2125 makes inline diff files and lines commentable. Its browser regression creates both kinds of comment and confirms the stored anchors name the expected file and line; the focused checks passed. The PR is awaiting the separate
shortcut-bar.jslint fix in #2123 before its CI can pass, then it can be reviewed for landing.