From b41e0a67852646bb165f8cf30aac7abaef48b86a Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 7 Oct 2026 13:21:55 -0700 Subject: [PATCH 1/2] [dashboard] Color git commit headers in Google colors --- dashboard/dashboard.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dashboard/dashboard.go b/dashboard/dashboard.go index 2e69036f4..6e4f3dcf3 100644 --- a/dashboard/dashboard.go +++ b/dashboard/dashboard.go @@ -519,8 +519,11 @@ h2 { margin: .25em 0 0 0; font-size: 110%; } td.timeline > .missing:nth-child(even) { color: #333; } .symbol { display: inline-block; width: 1ch; text-align: center; } .symbol:has(.commit) { vertical-align: bottom; } -.commit { display: inline-block; writing-mode: sideways-lr; white-space: nowrap; font-size: 12px; line-height: 12px; color: #aaa; padding-bottom: 4px; } -td.timeline > :nth-child(even) .commit { color: #666; } +.commit { display: inline-block; writing-mode: sideways-lr; white-space: nowrap; font-size: 12px; line-height: 12px; padding-bottom: 4px; } +td.timeline > :nth-child(6n+1) .commit, td.timeline > :nth-child(6n+4) .commit { color: #4285f4; } +td.timeline > :nth-child(6n+2) .commit, td.timeline > :nth-child(6n+6) .commit { color: #ea4335; } +td.timeline > :nth-child(6n+3) .commit { color: #fbbc05; } +td.timeline > :nth-child(6n+5) .commit { color: #34a853; } table { width: 100%; flex-shrink: 0; From df012a2add7fc15cdd09abf1ef29aa38e06b5dd0 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 7 Oct 2026 13:29:15 -0700 Subject: [PATCH 2/2] fixup! [dashboard] Color git commit headers in Google colors --- dashboard/dashboard.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dashboard/dashboard.go b/dashboard/dashboard.go index 6e4f3dcf3..ffe28c4f7 100644 --- a/dashboard/dashboard.go +++ b/dashboard/dashboard.go @@ -161,7 +161,7 @@ func fetchCommits(repoPath string) ([]commitInfo, map[string]int) { return nil, nil } } - out, err := exec.Command("git", "--git-dir="+repoPath, "log", "-n", "10000", "--format=%H\t%s", "main").Output() + out, err := exec.Command("git", "--git-dir="+repoPath, "log", "--format=%H\t%s", "main").Output() if err != nil { fmt.Fprintf(os.Stderr, "git log failed: %v\n", err) return nil, nil @@ -520,10 +520,10 @@ td.timeline > .missing:nth-child(even) { color: #333; } .symbol { display: inline-block; width: 1ch; text-align: center; } .symbol:has(.commit) { vertical-align: bottom; } .commit { display: inline-block; writing-mode: sideways-lr; white-space: nowrap; font-size: 12px; line-height: 12px; padding-bottom: 4px; } -td.timeline > :nth-child(6n+1) .commit, td.timeline > :nth-child(6n+4) .commit { color: #4285f4; } -td.timeline > :nth-child(6n+2) .commit, td.timeline > :nth-child(6n+6) .commit { color: #ea4335; } -td.timeline > :nth-child(6n+3) .commit { color: #fbbc05; } -td.timeline > :nth-child(6n+5) .commit { color: #34a853; } +.c0 { color: #4285f4; } +.c1 { color: #ea4335; } +.c2 { color: #fbbc05; } +.c3 { color: #34a853; } table { width: 100%; flex-shrink: 0; @@ -631,6 +631,7 @@ $(function() { } if len(commitList) > 0 { + googleColors := []string{"c0", "c1", "c2", "c0", "c3", "c1"} var header strings.Builder for d := 0; d <= maxDist && d < len(commitList); d++ { c := commitList[d] @@ -641,8 +642,9 @@ $(function() { escapedTitle := html.EscapeString(c.Title) label := short + " " + escapedTitle commitUrl := "https://github.com/llvm/llvm-project/commit/" + c.Hash + color := googleColors[(6-(len(commitList)-d)%6)%6] fmt.Fprintf(&header, "%s", - commitUrl, c.Hash, d, escapedTitle, span("symbol", span("commit", label))) + commitUrl, c.Hash, d, escapedTitle, span("symbol", span("commit "+color, label))) } r := td("", "") + td("", "") + td("", "") + td("class=\"timeline\"", header.String()) fmt.Println(tr(r))