refactor(config): consolidate commit types into CommitTypeRegistry

Replaces six scattered "chore" literals across TaskEntity, ListEntity,
WorkerHub, ListsIslandViewModel, ListNavItemViewModel and the inline
commit type list in ListSettingsModalViewModel.
This commit is contained in:
mika kuns
2026-05-19 09:00:00 +02:00
parent 5308ba3136
commit 5da69ee6aa
7 changed files with 20 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
namespace ClaudeDo.Data.Models;
public static class CommitTypeRegistry
{
public static readonly IReadOnlyList<string> Types = new[]
{
"chore", "feat", "fix", "refactor", "docs", "test", "ci", "perf", "style", "build",
};
public const string DefaultType = "chore";
}

View File

@@ -6,7 +6,7 @@ public sealed class ListEntity
public required string Name { get; set; }
public required DateTime CreatedAt { get; init; }
public string? WorkingDir { get; set; }
public string DefaultCommitType { get; set; } = "chore";
public string DefaultCommitType { get; set; } = CommitTypeRegistry.DefaultType;
// Navigation properties
public ListConfigEntity? Config { get; set; }

View File

@@ -32,7 +32,7 @@ public sealed class TaskEntity
public required DateTime CreatedAt { get; init; }
public DateTime? StartedAt { get; set; }
public DateTime? FinishedAt { get; set; }
public string CommitType { get; set; } = "chore";
public string CommitType { get; set; } = CommitTypeRegistry.DefaultType;
public string? Model { get; set; }
public string? SystemPrompt { get; set; }
public string? AgentPath { get; set; }