diff --git a/src/webviews/apps/commitDetails/commitDetails.html b/src/webviews/apps/commitDetails/commitDetails.html
index bd1bbf5..594637d 100644
--- a/src/webviews/apps/commitDetails/commitDetails.html
+++ b/src/webviews/apps/commitDetails/commitDetails.html
@@ -74,6 +74,15 @@
class="commit-details__commit-action"
href="#"
data-action="commit-actions"
+ data-action-type="scm"
+ aria-label="Open SCM view"
+ title="Open SCM view"
+ >
+ > {
}
renderActions(state: CommitState) {
- const isHidden = state.selected?.sha === uncommittedSha ? 'true' : 'false';
+ const isHiddenForUncommitted = state.selected?.sha === uncommittedSha ? 'true' : 'false';
+ const isHiddenForCommitted = state.selected?.sha !== uncommittedSha ? 'true' : 'false';
[...document.querySelectorAll('[data-action-type="graph"],[data-action-type="more"]')].forEach($el =>
- $el.setAttribute('aria-hidden', isHidden),
+ $el.setAttribute('aria-hidden', isHiddenForUncommitted),
+ );
+ [...document.querySelectorAll('[data-action-type="scm"]')].forEach($el =>
+ $el.setAttribute('aria-hidden', isHiddenForCommitted),
);
}
diff --git a/src/webviews/commitDetails/commitDetailsWebviewView.ts b/src/webviews/commitDetails/commitDetailsWebviewView.ts
index eccf405..862a7e4 100644
--- a/src/webviews/commitDetails/commitDetailsWebviewView.ts
+++ b/src/webviews/commitDetails/commitDetailsWebviewView.ts
@@ -7,7 +7,7 @@ import type {
import { CancellationTokenSource, Disposable, env, Uri, window } from 'vscode';
import { executeGitCommand, GitActions } from '../../commands/gitCommands.actions';
import { configuration } from '../../configuration';
-import { Commands } from '../../constants';
+import { Commands, CoreCommands } from '../../constants';
import type { Container } from '../../container';
import type { GitCommit } from '../../git/models/commit';
import { isCommit } from '../../git/models/commit';
@@ -21,7 +21,7 @@ import type { GitRevisionReference } from '../../git/models/reference';
import { GitReference } from '../../git/models/reference';
import { Logger } from '../../logger';
import type { ShowInCommitGraphCommandArgs } from '../../plus/webviews/graph/graphWebview';
-import { executeCommand } from '../../system/command';
+import { executeCommand, executeCoreCommand } from '../../system/command';
import type { DateTimeFormat } from '../../system/date';
import { debug, getLogScope } from '../../system/decorators/log';
import type { Deferrable } from '../../system/function';
@@ -245,6 +245,9 @@ export class CommitDetailsWebviewView extends WebviewViewBase('commit/actions');