From eee7e730db7b7314ea1f14e62a729e0622e89c37 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 7 Aug 2026 12:09:57 +0000 Subject: [PATCH] fix: drop the header logo, which read as a second status signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raised by @shenxianpeng looking at a failing report: is this thing telling me it passed or failed? The org mark is a white check inside a rounded tile. GitHub's ✅ is a white check inside a rounded square. Same shape, same silhouette, differing only in hue -- and hue is the weakest channel to carry meaning at 24px. So a failing report opened with a tick and then said "❌ 2 of 4 checks failed": the first symbol the eye lands on contradicted the second, and it did so exactly when the reader most needs to take the result in at a glance. Success was fine, both symbols agreeing. That is what hid it: the ambiguity only appears on failure, which is the case that matters most and the one you see least while building the thing. Three changes walked it here, each locally reasonable. The original wordmark badge carried "COMMIT" in it, so it read as a logo. #259 replaced it with the new wordless mark, which was faint but still decoration. #261 filled it in to give it presence -- and a filled tile with a check in it is not decoration, it is a status chip. Adding visual weight added semantic weight with it. So the header is now plain "## Commit Check". The verdict line is the single status signal, which is the right number of them; the words carry the brand without claiming an outcome. assets/logo.png stays. It is unreferenced by this repo now, but the raw URL is public and may be linked from outside, and 2.8 KB is cheaper than a broken image somewhere I cannot see. Comment identity is unaffected: comments are matched on COMMENT_MARKER, an invisible HTML comment, not on the title, so existing comments are still adopted and edited in place rather than duplicated. The golden tests build their expected header from main.REPORT_TITLE, so they followed the change without edits; 99 pass. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn --- README.md | 4 ++-- main.py | 38 +++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 75d0c87..26c3538 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,7 @@ ran. Passing runs stay to one line, with the detail folded away: -> **Commit Check** +> **Commit Check** > > ✅ **All 3 checks passed** > @@ -266,7 +266,7 @@ Passing runs stay to one line, with the detail folded away: Failures open with a count, then a table of only the scopes that failed — every rule ID links to its documentation — with the full tree still one click away: -> **Commit Check** +> **Commit Check** > > ❌ **2 of 4 checks failed** > diff --git a/main.py b/main.py index 1b5fde8..a915a0b 100755 --- a/main.py +++ b/main.py @@ -29,27 +29,23 @@ # CodSpeed all use for the same purpose. COMMENT_MARKER = "" -#: Logo shown next to the report title. -# -# Served from this repository rather than commit-check.com so the report has no -# cross-repository dependency, and as PNG rather than SVG because GitHub proxies -# comment images through camo, which handles SVG unreliably. Point this at a -# single org-wide asset if the other tools grow the same header. -# -# This is the org's *filled* mark (branding/avatar.png), not the transparent -# logo-mark. At this size a stroke has almost no visual weight -- the wordless -# mark rendered as a faint tick, worst on dark backgrounds -- while a filled -# tile holds up. It is the asset the branding README calls out as legible -# small, and the width below matches the h2 cap height so the icon is not -# smaller than the words next to it. -LOGO_URL = ( - "https://raw.githubusercontent.com/commit-check/commit-check-action/main/" - "assets/logo.png" -) - #: Report heading. h2 rather than h1: this renders inside a PR comment, where an #: h1 is louder than anything else on the page. -REPORT_TITLE = f'## Commit Check' +# +# Deliberately carries no logo. The org mark is a check inside a rounded tile, +# which is the same object GitHub's ✅ is — same shape, same silhouette, only +# the hue differs. Putting it immediately above the verdict line meant a failing +# report opened with a tick and then said "❌ 2 of 4 checks failed": the first +# symbol the eye lands on contradicted the second, and it did so precisely when +# the reader most needs to read the result quickly. +# +# The verdict line is the one status signal in this report, and one is the right +# number. "Commit Check" in words is unambiguous branding; a checkmark next to a +# failure is not. +# +# Do not "fix" this by showing the logo only on success — that makes the logo's +# presence itself a status signal, which is the same defect wearing a hat. +REPORT_TITLE = "## Commit Check" #: Prefixes of report bodies written by earlier versions, kept so the first run #: after upgrading adopts the existing comment instead of posting a second one. @@ -574,7 +570,7 @@ def _scope_value(scope: ScopeResult, max_len: int = 60) -> str: # Success: # # -# ## Commit Check +# ## Commit Check # # ✅ **All 5 checks passed** # @@ -599,7 +595,7 @@ def _scope_value(scope: ScopeResult, max_len: int = 60) -> str: # Failure: # # -# ## Commit Check +# ## Commit Check # # ❌ **1 of 5 checks failed** #