Skip to content

calendar 0.1.3: compare on open reads host Day/End day edits back to Google (#192) - #212

Merged
michielbdejong merged 2 commits into
mainfrom
claude/calendar-compare-on-open
Sep 29, 2026
Merged

michielbdejong merged 2 commits into
mainfrom
claude/calendar-compare-on-open

Conversation

@michielbdejong

Copy link
Copy Markdown
Contributor

Closes #192: calendar compare-on-open. Edits made to synced event rows outside the app (the plain table, the built-in Calendar view, another device) become reviewed changes to send to Google.

What 0.1.2 already did. On open, the app compares every synced row with its on-row sync-baseline. Name, Notes, Location, Start, End and All day edits already went to "Review N changes" and were sent with If-Match: 412 means stale, a field changed on both sides is a conflict, and the baseline advances only after Google confirms.

The gap fixed here. Day and End day edits made in the host were ignored and then overwritten from Start/End. sync.ts hostValue() now reads the host format back to Google (the lens inverse):

Release: calendar 0.1.3 (apps/calendar/0.1.3/ui.js). The catalog entry stays enabled: false. The #183 log hook is unchanged.

Tests:

  • app/compare.test.ts covers every host-edit case: conflicts, a Google change to another field, local deletion, a hand-added row, and an unmapped column.
  • view.test.ts checks the reopen shows "Review 1 change".
  • The e2e edits End day through the store, reloads, sees the change without pressing Sync now, sends, and checks the mock got PATCH {end:{date}} with If-Match.
  • The calendar lane passes at pin 1432e244a: unit 146/146, e2e 4/4. The tooling tests (222), apps.mjs check, tsc, oxfmt and oxlint are clean.

Decisions for Michiel:

  1. Moving Day without End day changes an all-day event's length, as the host view shows it. Should it instead keep the length, like dragging in Google?
  2. End day == Day on an all-day row is held back, because the host view draws it on no day.
  3. Unmapped columns are listed on every sync, not only when edited.
  4. Hand-added rows stay local: there's no "Publish to Google Calendar" (Calendar: establish one supported installation path and verify its declared scope end to end #101).
  5. A row whose Day or End day has no Google equivalent holds back the whole row, including Google-side edits, until it's fixed.
  6. The review sheet shows Start/End with the last day, not which column was edited.

🤖 Generated with Claude Code

Michiel de Jong and others added 2 commits September 29, 2026 17:32
Edits made to synced rows outside the app (the host's table, its Calendar
view, another device) were already found on open for Name, Notes,
Location, Start, End and All day. Edits to Day and End day were not: the
next sync rewrote them from Start and End. hostValue() now reads the
row's host format back through the lens (exclusive End day for all-day,
Day's date with Start's clock and offset for timed), decided against the
on-row baseline; what has no Google equivalent is held back and listed.
Columns the app doesn't map are listed as kept here only. After a send,
the row's Start and End are written from Google's answer.

Release 0.1.3 (catalog entry stays enabled: false). Unit tests per case
in app/compare.test.ts; the e2e edits End day as the user, reopens the
app, reviews and sends it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-day labels (#192)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michielbdejong
michielbdejong merged commit 2b88469 into main Sep 29, 2026
30 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.

calendar: compare-on-open — detect edits made outside the app and send them for review (#177)

1 participant