Files
roam/azosdav.org
2026-10-14 09:41:44 +03:00

32 lines
3.5 KiB
Org Mode

:PROPERTIES:
:ID: 1196aa79-76ba-4090-a896-6e4938338bd1
:END:
#+title: azos/dav
#+filetags: :project: :knowledge: :dav:
Back to [[id:bf4dde56-0967-4374-94ed-771301e47c66][azos]].
* Architecture
- Phone (Apple Reminders) ↔ Nextcloud CalDAV ↔ vdirsyncer ↔ local vdir, with todoman (=todo=) as the CLI. Generic module: =azos-core/suites/base/dav= (=azos.dav.*=); lauretta's account in =features/dav= via home-manager's own =accounts.calendar.accounts= (same split as mail).
- DAV todos are deliberately separate from org-roam project todos ("local vs dav", not "phone"). Moving a project todo to DAV = create on DAV with =(project)= prefix, delete locally. The =todo= / =workplate= skills handle DAV when =azos-dav-sync= is on PATH — no separate skill.
- =azos-dav-sync=: YubiKey presence gate (exit 75 + last-sync time if absent) → discover → metasync → sync → regenerate a read-only org view (=~/.local/share/azos-dav/todos.org=, added to org-agenda via =~/.emacs.d/extra/azos-dav.el=). Conflicts: server/phone wins.
- Live since 2026-10-14 on lauretta: syncs Nextcloud lists =aner= and =zakobar= (todoman shows them as =Aner= / =Zakobar=); collections still ="from a"= (everything). Committed azos-core =ba95691=, azos =b5c7d7d=.
- Calendar (events) sync + workplate reading today's schedule is the next step — tracked in [[id:939a9fa3-ddc8-4cc1-8130-771cc5de000f][azos/todos]].
* Gotchas
- todoman 4.7: completing a *recurring* VTODO forks a new UID and drops DTSTART + VALARM (phone stops notifying). plann 1.2 / caldav-lib "safe" mode keeps UID but drifts the next occurrence to completion time and leaves absolute alarm triggers stale. Decision: recurring items are completed on the phone; skill forbids =todo done= on them. Stretch: inspect how Apple writes a completed recurrence, maybe fix todoman upstream (issues #304, #249).
- todoman has no alarm support at all — timed tasks created from the computer won't ring on the phone.
- todoman =--porcelain= gives epoch seconds; all-day vs local midnight is indistinguishable (org view treats midnight as date-only).
- HM vdirsyncer names pairs =calendar_<account>=, a = remote; ="remote wins"= → ="a wins"=.
- =vdirsyncer discover= prompts per missing collection and aborts on closed stdin. Module pre-creates explicitly listed local collections and answers "n" (never creates lists on the server; typos fail loudly); answers "y" only for ="from a"=. Runs every sync so new lists appear automatically.
- =ical2orgpy= ignores VTODO (events only); no existing VTODO→org tool found, hence the small =org-view.jq=.
- Test bed that worked: local Radicale (=nix shell nixpkgs#radicale=, =auth type = none=) + MKCALENDAR via curl.
* Future work (not scheduled — deliberately not in azos/todos)
- Emacs command to mark a DAV item done from the org agenda/view (run =todo done= + =azos-dav-sync=); the org view is read-only by design until then.
- See how Apple writes a completed *recurring* reminder (inspect real .ics after ticking one on the phone); if feasible, fix todoman's recurring completion upstream (#304, #249) so recurring items can be completed from the computer.
- Pin =collections= in =features/dav= to the wanted lists instead of ="from a"= (currently only =aner= and =zakobar= exist, so no practical difference yet).
- Check whether Reminders *flags* survive CalDAV (likely iCloud-only); priority (!/!!/!!!) is the known-working importance marker.
- Alarms: todoman can't create them, so computer-created timed tasks don't ring — only fixable with custom code or an upstream todoman feature.