From 6d90cd7185018b07ef23959a830f3f47cc1942a0 Mon Sep 17 00:00:00 2001 From: Harry Bayliss Date: Fri, 15 May 2026 19:13:54 +0100 Subject: [PATCH] Match Solo summary cadence options --- CHANGELOG.md | 5 ++++- internal/app/palette.go | 12 ++++++------ internal/app/palette_ux_test.go | 26 ++++++++++++++++++++++++++ internal/app/settings.go | 2 +- internal/app/settings_test.go | 3 +++ internal/app/summarizer.go | 2 +- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fafdb7..f6dba81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,10 @@ loosely follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). summaries, choose provider, edit provider model names, cycle cadence, test the selected summarizer (`patterm okay`), summarize the current top-level agent immediately, and explicitly save or cancel draft - settings changes. + settings changes. Cadence choices match Solo: `15s`, `30s`, and + `1m`; the value is a minimum quiet/activity gap before another + summary attempt for the same top-level agent, not a background + periodic timer. ### Changed - Command palette UX overhaul. The single flat list grew section diff --git a/internal/app/palette.go b/internal/app/palette.go index 68d758a..63b05bb 100644 --- a/internal/app/palette.go +++ b/internal/app/palette.go @@ -1341,12 +1341,12 @@ func (p *paletteState) activateAutoSummaryRow() (paletteAction, bool, int) { p.mode = paletteModeSettingsInput case "cadence": switch p.settings.AutoSummary.Cadence { - case "5m": - p.settings.AutoSummary.Cadence = "15m" - case "15m": - p.settings.AutoSummary.Cadence = "30m" + case "15s": + p.settings.AutoSummary.Cadence = "30s" + case "30s": + p.settings.AutoSummary.Cadence = "1m" default: - p.settings.AutoSummary.Cadence = "5m" + p.settings.AutoSummary.Cadence = "15s" } case "test": return p.settingsAction("settings-test"), true, 1 @@ -1472,7 +1472,7 @@ func (p *paletteState) renderAutoSummary(out writeFlusher, cols, rows int) { moveTo(&b, row, leftPad) b.WriteString(styleBorder + "├" + strings.Repeat("─", width-2) + "┤" + styleReset) row++ - footer := styleHint + "↵ edit/toggle · save row commits · esc cancel" + styleReset + footer := styleHint + "↵ edit/toggle · cadence 15s/30s/1m · save row commits · esc cancel" + styleReset if visibleLen(footer) > content { footer = clipRunes(footer, content-1) + "…" } diff --git a/internal/app/palette_ux_test.go b/internal/app/palette_ux_test.go index 8c38c52..7247a8b 100644 --- a/internal/app/palette_ux_test.go +++ b/internal/app/palette_ux_test.go @@ -321,6 +321,32 @@ func TestPaletteAltDigitQuickPick(t *testing.T) { } } +func TestAutoSummaryCadenceCyclesSoloValues(t *testing.T) { + p := newPalette(nil, "", "", preset.Set{}, defaultSettings()) + p.mode = paletteModeAutoSummary + for i, row := range autoSummaryRows() { + if row.key == "cadence" { + p.cursor = i + break + } + } + if p.settings.AutoSummary.Cadence != "1m" { + t.Fatalf("initial cadence = %q", p.settings.AutoSummary.Cadence) + } + p.activateAutoSummaryRow() + if p.settings.AutoSummary.Cadence != "15s" { + t.Fatalf("first cycle cadence = %q", p.settings.AutoSummary.Cadence) + } + p.activateAutoSummaryRow() + if p.settings.AutoSummary.Cadence != "30s" { + t.Fatalf("second cycle cadence = %q", p.settings.AutoSummary.Cadence) + } + p.activateAutoSummaryRow() + if p.settings.AutoSummary.Cadence != "1m" { + t.Fatalf("third cycle cadence = %q", p.settings.AutoSummary.Cadence) + } +} + func TestPaletteFormCtrlRTogglesRelaunchFromCommandField(t *testing.T) { p := newPalette(nil, "", "", preset.Set{}) p.mode = paletteModeSpawnForm diff --git a/internal/app/settings.go b/internal/app/settings.go index 1f18463..8ff8424 100644 --- a/internal/app/settings.go +++ b/internal/app/settings.go @@ -36,7 +36,7 @@ func defaultSettings() settings { Enabled: true, Provider: defaultSummaryProvider, Models: defaultSummaryModels(), - Cadence: "5m", + Cadence: "1m", QuietWindowMS: 3000, MinInputChars: 4, MaxHistoryChars: 12000, diff --git a/internal/app/settings_test.go b/internal/app/settings_test.go index 6ab7850..4de0718 100644 --- a/internal/app/settings_test.go +++ b/internal/app/settings_test.go @@ -21,6 +21,9 @@ func TestLoadSettingsDefaults(t *testing.T) { if st.AutoSummary.Provider != "codex" { t.Fatalf("provider = %q want codex", st.AutoSummary.Provider) } + if st.AutoSummary.Cadence != "1m" { + t.Fatalf("cadence = %q want 1m", st.AutoSummary.Cadence) + } if got := st.AutoSummary.modelFor("codex"); got != "gpt-5.4-mini" { t.Fatalf("codex model = %q", got) } diff --git a/internal/app/summarizer.go b/internal/app/summarizer.go index 38faa66..8765f8d 100644 --- a/internal/app/summarizer.go +++ b/internal/app/summarizer.go @@ -191,7 +191,7 @@ func (m *summaryManager) maybeStart(ctx context.Context, now time.Time) { } cadence, err := time.ParseDuration(cfg.Cadence) if err != nil || cadence <= 0 { - cadence = 5 * time.Minute + cadence = time.Minute } quiet := time.Duration(cfg.QuietWindowMS) * time.Millisecond var startID string