Skip to content

feat(commits): show commit signature verification badges#274

Merged
jongio merged 2 commits into
mainfrom
idea/commit-signature-badges
Jul 7, 2026
Merged

feat(commits): show commit signature verification badges#274
jongio merged 2 commits into
mainfrom
idea/commit-signature-badges

Conversation

@jongio

@jongio jongio commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What this does

Surfaces GPG and SSH signature verification status in the commit list, the log graph, and the commit detail view. Signed commits now carry a small badge so you can tell a verified commit from an unsigned one or one with a bad signature without dropping to the command line.

Closes #270.

How it works

flowchart LR
    A[git log with %G? and %GS] --> B[parseLogOutput sets Commit.Signature]
    B --> C{Status}
    C -- good --> D[check badge, green]
    C -- bad --> E[cross badge, red]
    C -- unknown, expired, revoked, error --> F[warning badge, yellow]
    C -- none --> G[no badge]
    D --> H[commits and log rows]
    E --> H
    F --> H
    H --> I[commit detail shows signer]
Loading

Changes

  • internal/git: Log requests %G? and %GS; parseLogOutput fills a new Commit.Signature (a SignatureStatus) and Commit.Signer. Reading is defensive so legacy 9-field records still parse.
  • internal/panels/commitrender: optional ShowSignature prefixes the subject with a badge. Glyphs follow the icon guidelines (check, cross, warning) and color comes from the theme.
  • internal/panels/commits and internal/panels/gitlog: enable the badge and wire theme colors. The commits detail view shows the signer identity.

Tests

  • Parsing of every %G? code into the right status, plus 11-field and legacy 9-field records.
  • Badge rendering for verified, unsigned, and disabled cases, with exact line width preserved.

Notes

The badge is passive, so there is no new keybinding. Color is applied through lipgloss, not baked into the glyph.

Adds %G? and %GS to git log parsing, a SignatureStatus on Commit, and a
badge in the commits and log panels plus the signer in the commit detail.

Closes #270.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio self-assigned this Jul 5, 2026
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 5, 2026
signatureDetail is called by Panel.showDetail (already allowlisted;
reachable via action dispatch deadcode cannot trace), so add it to the
same commits helper section of the deadcode allowlist.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio merged commit b12906f into main Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show commit signature verification status in the log and commits panel

1 participant