Surface and control commit signing in the Commit Graph#5381
Conversation
🤖 Augment PR SummarySummary: This PR surfaces commit-signing state in the Commit Graph’s WIP commit box and aligns Graph commits with VS Code’s signing behavior. Changes:
Technical Notes: Signing success hooks now fire for explicit 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Surfaces commit-signing state in the Commit Graph’s WIP commit box and adds an in-session, per-repo toggle to temporarily suppress signing, while also aligning Graph commits with VS Code’s git.enableCommitSigning behavior (matching built-in SCM).
Changes:
- Thread explicit signing control (
sign?: boolean) through the webview → host RPC and into the git-cli commit operation (-Svia host override;--no-gpg-signfor suppression). - Add WIP signing state to Graph WIP payloads and render a signing indicator/toggle in the commit box UI (including telemetry + docs).
- Propagate suppression into the Compose apply flow (
suppressSigning) and add integration/unit tests for precedence + forwarding.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/webviews/rpc/services/repository.ts | Adds sign?: boolean to commit RPC options and stamps Graph source context onto commit operations |
| src/webviews/plus/graph/graphWebview.ts | Refreshes WIP state when signing-related config changes; includes signing config in WIP payload |
| src/webviews/plus/graph/graphService.ts | Extends compose plan with suppressSigning to carry the UI toggle through apply |
| src/webviews/plus/graph/detailsProtocol.ts | Re-exports WipSigning for Graph app consumption |
| src/webviews/plus/graph/compose/utils.ts | Forces unsigned compose-apply when suppressSigning is set |
| src/webviews/commitDetails/protocol.ts | Adds WipSigning type and Wip.signing optional field used by Graph WIP commit UI |
| src/webviews/apps/plus/graph/components/gl-graph-details-panel.ts | Stores per-repo suppression in session state and wires toggle + props into <gl-commit-box> |
| src/webviews/apps/plus/graph/components/gl-commit-box.ts | Renders signing indicator/toggle UI and dispatches signing-toggle events |
| src/webviews/apps/plus/graph/components/gl-commit-box.css.ts | Styles suppressed state (slash + dim) while keeping state non-color-dependent |
| src/webviews/apps/plus/graph/components/detailsState.ts | Adds suppressedSigningRepos session signal that survives repo switches/panel hide-show |
| src/webviews/apps/plus/graph/components/detailsActions.ts | Applies suppression to WIP commits (sign:false) and forwards it into compose commits |
| src/webviews/apps/plus/graph/components/tests/detailsActions.test.ts | Adds unit test asserting compose commit forwards suppressSigning |
| src/constants.telemetry.ts | Adds graph/wip/signing/toggled telemetry event type |
| packages/git/src/providers/operations.ts | Adds sign?: boolean option to commit operation API contract |
| packages/git/src/context.ts | Updates hook documentation to include explicit-sign firing from commit op when host override adds -S |
| packages/git-cli/src/providers/operations.ts | Implements signing precedence + suppression flags and fires onSigned when -S is explicitly used |
| packages/git-cli/src/providers/tests/integration/operations.test.ts | Adds integration tests covering override precedence and suppression behavior |
| packages/git-cli/src/providers/tests/integration/helpers.ts | Threads GitServiceConfig into the test repo context builder |
| docs/telemetry-events.md | Documents the new graph/wip/signing/toggled telemetry payload |
| CHANGELOG.md | Adds changelog entries for the indicator/toggle and the behavior change honoring git.enableCommitSigning |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔴 Conflict resolved with 0% confidenceComment Resolution details🔴
|
83cccc1 to
229eef6
Compare
Adds an explicit `-S` to the commit operation when the host-level signing override (`git.enableCommitSigning`) is enabled, matching the built-in Source Control commit behavior — previously only the repo's `commit.gpgsign` Git config was respected. Fires the `onSigned` hook on explicitly-signed commits (parity with the patch provider) and threads a `graph` telemetry source through the commit RPC.
Surfaces the repo's signing status in the Commit Graph's working changes (WIP) commit box — a key icon appears when commits will be signed (repo `commit.gpgsign` or VS Code's `git.enableCommitSigning`), with the signing format (GPG, SSH, X.509, or OpenPGP) shown on hover. Delivers the status via the WIP payload (cached `getSigningConfig` read during assembly) and keeps it fresh on `.git/config` edits (watcher) and `git.enableCommitSigning` setting changes.
229eef6 to
aa6da7c
Compare
Closes #5380
Summary
Makes commit signing visible when committing working changes from the Commit Graph, and honors the VS Code setting:
git.enableCommitSigningon the working-changes commit path, matching the built-in Source Control behavior. Previously only the repo'scommit.gpgsignGit config was respected (completing the gap left by Standalone-packages refactor dropped host-config wiring (force-push, similarity threshold, commit signing settings ignored) #5326, which fixed only the reporting/Compose path).Behavior change
With
git.enableCommitSigningenabled but the repo'scommit.gpgsignunset/false, Graph commits now sign (matching the built-in SCM). Anyone who relied on the Graph not signing in that configuration will now get signed commits.Testing
git.enableCommitSigningenabled, the commit operation requests signing (-S) and fires the signing hooks/telemetry.commit.gpgsign) lands signed.