Skip to content

Commit a6acac9

Browse files
zamkorusZCode
andcommitted
feat(tags): unify signed-tag badge and refine signature column
v1.1.2 follow-up to the signed-tag surfaces. The 1.1.1 signed-tag look had replaced the tag icon with the verified glyph and lost the commit-color background; this restores a unified design: - The tag icon always renders for tags (signed or not), keeping its commit-color background. A signed tag adds a separate verified badge on the signature-status green, sitting flush against the tag icon (.gitRef.tag.signed > svg zeroes the right margin; no background override). - The verified badge is square (border-radius 0), sized like the 1.1.1 verified icon. - Signed tags share the default neutral border with every other ref; the green verified badge, not the border, carries the signature distinction. - The commit signature column's valid status now shows the verified symbol inside a filled signature-status green circle, unifying with the tag badge. New svgIcons.verified; the signedTag alias is kept for existing test selectors. sonar.projectVersion 1.1.1 -> 1.1.2. Gate (ZAM): OK — new_violations 0, new_duplicated_lines_density 0.0, all project-wide conditions 0. Co-Authored-By: ZCode <zcode@z.ai>
1 parent 52d8b17 commit a6acac9

10 files changed

Lines changed: 148 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.2] - 2026-07-29
11+
12+
### Changed
13+
14+
- **Signed-tag visual refined**: the tag icon now keeps its commit-color
15+
background (restored), and a separate verified badge sits flush against it
16+
on the signature-status green, sized as in 1.1.1. Signed tags share the
17+
default neutral border with every other ref so all tags read consistently;
18+
the green verified badge — not the border — carries the signature
19+
distinction.
20+
- **Commit signature column**: a valid (signed) commit now shows the verified
21+
symbol inside a filled signature-status green circle, unifying the look with
22+
the signed-tag badge.
23+
1024
## [1.1.1] - 2026-07-29
1125

1226
### Added
@@ -196,7 +210,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
196210

197211
Initial release
198212

199-
[Unreleased]: https://github.com/PlohnenSoftware/git-graph-libre/compare/v1.1.0...HEAD
213+
[Unreleased]: https://github.com/PlohnenSoftware/git-graph-libre/compare/v1.1.2...HEAD
214+
[1.1.2]: https://github.com/PlohnenSoftware/git-graph-libre/compare/v1.1.1...v1.1.2
215+
[1.1.1]: https://github.com/PlohnenSoftware/git-graph-libre/compare/v1.1.0...v1.1.1
200216
[1.1.0]: https://github.com/PlohnenSoftware/git-graph-libre/compare/v1.0.0...v1.1.0
201217
[1.0.0]: https://github.com/PlohnenSoftware/git-graph-libre/releases/tag/v1.0.0
202218
[0.4.0]: https://github.com/asispts/neo-git-graph/compare/v0.3.0...v0.4.0

docs/AI_DEV_KNOWLEDGE_BASE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,46 @@ Verification (`2026-07-29`):
16851685
condition is back on the gate (it had been removed per the earlier
16861686
`2026-07-29` note); this slice cleared it at `95.8%`.
16871687

1688+
Follow-up (`2026-07-29`): signed-tag visual polish, released as `v1.1.2`. The
1689+
1.1.1 signed-tag look had regressed: the tag icon was replaced by the verified
1690+
glyph and lost its commit-color background. Restored a unified design:
1691+
1692+
- `refIcon()` always returns the **tag** octicon for tags (signed or not); the
1693+
`signedTag` glyph-as-icon path is gone. A signed tag renders the tag icon on
1694+
the commit-color background, then a `.gitRefSignedBadge` (the verified octicon
1695+
on the signature-status green) sits **flush** against it.
1696+
- `.gitRef.tag.signed > svg { margin-right: 0 }` zeroes the default 5px right
1697+
margin only on signed tags so the badge meets the icon with no background gap;
1698+
it does **not** override the icon background, so the commit color is preserved.
1699+
- The `.gitRefSignedBadge` is a square (`border-radius: 0`), sized 14px with the
1700+
glyph at 14px to match the 1.1.1 verified-icon weight.
1701+
- Signed tags now share the **default neutral border** with every other ref
1702+
(`.gitRef.tag.signed { border-color: var(--ngg-neutral-border-heavy) }`); the
1703+
green verified badge — not the border — carries the signature distinction.
1704+
- Commit signature column: `COMMIT_SIGNATURE_PRESENTATIONS.valid` glyph changed
1705+
from the `"✓"` character to `svgIcons.verified`, and `.commitSignature-valid`
1706+
is now a filled `background: var(--ngg-signed-ref)` circle (not the old 14%
1707+
tint) with the glyph in the editor-background color, unifying with the tag
1708+
badge. A new `svgIcons.verified` was added (the `signedTag` alias is kept so
1709+
existing `signedTagIcon` test selectors keep matching).
1710+
1711+
Verification (`2026-07-29`):
1712+
1713+
- `git fetch --all --prune`; `AI-dev` level with `origin/AI-dev`
1714+
- `pnpm run typecheck`
1715+
- strict Biome over the five touched files (clean), `pnpm run lint` (only the
1716+
pre-existing schema-version info), `pnpm run format` (only the six known
1717+
pre-existing drifts in untouched files)
1718+
- `pnpm run test`: backend `44` files / `315` tests, webview `34` files /
1719+
`294` tests
1720+
- `pnpm run l10n:check` `100%`; `pnpm run package`
1721+
- `pnpm run test:coverage` (`78` files / `609` tests)
1722+
- `sonar.projectVersion` advanced `1.1.1``1.1.2` so the `Previous Version`
1723+
new-code window covers exactly this slice.
1724+
- `pnpm run sonar:scan`, task `1f5566fc-d85d-4a1e-a386-881b73a80f3b`: `ZAM`
1725+
quality gate **`OK`**`new_violations` `0`, `new_duplicated_lines_density`
1726+
`0.0`, and all four project-wide conditions `0`.
1727+
16881728
Test notes for future slices:
16891729

16901730
- A signature-bearing tag object can be created **without a GPG key** by writing

media/main.css

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,13 @@ body.unableToLoad p {
207207
line-height: 1;
208208
}
209209
.commitSignature-valid {
210-
color: var(--vscode-testing-iconPassed, var(--vscode-charts-green, var(--ngg-success)));
211-
background: color-mix(in srgb, currentColor 14%, var(--ngg-transparent));
210+
color: var(--vscode-editor-background);
211+
background: var(--ngg-signed-ref);
212+
}
213+
.commitSignature-valid > svg {
214+
width: 12px;
215+
height: 12px;
216+
fill: currentColor;
212217
}
213218
.commitSignature-warning {
214219
color: var(--vscode-editorWarning-foreground, var(--vscode-charts-yellow, oklch(78% 0.15 85)));
@@ -685,15 +690,37 @@ body.commitDetailsResizing * {
685690
color: var(--vscode-descriptionForeground, var(--ngg-neutral-icon));
686691
}
687692

688-
/* Signed tags: verified badge on the signature-status green, plus a tinted
689-
label so the distinction survives at a glance and without relying on the
690-
icon shape alone. */
693+
/* Signed tags: the tag icon keeps its commit-color background (restored);
694+
a separate verified badge on the signature-status green carries the
695+
signature distinction, and the border stays signed-green. */
691696
.gitRef.tag.signed {
692-
border-color: var(--ngg-signed-ref);
693-
background-color: color-mix(in srgb, var(--ngg-signed-ref) 16%, var(--ngg-transparent));
697+
border-color: var(--ngg-neutral-border-heavy);
698+
background-color: color-mix(in srgb, var(--ngg-signed-ref) 12%, var(--ngg-transparent));
694699
}
700+
/* On a signed tag the verified badge sits flush against the tag icon, so the
701+
two backgrounds meet with no gap; the badge then keeps its own right margin
702+
to separate it from the tag name. */
695703
.gitRef.tag.signed > svg {
704+
margin-right: 0;
705+
}
706+
.gitRefSignedBadge {
707+
display: inline-flex;
708+
align-items: center;
709+
justify-content: center;
710+
width: 14px;
711+
height: 14px;
712+
margin-right: 4px;
713+
margin-left: 0;
714+
padding: 2px;
715+
border-radius: 0;
716+
vertical-align: top;
696717
background-color: var(--ngg-signed-ref);
718+
color: var(--vscode-editor-background);
719+
}
720+
.gitRefSignedBadge > svg {
721+
width: 14px;
722+
height: 14px;
723+
fill: currentColor;
697724
}
698725

699726
/* Loader */

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "git-graph-libre",
33
"displayName": "%displayName%",
4-
"version": "1.1.1",
4+
"version": "1.1.2",
55
"description": "%description%",
66
"categories": [
77
"SCM Providers",

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.projectKey=git-graph-libre
22
sonar.projectName=Git Graph Libre
3-
sonar.projectVersion=1.1.1
3+
sonar.projectVersion=1.1.2
44
sonar.sourceEncoding=UTF-8
55

66
sonar.sources=src,scripts,esbuild.js

src/webview/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const COMMIT_SIGNATURE_PRESENTATIONS: Record<
7575
NonNullable<GitCommitNode["signature"]>["status"],
7676
{ glyph: string; tone: string; label: string }
7777
> = {
78-
valid: { glyph: "✓", tone: "valid", label: l10n.signatureValid },
78+
valid: { glyph: svgIcons.verified, tone: "valid", label: l10n.signatureValid },
7979
"valid-untrusted": {
8080
glyph: "!",
8181
tone: "warning",
@@ -4207,14 +4207,14 @@ class GitGraphView {
42074207
const title = escapeHtml(signed ? `${ref.name}${l10n.signedTagTooltip}` : ref.name);
42084208
return (
42094209
`<span class="gitRef ${ref.type}${refActive ? " active" : ""}${signed ? " signed" : ""}${extraClass}" data-name="${refName}" title="${title}">` +
4210-
this.refIcon(ref.type, signed) +
4210+
this.refIcon(ref.type) +
4211+
(signed ? `<span class="gitRefSignedBadge">${svgIcons.verified}</span>` : "") +
42114212
escapeHtml(label) +
42124213
"</span>"
42134214
);
42144215
}
4215-
private refIcon(type: GitCommitNode["refs"][number]["type"], signed: boolean) {
4216-
if (type !== "tag") return svgIcons.branch;
4217-
return signed ? svgIcons.signedTag : svgIcons.tag;
4216+
private refIcon(type: GitCommitNode["refs"][number]["type"]) {
4217+
return type === "tag" ? svgIcons.tag : svgIcons.branch;
42184218
}
42194219
private renderCommitAvatar(commit: GitCommitNode) {
42204220
if (!this.config.fetchAvatars) return "";

src/webview/utils/icons.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const svgIcons = {
99
copy: octicon("copy", "fileActionIcon copyIcon"),
1010
info: octicon("info"),
1111
tag: octicon("tag"),
12+
verified: octicon("verified", "signedTagIcon"),
1213
signedTag: octicon("verified", "signedTagIcon"),
1314
loading: octicon("sync"),
1415
openFolder: octicon("file-directory-open-fill", "openFolderIcon"),

tests/webview/dialogStyles.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,34 @@ describe("dialog styles", () => {
187187
expect(ruleFor(css, ".tagDetailsActions")).toContain("display: flex;");
188188
expect(ruleFor(css, ".tagDetailsActions")).toContain("flex-wrap: wrap;");
189189
});
190+
191+
it("uses the default ref border for signed tags while the tag icon keeps commit color", () => {
192+
const signedRef = ruleFor(css, ".gitRef.tag.signed");
193+
194+
// The signed tag shares the default neutral border with every other ref so
195+
// all tags read consistently; only the green verified badge distinguishes it.
196+
expect(signedRef).toContain("border-color: var(--ngg-neutral-border-heavy);");
197+
expect(signedRef).not.toContain("border-color: var(--ngg-signed-ref);");
198+
// The tag icon background must NOT be overridden for signed tags, so it
199+
// keeps the commit color like every other ref icon. The only signed > svg
200+
// rule zeroes the right margin so the verified badge sits flush.
201+
const signedSvg = ruleFor(css, ".gitRef.tag.signed > svg");
202+
expect(signedSvg).not.toContain("background-color");
203+
expect(signedSvg).toContain("margin-right: 0;");
204+
// The verified badge carries the signature distinction on the green fill.
205+
// It is square (no border-radius) so there is no gap where it meets the
206+
// tag icon's commit-color background and the badge reads consistently.
207+
const badge = ruleFor(css, ".gitRefSignedBadge");
208+
expect(badge).toContain("background-color: var(--ngg-signed-ref);");
209+
expect(badge).toContain("border-radius: 0;");
210+
expect(badge).toContain("border-radius: 0;");
211+
});
212+
213+
it("renders the valid signature as a filled green circle with the glyph", () => {
214+
const valid = ruleFor(css, ".commitSignature-valid");
215+
216+
// A filled signature-status green circle (not the old faint tint).
217+
expect(valid).toContain("background: var(--ngg-signed-ref);");
218+
expect(valid).not.toContain("color-mix");
219+
});
190220
});

tests/webview/rendering.test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,18 @@ describe("webview rendering", () => {
419419
const signed = gitRef("v1.0.0", ".gitRef.tag");
420420
expect(signed?.classList.contains("signed")).toBe(true);
421421
expect(signed?.title).toBe("v1.0.0 — signed tag");
422-
expect(signed?.querySelector("svg.signedTagIcon")).not.toBeNull();
422+
// The signed tag keeps the tag icon (on the commit-color background) AND
423+
// adds a separate verified badge on the signature-status green.
424+
expect(signed?.querySelector(".gitRefSignedBadge")).not.toBeNull();
425+
expect(signed?.querySelector(".gitRefSignedBadge svg.signedTagIcon")).not.toBeNull();
426+
expect(signed?.querySelector(":scope > svg.signedTagIcon")).toBeNull();
423427

424428
for (const name of ["v0.9.0", "v0.8.0"]) {
425429
const unsigned = gitRef(name, ".gitRef.tag");
426430
expect(unsigned?.classList.contains("signed")).toBe(false);
427431
expect(unsigned?.title).toBe(name);
428-
expect(unsigned?.querySelector("svg.signedTagIcon")).toBeNull();
432+
// Normal/unsigned tags keep the tag icon and have no verified badge.
433+
expect(unsigned?.querySelector(".gitRefSignedBadge")).toBeNull();
429434
}
430435

431436
expect(document.querySelectorAll(".gitRef.tag.signed")).toHaveLength(1);
@@ -1944,7 +1949,9 @@ describe("webview rendering", () => {
19441949
const validSignature = document.querySelector(
19451950
'tr.commit[data-hash="abc123"] .commitSignature-valid'
19461951
);
1947-
expect(validSignature?.textContent).toBe("✓");
1952+
// The valid signature renders the verified symbol (a filled green circle
1953+
// with the verified glyph), not a plain "✓" character.
1954+
expect(validSignature?.querySelector("svg.signedTagIcon")).not.toBeNull();
19481955
expect(validSignature?.getAttribute("title")).toContain("Valid signature");
19491956
expect(validSignature?.getAttribute("title")).toContain("Signer: Alice");
19501957
expect(validSignature?.getAttribute("aria-label")).toContain("Key: ABC123");

tests/webview/tableStyles.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,16 @@ describe("commit table styles", () => {
9797
expect(css).toContain("var(--vscode-testing-iconPassed");
9898
expect(css).toContain("var(--ngg-success)");
9999
expect(css).toContain(".gitRef.tag.signed {");
100-
expect(css).toContain("border-color: var(--ngg-signed-ref);");
100+
// The signed tag shares the default neutral border with every other ref;
101+
// the green verified badge (not the border) carries the distinction.
102+
expect(css).toContain("border-color: var(--ngg-neutral-border-heavy);");
103+
// The tag icon keeps its commit-color background: the only
104+
// `.gitRef.tag.signed > svg` rule zeroes the right margin so the verified
105+
// badge sits flush (it does not override the background). The verified
106+
// badge carries the signature-status green fill instead.
101107
expect(css).toContain(".gitRef.tag.signed > svg {");
108+
expect(css).toContain("margin-right: 0;");
109+
expect(css).toContain(".gitRefSignedBadge {");
102110
expect(css).toContain("background-color: var(--ngg-signed-ref);");
103111
});
104112

0 commit comments

Comments
 (0)