Overview
Add commit template support to help teams enforce consistent commit message conventions. Templates can be loaded from the repository's .gitmessage file (via git config commit.template) or managed directly inside the app and stored per-user.
Proposed Features
.gitmessage Integration
- Automatically detect
commit.template from git config on repo load
- Display the file content as a read-only "Repo Template" entry in the template picker
- Prompt the user to apply it when opening the Pending tab if the commit message is empty
In-App Template Management
- Create, edit, and delete named templates (e.g.
feat, fix, docs, chore)
- Each template supports
<placeholder> markers (e.g. <title>, <issue>, <details>)
- Tab key navigates between placeholders after a template is applied
- Templates stored in
localStorage per installation
Validation (Optional per Template)
- Each template can have an optional regex validation pattern
- Real-time check as the user types — shows a warning if the message does not match
- Does not block the commit; warns only
ASCII Mockups
Template picker dropdown (next to "Commit message" label):
┌─────────────────────────────────────────────┐
│ Commit message [Template ▾] │
│ ┌─────────────────────────────────────────┐ │
│ │ Enter commit message... │ │
│ └─────────────────────────────────────────┘ │
│ ┌────────────────┐ │
│ │ 📄 .gitmessage │ │
│ │────────────────│ │
│ │ feat │ │
│ │ fix │ │
│ │ docs │ │
│ │ chore │ │
│ │────────────────│ │
│ │ ⚙ Manage... │ │
│ └────────────────┘ │
│ [✓ Amend] [✦ AI commit message] [Commit] │
└─────────────────────────────────────────────┘
After applying a template:
┌─────────────────────────────────────────────┐
│ Commit message [Template: feat ▾] [✕] │
│ ┌─────────────────────────────────────────┐ │
│ │feat: <title> │ │
│ │ │ │
│ │Body: <details> │ │
│ │ │ │
│ │Closes: #<issue> │ │
│ └─────────────────────────────────────────┘ │
│ ⭾ Tab to jump to next field (3 remaining) │
│ [✓ Amend] [✦ AI commit message] [Commit] │
└─────────────────────────────────────────────┘
Validation warning:
┌─────────────────────────────────────────────┐
│ Commit message [Template: feat ▾] [✕] │
│ ┌─────────────────────────────────────────┐ │
│ │fix something │ │
│ └─────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────┐ │
│ │ ⚠ Does not match "feat" pattern │ │
│ │ Expected: ^feat: .{1,50}$ │ │
│ └─────────────────────────────────────────┘ │
│ [✓ Amend] [✦ AI commit message] [Commit] │
└─────────────────────────────────────────────┘
Template manager modal:
┌────────────────────────────────────────────────────────┐
│ Commit Templates [✕] │
├────────────────────────────────────────────────────────┤
│ ┌─────────────────┐ ┌─────────────────────────────┐ │
│ │ 📄 .gitmessage │ │ Name │ │
│ │─────────────────│ │ ┌─────────────────────────┐ │ │
│ │ ▶ feat │ │ │ feat │ │ │
│ │ fix │ │ └─────────────────────────┘ │ │
│ │ docs │ │ Content │ │
│ │ chore │ │ ┌─────────────────────────┐ │ │
│ │ │ │ │feat: <title> │ │ │
│ │ [+ New] │ │ │ │ │ │
│ └─────────────────┘ │ │Body: <details> │ │ │
│ │ │ │ │ │
│ │ │Closes: #<issue> │ │ │
│ │ └─────────────────────────┘ │ │
│ │ Validation pattern (regex) │ │
│ │ ┌─────────────────────────┐ │ │
│ │ │ ^feat: .{1,50}$ │ │ │
│ │ └─────────────────────────┘ │ │
│ │ [Delete] [Cancel] [Save] │ │
│ └─────────────────────────────┘ │
└────────────────────────────────────────────────────────┘
Implementation Notes
Related Features
- Pairs naturally with the existing AI commit message generator
- Validation patterns make it easy to enforce Conventional Commits or custom team standards
Overview
Add commit template support to help teams enforce consistent commit message conventions. Templates can be loaded from the repository's
.gitmessagefile (viagit config commit.template) or managed directly inside the app and stored per-user.Proposed Features
.gitmessage Integration
commit.templatefromgit configon repo loadIn-App Template Management
feat,fix,docs,chore)<placeholder>markers (e.g.<title>,<issue>,<details>)localStorageper installationValidation (Optional per Template)
ASCII Mockups
Template picker dropdown (next to "Commit message" label):
After applying a template:
Validation warning:
Template manager modal:
Implementation Notes
Data model:
Files to add / modify:
src/components/tabs/PendingTab.tsxsrc/components/shared/TemplateManagerModal.tsxsrc/lib/git-api.tsgetCommitTemplatePath()src-tauri/src/lib.rsget_commit_template_pathcommandsrc-tauri/src/executor.rsgit config commit.templateSuggested implementation order:
git config commit.templateTemplateManagerModalwith localStorage persistencePendingTabRelated Features