estimate: size CalDAV and CardDAV items too #68

Merged
jcoffey-dev merged 1 commits from feat/estimate-dav into main 2026-11-12 16:42:32 +00:00
Owner

Follow-up to #67 (stacked on it — merge #67 first). Extends real --estimate sizes from mail to calendars and contacts, so the four standard-protocol sources — imap, maildir, caldav, carddav — all report counts and bytes.

How. The per-collection PROPFIND the dry-run already issues now also asks for <d:getcontentlength/>. The parser already reads that prop (ResourceProps.content_length), so sizing calendar events and contact cards costs no extra request — the same pattern the WebDAV listing already used. A server that omits the length just leaves those items unsized.

Scope. CalDAV and CardDAV only. WebDAV files stay on the dry-run fallback: its dry-run drops the per-file counts into a row the summary doesn’t surface, so sizing there needs separate work.

Change surface. One prop added to the shared propfind_dav_items() (additive, universally-supported, ignored by callers that don’t use it); a want_sizes-gated sum in the CalDAV/CardDAV dry-run branch; caldav/carddav added to Action::estimate_available(); help/README/fallback-note updated. New unit test that the item PROPFIND requests getcontentlength. cargo test --locked, fmt, clippy -D warnings all pass.

Follow-up to #67 (stacked on it — **merge #67 first**). Extends real `--estimate` sizes from mail to calendars and contacts, so the four standard-protocol sources — `imap`, `maildir`, `caldav`, `carddav` — all report counts **and** bytes. **How.** The per-collection PROPFIND the dry-run already issues now also asks for `<d:getcontentlength/>`. The parser already reads that prop (`ResourceProps.content_length`), so sizing calendar events and contact cards costs **no extra request** — the same pattern the WebDAV listing already used. A server that omits the length just leaves those items unsized. **Scope.** CalDAV and CardDAV only. WebDAV files stay on the dry-run fallback: its dry-run drops the per-file counts into a row the summary doesn’t surface, so sizing there needs separate work. **Change surface.** One prop added to the shared `propfind_dav_items()` (additive, universally-supported, ignored by callers that don’t use it); a `want_sizes`-gated sum in the CalDAV/CardDAV dry-run branch; `caldav`/`carddav` added to `Action::estimate_available()`; help/README/fallback-note updated. New unit test that the item PROPFIND requests `getcontentlength`. `cargo test --locked`, fmt, clippy `-D warnings` all pass.
jcoffey-dev changed target branch from feat/import-estimate to main 2026-11-12 16:42:22 +00:00
jcoffey-dev added 1 commit 2026-11-12 16:42:22 +00:00
estimate: size CalDAV and CardDAV items too
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 5m53s
ci / announce (pull_request) Skipped
1774918084
The item PROPFIND the dry run already does now asks for getcontentlength
as well, which the parser already reads, so --estimate can size calendar
events and contact cards at no extra request -- rounding out real sizes
to mail, calendars and contacts. A server that omits the length leaves
those items unsized; WebDAV files stay on the dry-run fallback, where the
file count is reported differently.
jcoffey-dev merged commit 155dc524e2 into main 2026-11-12 16:42:32 +00:00
jcoffey-dev deleted branch feat/estimate-dav 2026-11-12 16:42:32 +00:00
Sign in to join this conversation.