From 84b74f461aef76a9668ee9a4ec1622a56affaea9 Mon Sep 17 00:00:00 2001 From: noyobo Date: Wed, 30 Sep 2026 21:17:22 +0800 Subject: [PATCH] fix(commit): keep conventional prefixes lowercase Sentence capitalization rewrote "fix:" to "Fix:" in the summary and description. Spell check stays on. --- apps/desktop/src/features/commit/WorkingCopyPanel.tsx | 3 +++ apps/desktop/src/features/inspector/CommitDetails.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/desktop/src/features/commit/WorkingCopyPanel.tsx b/apps/desktop/src/features/commit/WorkingCopyPanel.tsx index 04b7dfa..1c8a377 100644 --- a/apps/desktop/src/features/commit/WorkingCopyPanel.tsx +++ b/apps/desktop/src/features/commit/WorkingCopyPanel.tsx @@ -1338,6 +1338,7 @@ export function WorkingCopyPanel() { }} placeholder={amend ? 'New summary (leave empty to keep current)' : 'Summary'} aria-label="Commit summary" + autoCapitalize="off" spellCheck className={cn( 'h-9 min-w-0 flex-1 bg-transparent pl-3 text-sm font-medium text-foreground outline-none', @@ -1386,6 +1387,8 @@ export function WorkingCopyPanel() { }} placeholder="What changed and why" aria-label="Commit description" + autoCapitalize="off" + spellCheck className={cn( 'min-h-[72px] resize-none rounded-none border-0 bg-transparent px-3 py-2 text-xs leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:border-0', commitBoxHeight === null ? 'max-h-[260px]' : 'max-h-[600px] overflow-y-auto', diff --git a/apps/desktop/src/features/inspector/CommitDetails.tsx b/apps/desktop/src/features/inspector/CommitDetails.tsx index 4ed82f9..7afb831 100644 --- a/apps/desktop/src/features/inspector/CommitDetails.tsx +++ b/apps/desktop/src/features/inspector/CommitDetails.tsx @@ -683,6 +683,7 @@ export function CommitDetails({ placeholder="Summary" aria-label="Commit summary" rows={1} + autoCapitalize="off" spellCheck className="min-h-9 resize-none overflow-hidden rounded-none border-0 bg-transparent px-3 py-2 text-sm font-medium leading-snug text-foreground shadow-none placeholder:font-normal placeholder:text-faint focus-visible:border-0 focus-visible:ring-0" /> @@ -699,6 +700,8 @@ export function CommitDetails({ }} placeholder="Description" aria-label="Commit description" + autoCapitalize="off" + spellCheck rows={Math.min(12, Math.max(3, draftParts.body.split('\n').length + 1))} style={descHeight === null ? undefined : { height: descHeight }} className="min-h-[72px] resize-none rounded-none border-0 bg-transparent px-3 py-2 text-xs leading-relaxed text-foreground shadow-none focus-visible:border-0 focus-visible:ring-0"