Add carrier gateway field, calendar-only push, and menu preview to UI
All checks were successful
Deploy / deploy (push) Successful in 39s

Surfaces the settings/actions that only existed at the API or env-var
level: carrier_gateway was already an accepted setting but had no form
field; HA webhook and Gmail config were invisible from the UI entirely.
Adds a calendar-only push and a side-effect-free preview so the HA sync
and scraper can be tested without texting everyone. Secrets stay env-only
since the UI has no auth — only configured/not-configured status is
exposed.

Also fixes calendar_result reporting "ok" when HA_WEBHOOK_URL wasn't set
at all, and stops the calendar-only push from clobbering the SMS job's
last_run/last_result status fields.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KsJqAZ82Veyf5oihBr71S5
This commit is contained in:
Barely Removable 2026-09-03 07:18:12 -07:00
parent a9ea0a2d87
commit 9c1112f28e
2 changed files with 197 additions and 36 deletions

View file

@ -26,6 +26,17 @@ Runs as one Docker container on the user's Unraid home server.
automation (webhook trigger → `calendar.create_event`) turns this into an
all-day calendar event with the menu. This makes the scrape here the
single source of truth — HA doesn't poll or re-scrape anything.
- **Manual actions (2026-09-03):** besides "Send Lunch Menu Now" (full job —
scrape, HA push, text everyone), the UI has "Push to Calendar Only"
(`POST /api/push-calendar` → `push_calendar_only()`, scrape + HA push, no
texts — for testing the calendar sync without spamming phones) and
"Preview Today's Menu" (`GET /api/preview` → `_scrape_menu()`, pure dry
run, no side effects at all). `carrier_gateway` is editable in the
Schedule card (dropdown of common US carriers + custom domain). Gmail
credentials and `HA_WEBHOOK_URL` stay env-only, not settings.json — the
UI has no auth, so secrets aren't made editable there; `GET
/api/integrations` just exposes whether each is configured (booleans,
not values) so the UI can show a badge.
## Local development