Cookbook scheduler: inline settings card at the top of the Cookbook tab
The earlier scheduler commit shipped the backend + Schedule modal but left the feature dormant — no way to toggle it from the UI. This adds the missing knob:
* DEFAULT_SETTINGS gains `cookbook_scheduler_enabled` (False) and `cookbook_schedule_calendar_href` ("") so `/api/auth/settings` POST will actually persist them. Without this, the POST silently dropped unknown keys.
* cookbookSchedule.js gains a self-contained settings card injected at the top of the Cookbook tab body whenever the cookbook modal opens. Card contents:
- Enable toggle (writes cookbook_scheduler_enabled)
- Calendar dropdown populated from /api/calendar/calendars (writes cookbook_schedule_calendar_href)
- Status line: off / pick-a-calendar / N scheduled in next 24h · M running now · K skipped
- "Reconcile now" button that POSTs /api/cookbook/schedule/reconcile-now
* The same module reveals/hides the Schedule… buttons on serve panels whenever the feature flag changes, so toggling on immediately surfaces the schedule UI without a refresh.
Settings UI lives in cookbookSchedule.js (not settings.js) so the entire scheduler surface — backend, reconciler, modal, settings — collapses cleanly: delete src/cookbook_scheduler.py + routes/cookbook_schedule_routes.py + static/js/cookbookSchedule.js, drop the two DEFAULT_SETTINGS keys, and the two app.py registration lines, and the feature is gone.
This commit is contained in:
@@ -159,6 +159,12 @@ DEFAULT_SETTINGS = {
|
||||
"admin_panel": "ctrl+shift+u",
|
||||
"cancel": "escape",
|
||||
},
|
||||
# Cookbook scheduler (calendar-driven serve windows). Off by default;
|
||||
# the inline card in the Cookbook tab flips this. When true, the
|
||||
# reconciler at src/cookbook_scheduler.py reads events from the
|
||||
# designated calendar and auto-launches/kills serves.
|
||||
"cookbook_scheduler_enabled": False,
|
||||
"cookbook_schedule_calendar_href": "",
|
||||
}
|
||||
|
||||
DEFAULT_FEATURES = {
|
||||
|
||||
Reference in New Issue
Block a user