feat(ui): Listen-Einstellungen — Checkbox fuer serialize_on_file_overlap

Das Flag war bisher nur ueber MCP set_list_config erreichbar. UpdateListConfigDto
fuehrt es tri-state (null = gespeicherten Wert behalten), damit nur das
Listen-Modal es setzen/loeschen kann und kein anderer Aufrufer es per Omission
verliert.
This commit is contained in:
mika kuns
2026-08-27 10:15:17 +02:00
parent 24e1d648ee
commit 5cc99bfec6
9 changed files with 66 additions and 19 deletions
@@ -8,8 +8,8 @@ using Xunit;
namespace ClaudeDo.Worker.Tests.Hub;
/// UpdateListConfig's "all fields blank -> delete the row" branch used to delete unconditionally,
/// silently dropping SerializeOnFileOverlap -- a flag with no UI/hub affordance of its own (set
/// only via set_list_config or directly against ListConfigEntity).
/// silently dropping SerializeOnFileOverlap. The DTO field is tri-state: the list-settings modal
/// sends an explicit true/false, every other caller sends null and must not clear the stored flag.
public sealed class ListConfigHubTests : IDisposable
{
private readonly DbFixture _db = new();
@@ -98,4 +98,29 @@ public sealed class ListConfigHubTests : IDisposable
Assert.Equal("opus", config!.Model);
Assert.True(config.SerializeOnFileOverlap);
}
[Fact]
public async Task UpdateListConfig_ExplicitFalse_ClearsFlagAndDeletesOtherwiseEmptyRow()
{
var hub = CreateHub();
var listId = await SeedListAsync();
await SeedConfigAsync(listId, serializeOnFileOverlap: true);
await hub.UpdateListConfig(new UpdateListConfigDto(listId, null, null, null, SerializeOnFileOverlap: false));
Assert.Null(await GetConfigAsync(listId));
}
[Fact]
public async Task UpdateListConfig_ExplicitTrue_SetsFlagOnOtherwiseEmptyRow()
{
var hub = CreateHub();
var listId = await SeedListAsync();
await hub.UpdateListConfig(new UpdateListConfigDto(listId, null, null, null, SerializeOnFileOverlap: true));
var config = await GetConfigAsync(listId);
Assert.NotNull(config);
Assert.True(config!.SerializeOnFileOverlap);
}
}