chore(config): remove deprecated Catalog.RefreshOnStart#24
Conversation
The RefreshOnStart field on CatalogConfig was never wired to any startup behavior and was marked deprecated in v1.1.0. Remove it entirely along with its viper default, CLI set-key registration, TUI settings-panel display, and all test references. Existing user configs that still set `catalog.refresh_on_start` continue to load without error because viper silently ignores unknown keys — the value is simply dropped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Removes the deprecated CatalogConfig.RefreshOnStart configuration flag and cleans up all remaining UI/CLI/test references since it was never wired into actual startup refresh behavior.
Changes:
- Deletes
RefreshOnStartfrompkg/configtypes, defaults, and viper defaults. - Removes the setting from the TUI settings panel and the CLI
config setboolean-key handling. - Updates tests and changelog to reflect the removal.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/config/loader_test.go | Removes YAML/test assertions for the removed config field. |
| pkg/config/loader.go | Drops the viper default for catalog.refresh_on_start. |
| pkg/config/config_test.go | Removes default/config struct tests for RefreshOnStart. |
| pkg/config/config.go | Removes RefreshOnStart from CatalogConfig and default config. |
| pkg/catalog/manager_test.go | Updates test config literals to match the new config struct. |
| internal/tui/app.go | Removes the “Catalog auto-refresh” row from settings display. |
| internal/cli/config_cmd.go | Removes catalog.refresh_on_start from the bool key list. |
| internal/cli/cli_test.go | Updates config parsing tests after removing the deprecated key. |
| CHANGELOG.md | Documents the removal and updates the prior deprecation note. |
Comments suppressed due to low confidence (1)
pkg/config/loader_test.go:68
- The PR’s compatibility note says existing configs with
catalog.refresh_on_startstill load cleanly, but this test no longer exercises the “unknown/deprecated key is ignored” behavior. Consider keepingrefresh_on_start(or another unknown key) in the YAML and assertingLoadsucceeds and the parsed config is unaffected, to prevent future regressions (e.g., switching toUnmarshalExact).
configContent := `
catalog:
source_url: "https://custom.example.com/catalog.json"
ui:
theme: "dark"
page_size: 50
use_colors: false
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| retained for backward compatibility with existing config files | ||
| and will be removed once the sole remaining TUI display reference | ||
| is cleaned up. | ||
| is cleaned up. (Removed in [Unreleased].) |
There was a problem hiding this comment.
(Removed in [Unreleased].) uses a shortcut reference link, but there is no [Unreleased]: … reference defined at the bottom of the changelog. Add an [Unreleased] compare link definition (consistent with other versions) or drop the bracketed link syntax to avoid a broken/unrendered link.
| is cleaned up. (Removed in [Unreleased].) | |
| is cleaned up. (Removed in Unreleased.) |
Promote the Unreleased section to 1.2.0 and capture the UX / operability work landed since v1.1.0: - #20 install/update progress streaming with -v - #21 gRPC server wire-up in helper - #22, #26 test coverage (cli/output 0→82%, systray 0.2→3.2%) - #24 RefreshOnStart field removal - #27 bubbles v0.21 -> v1.0 - #28 go:embed baseline catalog (fresh `go install` works offline) - #29 pkg/logging slog wrapper wired into main and grpc recovery Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
RefreshOnStartfield fromconfig.CatalogConfigand all its consumers. The flag was never wired to any startup behavior since introduction; catalog refresh cadence is controlled byRefreshInterval+ the manager's cache TTL.catalog.refresh_on_start), the "Catalog auto-refresh" row in the TUI settings panel, the key's listing in the CLIconfig setbool-key table, and all test references.Compatibility
catalog.refresh_on_startcontinue to load cleanly. Viper silently ignores unknown keys, so the value is simply dropped on load — no migration warning is added (it would be cosmetic; the key was never actually wired).Test plan
go build ./...cleango test ./... -race -short -count=1green/tmp/gcil-install/golangci-lint run --timeout=5mclean (v1.64.8)gofmt -lcleangoimports -l -local github.com/kevinelliott/agentmanagercleanRefreshOnStart/refresh_on_startreferences remain outside CHANGELOG contextCo-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com