Skip to content

refactor: remove the built-in calendar - #1093

Merged
frahlg merged 2 commits into
masterfrom
refactor/retire-calendar
Sep 7, 2026
Merged

refactor: remove the built-in calendar#1093
frahlg merged 2 commits into
masterfrom
refactor/retire-calendar

Conversation

@frahlg

@frahlg frahlg commented Sep 7, 2026

Copy link
Copy Markdown
Member

Remove the built-in CalDAV server, polling, plan/history feeds, credential endpoint and Calendar settings tab. Future charging uses the existing loadpoint targets and ready-by schedules. This removes about 4,800 net lines and three Go dependencies.

Old config still loads and warns when calendar support was enabled. An atomic, one-time migration selects the home load profile so an old calendar cannot leave the box stuck in away; later manual profile choices survive restart. Existing charging goals, calendar objects, credentials, model weights and forecast archives remain in the database and backups. Fresh databases omit the retired calendar tables. See the updated calendar page for upgrade steps.

Validation: make verify-all (Go tests, integration checks, vet and release-target builds), 541 web tests, and both box versions running locally in the browser. Confirmed Calendar is removed and Chargers remains. Tests cover old config, retired LAN and app routes, one-time profile migration, and byte-preserving calendar/model backup. Physical-site and human UI review remain for beta validation.

Coordinated with planner/forecast work; includes the history cutoff fix #1091 as its base. This does not change Rust model state, forecast replay inputs or pipeline policy. Other open PRs share main/config/UI files (#1052, #1003, #826, #735, #734); this diff only retires calendar code and preserves their subject areas. No merge or release is part of this PR.


Note

Medium Risk
Removes a user-facing integration and changes load forecasting/planning inputs for sites that relied on calendar away/EV events; migration and config warnings mitigate stuck-state risk but operators must re-enter charging intent manually.

Overview
Removes the built-in CalDAV stack — in-process server (caldavserver), polling client (calendar), Settings/API routes (/api/caldav/*), port 5232 in compose, and the caldav: example config. go-ical, go-webdav, and rrule-go are dropped from go.mod.

Runtime behavior changes: startup no longer starts CalDAV or applies calendar intents. The MPC/load forecaster always uses the home load profile (loadSvc.Predict); calendar away windows no longer shrink predicted load. EV ready-by must come from loadpoint targets and ready-by schedules, not calendar titles.

Upgrade path: legacy YAML with caldav.enabled still parses; FTW sets RetiredCalendarEnabled, logs a warning, and runs a one-time RetireCalendarProfile() so a stuck away profile cannot persist after upgrade. Calendar tables/data in state.db are retained for backup/rollback; fresh DBs skip creating them. Docs (docs/caldav-integration.md) describe migration steps.

Reviewed by Cursor Bugbot for commit 03af60e. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_71e35b4b-ac84-4c2b-8ae1-e6dcb378021e)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T14:38:01.034946Z faad896 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_4b3f91d7-06db-465f-a392-d5a439d64c44)

@frahlg
frahlg merged commit 0edaff7 into master Sep 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant