A CLI-first git forge.

cli forge git self-hosted

https://gitbay.org

Commit cf58aba82d

cf58aba82d7b7207bd2c347efe9fcfe6e672deac

parent: 0db33b1ad1

Verified · cmc ci/build: success

cmc <hello@cleberg.net> · 2026-08-26T22:48:40Z

web: the add/delete tint spans the whole diff row

The diff cell used class "code", which collides with the blob
code-block style and its background — so every row's tint was painted
over everywhere except the line-number gutters. The cell is .src now.
e2e/diffweb_test.go +6 −1
@@ -83,9 +83,14 @@ func TestDiffRendering(t *testing.T) {
8383 t.Error("diff content is not syntax highlighted")
8484 }
8585 // The +/- markers are CSS, so a copied selection is real source.
86 if strings.Contains(body, `<td class="code">+`) {
86 if strings.Contains(body, `<td class="src">+`) {
8787 t.Error("diff markers are in the markup, not the stylesheet")
8888 }
89 // The cell must not use .code: that class carries its own background,
90 // which would paint over the add/delete row tint.
91 if strings.Contains(body, `<td class="code">`) {
92 t.Error("diff cells use the blob code class, whose background hides the row tint")
93 }
8994 }
9095
9196 // jsonField pulls the first "name":"value" string out of a JSON blob.
internal/web/static/style.css +7 −5
@@ -945,16 +945,18 @@ table.difftable td.ln {
945945 border-right: 1px solid var(--line);
946946 white-space: nowrap;
947947 }
948table.difftable td.code {
948/* not .code: that class is the blob/code-block style and carries its own
949 background, which painted over every row tint */
950table.difftable td.src {
949951 padding: 0 var(--sp-3);
950952 white-space: pre-wrap;
951953 overflow-wrap: anywhere;
952954 }
953955 /* the marker is decoration, so it lives in CSS and stays out of a copied
954956 selection */
955table.difftable tr.add td.code::before { content: "+"; color: var(--ok); }
956table.difftable tr.del td.code::before { content: "\2212"; color: var(--bad); }
957table.difftable tr.ctx td.code::before { content: " "; }
957table.difftable tr.add td.src::before { content: "+"; color: var(--ok); }
958table.difftable tr.del td.src::before { content: "\2212"; color: var(--bad); }
959table.difftable tr.ctx td.src::before { content: " "; }
958960 table.difftable tr.add { background: var(--diff-add); }
959961 table.difftable tr.del { background: var(--diff-del); }
960962 table.difftable tr.hunk td, table.difftable tr.dmeta td {
@@ -964,7 +966,7 @@ table.difftable tr.hunk td, table.difftable tr.dmeta td {
964966 border-top: 1px solid var(--line);
965967 border-bottom: 1px solid var(--line);
966968 }
967table.difftable tr.hunk td.code { color: var(--accent); }
969table.difftable tr.hunk td.src { color: var(--accent); }
968970 table.difftable tr.threadrow td { padding: var(--sp-2) var(--sp-3); background: var(--bg); }
969971
970972 /* badges: signature and check states. Semantic colors stay distinct:
internal/web/templates/layout.html +3 −3
@@ -126,9 +126,9 @@
126126 </summary>
127127 {{if .Binary}}<p class="none">Binary file not shown.</p>
128128 {{else}}<div class="tablewrap"><table class="difftable">
129 {{range .Lines}}{{if eq .Class "hunk"}}<tr class="hunk"><td class="ln" colspan="2"></td><td class="code">{{.Text}}</td></tr>
130 {{else if eq .Class "meta"}}<tr class="dmeta"><td class="ln" colspan="2"></td><td class="code">{{.Text}}</td></tr>
131 {{else}}<tr class="{{.Class}}"><td class="ln">{{if .OldLine}}{{.OldLine}}{{end}}</td><td class="ln">{{if .NewLine}}{{.NewLine}}{{end}}</td><td class="code">{{if .Code}}{{.Code}}{{else}}{{.Content}}{{end}}</td></tr>
129 {{range .Lines}}{{if eq .Class "hunk"}}<tr class="hunk"><td class="ln" colspan="2"></td><td class="src">{{.Text}}</td></tr>
130 {{else if eq .Class "meta"}}<tr class="dmeta"><td class="ln" colspan="2"></td><td class="src">{{.Text}}</td></tr>
131 {{else}}<tr class="{{.Class}}"><td class="ln">{{if .OldLine}}{{.OldLine}}{{end}}</td><td class="ln">{{if .NewLine}}{{.NewLine}}{{end}}</td><td class="src">{{if .Code}}{{.Code}}{{else}}{{.Content}}{{end}}</td></tr>
132132 {{end}}{{range .Threads}}<tr class="threadrow"><td colspan="3"><div class="thread{{if .Resolved}} resolved{{end}}">{{if .Resolved}}<p class="threadstate">resolved by {{.Resolved}}</p>{{end}}{{range .Comments}}<p class="commenthead"><strong>{{.Author}}</strong> <span class="when">{{when .CreatedAt}}</span></p><div class="rendered">{{.BodyHTML}}</div>{{end}}{{template "threadact" dict "ID" .ID "Resolved" .Resolved "Base" $base "Can" $can}}</div></td></tr>
133133 {{end}}{{end}}
134134 </table></div>{{end}}