From 7c4d7f1c2cd8e6ffb41e4456c409a0bf3ccb097a Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:10:07 +0800 Subject: [PATCH] fix(vcs): remove redundant commit message expansion --- src/features/vcs/GitLog.module.css | 6 ------ src/features/vcs/GitLog.tsx | 21 +------------------ .../vcs/__tests__/logUiFeatures.test.tsx | 11 +--------- src/platform/locales/text/es.json | 2 -- src/platform/locales/text/zh.json | 2 -- 5 files changed, 2 insertions(+), 40 deletions(-) diff --git a/src/features/vcs/GitLog.module.css b/src/features/vcs/GitLog.module.css index fb89714b..e75b4456 100644 --- a/src/features/vcs/GitLog.module.css +++ b/src/features/vcs/GitLog.module.css @@ -408,12 +408,6 @@ word-break: break-word; line-height: 1.5; } -.expandMessage { - display: block; - margin-block-start: 6px; - font-weight: normal; - font-size: var(--fs-small); -} .fullMessage { margin-top: 6px; color: var(--fg); diff --git a/src/features/vcs/GitLog.tsx b/src/features/vcs/GitLog.tsx index b2964ea7..f3333d48 100644 --- a/src/features/vcs/GitLog.tsx +++ b/src/features/vcs/GitLog.tsx @@ -33,7 +33,6 @@ import { SplitHandle, SplitPanel, Spinner, - Dialog, Popup, TOOLTIP_DELAY, Tabs, @@ -94,7 +93,7 @@ import { isFavoriteBranch, type BranchTreeNode, } from "./branches"; -import { chooseDateRange, chooseMany, openDialog } from "./dialogs"; +import { chooseDateRange, chooseMany } from "./dialogs"; import { buildFileTree, dirKeys, type FileTreeNode } from "./fileTree"; import { DIFF_KIND, diffInput } from "./diffInput"; import { @@ -2518,24 +2517,6 @@ function CommitMessage({ commit, compact = false }: { commit: Commit; compact?:
- {/* Only a message with a body has more to show. */} - {body && ( - - )}
{body && (
diff --git a/src/features/vcs/__tests__/logUiFeatures.test.tsx b/src/features/vcs/__tests__/logUiFeatures.test.tsx index f6bc94d3..4321c269 100644 --- a/src/features/vcs/__tests__/logUiFeatures.test.tsx +++ b/src/features/vcs/__tests__/logUiFeatures.test.tsx @@ -34,7 +34,6 @@ import { commitKey } from "../multiRoot"; import { emptyFilters, openLogTab, reloadLog, selectGitTab, useGitLog } from "../logStore"; import { LogScope } from "../LogScope"; import { DEFAULT_LOG_OPTIONS, useLogOptions } from "../logOptions"; -import { VcsDialogHost } from "../dialogs"; const c = (id: string, parents: string[] = [], refs: string[] = []): Commit => ({ id, @@ -168,12 +167,7 @@ describe("log controls", () => { describe("commit details", () => { it("loads a full body, containing branches, and signature only when details are visible", async () => { useGitLog.setState({ selected: "/repo\0tip", selection: ["/repo\0tip"] }); - render( - <> - - - , - ); + render(); await screen.findByRole("listbox", { name: "Commits" }); expect(api.details).not.toHaveBeenCalled(); await act(async () => { @@ -181,9 +175,6 @@ describe("commit details", () => { }); expect(await screen.findByText("Full body loaded on demand")).toBeInTheDocument(); expect(screen.getByText(/Signature.*Verified/)).toBeInTheDocument(); - fireEvent.click(screen.getByRole("button", { name: "Expand Commit Message" })); - expect(await screen.findByRole("dialog", { name: "Commit tip" })).toHaveTextContent("Full body loaded on demand"); - fireEvent.keyDown(screen.getByRole("dialog"), { key: "Escape" }); }); it("compares real merge parents and retains renamed files under affected-path filtering", async () => { diff --git a/src/platform/locales/text/es.json b/src/platform/locales/text/es.json index 81abd197..d85e6086 100644 --- a/src/platform/locales/text/es.json +++ b/src/platform/locales/text/es.json @@ -6138,8 +6138,6 @@ "Collapse or expand this branch": "Contraer o expandir esta rama", "Diff Preview Location": "Ubicación de la vista previa de diferencias", "Parent": "Padre", - "Commit {shortId}": "Confirmación {shortId}", - "Expand Commit Message": "Expandir mensaje de confirmación", "Committed by": "Confirmado por", "Merge of": "Fusión de", "Containing branches": "Ramas que lo contienen", diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 94438406..6f4e1c1e 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -6194,8 +6194,6 @@ "Collapse or expand this branch": "折叠或展开此分支", "Diff Preview Location": "差异预览位置", "Parent": "父提交", - "Commit {shortId}": "提交 {shortId}", - "Expand Commit Message": "展开提交消息", "Committed by": "提交者", "Merge of": "合并自", "Containing branches": "包含此提交的分支",