detached e84f160

fix(web): size split diff columns from a colgroup and wrap long lines

commit
e84f160db4eada9fdd7ce1ed1aadcc5dfa24e76c
author
brice · · 2026-10-11 12:42 UTC
parent
bcc3a12
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
9 files · +88 -8
M cmd/ermite/testdata/web/commit-merge.html +8 -0
@@ -131,6 +131,14 @@
131131 </tbody>
132132 </table>
133133 <table class="dt spl" aria-label="side.txt, split">
134+<colgroup>
135+<col class="c-ln">
136+<col class="c-m">
137+<col>
138+<col class="c-ln">
139+<col class="c-m">
140+<col>
141+</colgroup>
134142 <tbody>
135143 <tr class="hunk">
136144 <td colspan="6">@@ -0,0 +1,1 @@</td>
@@ -131,6 +131,14 @@
131 </tbody>131 </tbody>
132 </table>132 </table>
133 <table class="dt spl" aria-label="side.txt, split">133 <table class="dt spl" aria-label="side.txt, split">
134+<colgroup>
135+<col class="c-ln">
136+<col class="c-m">
137+<col>
138+<col class="c-ln">
139+<col class="c-m">
140+<col>
141+</colgroup>
134 <tbody>142 <tbody>
135 <tr class="hunk">143 <tr class="hunk">
136 <td colspan="6">@@ -0,0 +1,1 @@</td>144 <td colspan="6">@@ -0,0 +1,1 @@</td>
M cmd/ermite/testdata/web/commit-modify-split.html +8 -0
@@ -180,6 +180,14 @@ And &lt;b&gt;html&lt;/b&gt; &amp; &#34;quotes&#34;.</pre>
180180 </tbody>
181181 </table>
182182 <table class="dt spl" aria-label="a.txt, split">
183+<colgroup>
184+<col class="c-ln">
185+<col class="c-m">
186+<col>
187+<col class="c-ln">
188+<col class="c-m">
189+<col>
190+</colgroup>
183191 <tbody>
184192 <tr class="hunk">
185193 <td colspan="6">@@ -1,5 +1,6 @@</td>
@@ -180,6 +180,14 @@ And &lt;b&gt;html&lt;/b&gt; &amp; &#34;quotes&#34;.</pre>
180 </tbody>180 </tbody>
181 </table>181 </table>
182 <table class="dt spl" aria-label="a.txt, split">182 <table class="dt spl" aria-label="a.txt, split">
183+<colgroup>
184+<col class="c-ln">
185+<col class="c-m">
186+<col>
187+<col class="c-ln">
188+<col class="c-m">
189+<col>
190+</colgroup>
183 <tbody>191 <tbody>
184 <tr class="hunk">192 <tr class="hunk">
185 <td colspan="6">@@ -1,5 +1,6 @@</td>193 <td colspan="6">@@ -1,5 +1,6 @@</td>
M cmd/ermite/testdata/web/commit-modify.html +8 -0
@@ -180,6 +180,14 @@ And &lt;b&gt;html&lt;/b&gt; &amp; &#34;quotes&#34;.</pre>
180180 </tbody>
181181 </table>
182182 <table class="dt spl" aria-label="a.txt, split">
183+<colgroup>
184+<col class="c-ln">
185+<col class="c-m">
186+<col>
187+<col class="c-ln">
188+<col class="c-m">
189+<col>
190+</colgroup>
183191 <tbody>
184192 <tr class="hunk">
185193 <td colspan="6">@@ -1,5 +1,6 @@</td>
@@ -180,6 +180,14 @@ And &lt;b&gt;html&lt;/b&gt; &amp; &#34;quotes&#34;.</pre>
180 </tbody>180 </tbody>
181 </table>181 </table>
182 <table class="dt spl" aria-label="a.txt, split">182 <table class="dt spl" aria-label="a.txt, split">
183+<colgroup>
184+<col class="c-ln">
185+<col class="c-m">
186+<col>
187+<col class="c-ln">
188+<col class="c-m">
189+<col>
190+</colgroup>
183 <tbody>191 <tbody>
184 <tr class="hunk">192 <tr class="hunk">
185 <td colspan="6">@@ -1,5 +1,6 @@</td>193 <td colspan="6">@@ -1,5 +1,6 @@</td>
M cmd/ermite/testdata/web/commit-rename.html +8 -0
@@ -142,6 +142,14 @@
142142 </tbody>
143143 </table>
144144 <table class="dt spl" aria-label="gone.txt, split">
145+<colgroup>
146+<col class="c-ln">
147+<col class="c-m">
148+<col>
149+<col class="c-ln">
150+<col class="c-m">
151+<col>
152+</colgroup>
145153 <tbody>
146154 <tr class="hunk">
147155 <td colspan="6">@@ -1,1 +0,0 @@</td>
@@ -142,6 +142,14 @@
142 </tbody>142 </tbody>
143 </table>143 </table>
144 <table class="dt spl" aria-label="gone.txt, split">144 <table class="dt spl" aria-label="gone.txt, split">
145+<colgroup>
146+<col class="c-ln">
147+<col class="c-m">
148+<col>
149+<col class="c-ln">
150+<col class="c-m">
151+<col>
152+</colgroup>
145 <tbody>153 <tbody>
146 <tr class="hunk">154 <tr class="hunk">
147 <td colspan="6">@@ -1,1 +0,0 @@</td>155 <td colspan="6">@@ -1,1 +0,0 @@</td>
M cmd/ermite/testdata/web/commit-root.html +32 -0
@@ -158,6 +158,14 @@
158158 </tbody>
159159 </table>
160160 <table class="dt spl" aria-label="a.txt, split">
161+<colgroup>
162+<col class="c-ln">
163+<col class="c-m">
164+<col>
165+<col class="c-ln">
166+<col class="c-m">
167+<col>
168+</colgroup>
161169 <tbody>
162170 <tr class="hunk">
163171 <td colspan="6">@@ -0,0 +1,5 @@</td>
@@ -244,6 +252,14 @@
244252 </tbody>
245253 </table>
246254 <table class="dt spl" aria-label="gone.txt, split">
255+<colgroup>
256+<col class="c-ln">
257+<col class="c-m">
258+<col>
259+<col class="c-ln">
260+<col class="c-m">
261+<col>
262+</colgroup>
247263 <tbody>
248264 <tr class="hunk">
249265 <td colspan="6">@@ -0,0 +1,1 @@</td>
@@ -310,6 +326,14 @@
310326 </tbody>
311327 </table>
312328 <table class="dt spl" aria-label="old.txt, split">
329+<colgroup>
330+<col class="c-ln">
331+<col class="c-m">
332+<col>
333+<col class="c-ln">
334+<col class="c-m">
335+<col>
336+</colgroup>
313337 <tbody>
314338 <tr class="hunk">
315339 <td colspan="6">@@ -0,0 +1,3 @@</td>
@@ -381,6 +405,14 @@
381405 </tbody>
382406 </table>
383407 <table class="dt spl" aria-label="run.sh, split">
408+<colgroup>
409+<col class="c-ln">
410+<col class="c-m">
411+<col>
412+<col class="c-ln">
413+<col class="c-m">
414+<col>
415+</colgroup>
384416 <tbody>
385417 <tr class="hunk">
386418 <td colspan="6">@@ -0,0 +1,2 @@</td>
@@ -158,6 +158,14 @@
158 </tbody>158 </tbody>
159 </table>159 </table>
160 <table class="dt spl" aria-label="a.txt, split">160 <table class="dt spl" aria-label="a.txt, split">
161+<colgroup>
162+<col class="c-ln">
163+<col class="c-m">
164+<col>
165+<col class="c-ln">
166+<col class="c-m">
167+<col>
168+</colgroup>
161 <tbody>169 <tbody>
162 <tr class="hunk">170 <tr class="hunk">
163 <td colspan="6">@@ -0,0 +1,5 @@</td>171 <td colspan="6">@@ -0,0 +1,5 @@</td>
@@ -244,6 +252,14 @@
244 </tbody>252 </tbody>
245 </table>253 </table>
246 <table class="dt spl" aria-label="gone.txt, split">254 <table class="dt spl" aria-label="gone.txt, split">
255+<colgroup>
256+<col class="c-ln">
257+<col class="c-m">
258+<col>
259+<col class="c-ln">
260+<col class="c-m">
261+<col>
262+</colgroup>
247 <tbody>263 <tbody>
248 <tr class="hunk">264 <tr class="hunk">
249 <td colspan="6">@@ -0,0 +1,1 @@</td>265 <td colspan="6">@@ -0,0 +1,1 @@</td>
@@ -310,6 +326,14 @@
310 </tbody>326 </tbody>
311 </table>327 </table>
312 <table class="dt spl" aria-label="old.txt, split">328 <table class="dt spl" aria-label="old.txt, split">
329+<colgroup>
330+<col class="c-ln">
331+<col class="c-m">
332+<col>
333+<col class="c-ln">
334+<col class="c-m">
335+<col>
336+</colgroup>
313 <tbody>337 <tbody>
314 <tr class="hunk">338 <tr class="hunk">
315 <td colspan="6">@@ -0,0 +1,3 @@</td>339 <td colspan="6">@@ -0,0 +1,3 @@</td>
@@ -381,6 +405,14 @@
381 </tbody>405 </tbody>
382 </table>406 </table>
383 <table class="dt spl" aria-label="run.sh, split">407 <table class="dt spl" aria-label="run.sh, split">
408+<colgroup>
409+<col class="c-ln">
410+<col class="c-m">
411+<col>
412+<col class="c-ln">
413+<col class="c-m">
414+<col>
415+</colgroup>
384 <tbody>416 <tbody>
385 <tr class="hunk">417 <tr class="hunk">
386 <td colspan="6">@@ -0,0 +1,2 @@</td>418 <td colspan="6">@@ -0,0 +1,2 @@</td>
M cmd/ermite/testdata/web/commit-trojan.html +8 -0
@@ -186,6 +186,14 @@
186186 </tbody>
187187 </table>
188188 <table class="dt spl" aria-label="evil.go, split">
189+<colgroup>
190+<col class="c-ln">
191+<col class="c-m">
192+<col>
193+<col class="c-ln">
194+<col class="c-m">
195+<col>
196+</colgroup>
189197 <tbody>
190198 <tr class="hunk">
191199 <td colspan="6">@@ -0,0 +1,8 @@</td>
@@ -186,6 +186,14 @@
186 </tbody>186 </tbody>
187 </table>187 </table>
188 <table class="dt spl" aria-label="evil.go, split">188 <table class="dt spl" aria-label="evil.go, split">
189+<colgroup>
190+<col class="c-ln">
191+<col class="c-m">
192+<col>
193+<col class="c-ln">
194+<col class="c-m">
195+<col>
196+</colgroup>
189 <tbody>197 <tbody>
190 <tr class="hunk">198 <tr class="hunk">
191 <td colspan="6">@@ -0,0 +1,8 @@</td>199 <td colspan="6">@@ -0,0 +1,8 @@</td>
M internal/adapters/web/diff.templ +1 -0
@@ -193,6 +193,7 @@ templ DiffFileView(f DiffFile, p DiffView) {
193193 }
194194 if p.ShowSplit {
195195 <table class="dt spl" aria-label={ f.Path + ", split" }>
196+ <colgroup><col class="c-ln"/><col class="c-m"/><col/><col class="c-ln"/><col class="c-m"/><col/></colgroup>
196197 for _, h := range f.Hunks {
197198 <tbody>
198199 <tr class="hunk"><td colspan="6">{ h.Header }</td></tr>
@@ -193,6 +193,7 @@ templ DiffFileView(f DiffFile, p DiffView) {
193 }193 }
194 if p.ShowSplit {194 if p.ShowSplit {
195 <table class="dt spl" aria-label={ f.Path + ", split" }>195 <table class="dt spl" aria-label={ f.Path + ", split" }>
196+ <colgroup><col class="c-ln"/><col class="c-m"/><col/><col class="c-ln"/><col class="c-m"/><col/></colgroup>
196 for _, h := range f.Hunks {197 for _, h := range f.Hunks {
197 <tbody>198 <tbody>
198 <tr class="hunk"><td colspan="6">{ h.Header }</td></tr>199 <tr class="hunk"><td colspan="6">{ h.Header }</td></tr>
M internal/adapters/web/diff_templ.go +7 -7
@@ -1196,7 +1196,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
11961196 if templ_7745c5c3_Err != nil {
11971197 return templ_7745c5c3_Err
11981198 }
1199- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "\">")
1199+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ")
12001200 if templ_7745c5c3_Err != nil {
12011201 return templ_7745c5c3_Err
12021202 }
@@ -1208,7 +1208,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
12081208 var templ_7745c5c3_Var63 string
12091209 templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header)
12101210 if templ_7745c5c3_Err != nil {
1211- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 51}
1211+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 51}
12121212 }
12131213 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
12141214 if templ_7745c5c3_Err != nil {
@@ -1273,7 +1273,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
12731273 var templ_7745c5c3_Var64 string
12741274 templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note)
12751275 if templ_7745c5c3_Err != nil {
1276- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 218, Col: 13}
1276+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 219, Col: 13}
12771277 }
12781278 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
12791279 if templ_7745c5c3_Err != nil {
@@ -1389,7 +1389,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component {
13891389 var templ_7745c5c3_Var70 string
13901390 templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark)
13911391 if templ_7745c5c3_Err != nil {
1392- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 242, Col: 38}
1392+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 38}
13931393 }
13941394 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
13951395 if templ_7745c5c3_Err != nil {
@@ -1465,7 +1465,7 @@ func gutter(n, href string) templ.Component {
14651465 var templ_7745c5c3_Var74 templ.SafeURL
14661466 templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href))
14671467 if templ_7745c5c3_Err != nil {
1468- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 31}
1468+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 252, Col: 31}
14691469 }
14701470 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
14711471 if templ_7745c5c3_Err != nil {
@@ -1478,7 +1478,7 @@ func gutter(n, href string) templ.Component {
14781478 var templ_7745c5c3_Var75 string
14791479 templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(n)
14801480 if templ_7745c5c3_Err != nil {
1481- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 66}
1481+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 252, Col: 66}
14821482 }
14831483 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
14841484 if templ_7745c5c3_Err != nil {
@@ -1492,7 +1492,7 @@ func gutter(n, href string) templ.Component {
14921492 var templ_7745c5c3_Var76 string
14931493 templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(n)
14941494 if templ_7745c5c3_Err != nil {
1495- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 253, Col: 5}
1495+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 254, Col: 5}
14961496 }
14971497 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))
14981498 if templ_7745c5c3_Err != nil {
@@ -1196,7 +1196,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
1196 if templ_7745c5c3_Err != nil {1196 if templ_7745c5c3_Err != nil {
1197 return templ_7745c5c3_Err1197 return templ_7745c5c3_Err
1198 }1198 }
1199- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "\">")1199+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ")
1200 if templ_7745c5c3_Err != nil {1200 if templ_7745c5c3_Err != nil {
1201 return templ_7745c5c3_Err1201 return templ_7745c5c3_Err
1202 }1202 }
@@ -1208,7 +1208,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
1208 var templ_7745c5c3_Var63 string1208 var templ_7745c5c3_Var63 string
1209 templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header)1209 templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header)
1210 if templ_7745c5c3_Err != nil {1210 if templ_7745c5c3_Err != nil {
1211- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 51}1211+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 51}
1212 }1212 }
1213 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))1213 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
1214 if templ_7745c5c3_Err != nil {1214 if templ_7745c5c3_Err != nil {
@@ -1273,7 +1273,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component {
1273 var templ_7745c5c3_Var64 string1273 var templ_7745c5c3_Var64 string
1274 templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note)1274 templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note)
1275 if templ_7745c5c3_Err != nil {1275 if templ_7745c5c3_Err != nil {
1276- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 218, Col: 13}1276+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 219, Col: 13}
1277 }1277 }
1278 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))1278 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
1279 if templ_7745c5c3_Err != nil {1279 if templ_7745c5c3_Err != nil {
@@ -1389,7 +1389,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component {
1389 var templ_7745c5c3_Var70 string1389 var templ_7745c5c3_Var70 string
1390 templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark)1390 templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark)
1391 if templ_7745c5c3_Err != nil {1391 if templ_7745c5c3_Err != nil {
1392- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 242, Col: 38}1392+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 38}
1393 }1393 }
1394 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))1394 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
1395 if templ_7745c5c3_Err != nil {1395 if templ_7745c5c3_Err != nil {
@@ -1465,7 +1465,7 @@ func gutter(n, href string) templ.Component {
1465 var templ_7745c5c3_Var74 templ.SafeURL1465 var templ_7745c5c3_Var74 templ.SafeURL
1466 templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href))1466 templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href))
1467 if templ_7745c5c3_Err != nil {1467 if templ_7745c5c3_Err != nil {
1468- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 31}1468+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 252, Col: 31}
1469 }1469 }
1470 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))1470 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
1471 if templ_7745c5c3_Err != nil {1471 if templ_7745c5c3_Err != nil {
@@ -1478,7 +1478,7 @@ func gutter(n, href string) templ.Component {
1478 var templ_7745c5c3_Var75 string1478 var templ_7745c5c3_Var75 string
1479 templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(n)1479 templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(n)
1480 if templ_7745c5c3_Err != nil {1480 if templ_7745c5c3_Err != nil {
1481- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 66}1481+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 252, Col: 66}
1482 }1482 }
1483 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))1483 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
1484 if templ_7745c5c3_Err != nil {1484 if templ_7745c5c3_Err != nil {
@@ -1492,7 +1492,7 @@ func gutter(n, href string) templ.Component {
1492 var templ_7745c5c3_Var76 string1492 var templ_7745c5c3_Var76 string
1493 templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(n)1493 templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(n)
1494 if templ_7745c5c3_Err != nil {1494 if templ_7745c5c3_Err != nil {
1495- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 253, Col: 5}1495+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 254, Col: 5}
1496 }1496 }
1497 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))1497 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))
1498 if templ_7745c5c3_Err != nil {1498 if templ_7745c5c3_Err != nil {
M internal/adapters/web/static/css/50-code.css +8 -1
@@ -79,7 +79,14 @@
7979 & .none { background: var(--paper-alt); }
8080 }
8181 .dscroll { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
82- .spl { width: 100%; table-layout: fixed; & .tx { overflow: hidden; text-overflow: ellipsis; } & .ln { width: 6ch; } & .m { width: 2ch; } }
82+ /* split: a fixed layout takes its widths from the colgroup (the first row is
83+ the hunk header, which spans all columns); long lines wrap in their half */
84+ .spl {
85+ width: 100%; table-layout: fixed;
86+ & .c-ln { width: 7ch; } & .c-m { width: 2.5ch; }
87+ & .tx, & .hunk td { white-space: pre-wrap; overflow-wrap: anywhere; }
88+ & td.ln:nth-child(4) { border-left: 1px solid var(--border); }
89+ }
8390 #diffs[data-diff="unified"] .spl, #diffs[data-diff="split"] .uni { display: none; }
8491
8592 /* diff table of contents in the rail */
@@ -79,7 +79,14 @@
79 & .none { background: var(--paper-alt); }79 & .none { background: var(--paper-alt); }
80 }80 }
81 .dscroll { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r); }81 .dscroll { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
82- .spl { width: 100%; table-layout: fixed; & .tx { overflow: hidden; text-overflow: ellipsis; } & .ln { width: 6ch; } & .m { width: 2ch; } }82+ /* split: a fixed layout takes its widths from the colgroup (the first row is
83+ the hunk header, which spans all columns); long lines wrap in their half */
84+ .spl {
85+ width: 100%; table-layout: fixed;
86+ & .c-ln { width: 7ch; } & .c-m { width: 2.5ch; }
87+ & .tx, & .hunk td { white-space: pre-wrap; overflow-wrap: anywhere; }
88+ & td.ln:nth-child(4) { border-left: 1px solid var(--border); }
89+ }
83 #diffs[data-diff="unified"] .spl, #diffs[data-diff="split"] .uni { display: none; }90 #diffs[data-diff="unified"] .spl, #diffs[data-diff="split"] .uni { display: none; }
84 91
85 /* diff table of contents in the rail */92 /* diff table of contents in the rail */

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