Pre-fill the SearXNG URL from the deployment default
CI / ci (push) Successful in 1m56s
CI / ci (pull_request) Successful in 2m3s

The service now reads the optional MEALQUEST_SEARXNG_URL, validates it at
startup like any SearXNG URL, and returns it in the recipe search settings
as the read-only default_base_url. base_url stays the saved URL only, and
PATCH is unchanged: nothing is stored until the household saves.

The recipe search card pre-fills the SearXNG URL from default_base_url
while no URL is saved, and an edit now clears the last Test result so a
stale count or error never sits beside "Save your changes to test them."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 10:41:31 -04:00
co-authored by Claude Opus 5.5
parent cb42ffa280
commit 938b408deb
15 changed files with 250 additions and 44 deletions
+2 -2
View File
@@ -79,9 +79,9 @@ func run(cfg config.Config, logger *slog.Logger) error {
if err != nil {
return err
}
search, err := recipes.NewSearchSettingsService(db, box)
search, err := recipes.NewSearchSettingsService(db, box, cfg.SearXNGURL)
if err != nil {
return err
return fmt.Errorf("%s: %w", config.EnvSearXNGURL, err)
}
ai, err := aisettings.New(db, box, cfg.PublicURL.String())