Skip to content

feat: Calendar — the next event on Home, and a full add/edit lifecycle - #5

Merged
eddiegulay merged 1 commit into
mainfrom
develop
Jul 12, 2026
Merged

feat: Calendar — the next event on Home, and a full add/edit lifecycle#5
eddiegulay merged 1 commit into
mainfrom
develop

Conversation

@eddiegulay

Copy link
Copy Markdown
Owner

Adds Google Calendar support to Tempo, via the device's CalendarContract provider — the same one the Google Calendar sync adapter writes into, so the launcher shows the very agenda the user's other devices show. No OAuth, no network, no Play Services.

What's in it

  • Home's top-right cluster shows the next event, set vertically (縦書き), replacing the Japanese date. Kanji and kana stack upright; a run of Latin turns a quarter-turn and reads as one stroke; short numbers sit upright (縦中横). Falls back to the date when there's nothing ahead or no access. Tapping it is the only way into the agenda.
  • The 予定 page — the next fortnight, grouped by day, in-progress events marked いま.
  • Add and edit in place, on a 栞 wheel rather than a Material picker.
  • Recurring events and read-only calendars are view-only, and hand off to the system calendar app. Editing one occurrence of a series means writing the provider's exception rows, and getting it subtly wrong silently rewrites a meeting for everyone on the invite — so Tempo doesn't try.
  • Every mutation is confirmed, restating the event and its consequence. A calendar is shared state.

Reliability

The lifecycle now reports and recovers rather than failing silently:

  • Loading, empty and failed are three distinct states. An unreadable calendar used to render as 予定はありません — a free day and a broken one were the same picture, and the user would have believed it.
  • A failed write keeps the user in the composer with their draft intact and the reason stated, instead of returning to an agenda that doesn't contain the event they just typed.
  • Every fault names itself and offers the one thing that fixes it: ask for access again, open Settings, add an account, or retry.

Permissions

Adds READ_CALENDAR and WRITE_CALENDAR, requested when the page is opened, never at launch.

Verification

Built, unit-tested (30 passing, incl. the vertical-text segmentation and the fault-recovery contract), and driven end-to-end on an emulator — including revoking WRITE_CALENDAR mid-session to confirm the save fails visibly, the draft survives, and the retry writes through to the provider.

…Home

Tempo now shows the user's real agenda. It reads CalendarContract — the same
provider the Google Calendar sync adapter writes into — so the launcher shows
the very events the user's other devices show, with no OAuth, no network and no
Play Services. Writes go back out through the same sync adapter.

Home's top-right cluster, which printed the date in Japanese, now shows the next
event set vertically (縦書き): kanji and kana stack upright one glyph per cell, a
run of Latin turns a quarter-turn and reads as a single stroke, and short numbers
sit upright in place (縦中横). It falls back to the date when there is nothing
ahead or no access, and tapping it is the only way into the agenda.

Events can be added and edited in place, on a 栞 wheel rather than a Material
picker. Recurring events and read-only calendars are deliberately view-only and
hand off to the system calendar app: editing one occurrence of a series means
writing the provider's exception rows, and getting it subtly wrong silently
rewrites a meeting for everyone on the invite.

Every mutation is confirmed first, restating the event and its consequence. A
calendar is shared state — a write lands on every device the user owns, and a
deletion is withdrawn from everyone invited and cannot be undone.

The whole lifecycle reports and recovers rather than failing silently:

- Loading, empty and failed are three distinct states. An unreadable calendar
  used to render as "予定はありません", which the user would believe — a free day and
  a broken one were the same picture.
- A failed write keeps the user in the composer with their draft intact and the
  reason stated, instead of returning to an agenda that does not contain the
  event they just typed.
- Every fault names itself and offers the one thing that fixes it: ask for access
  again, open Settings, add an account, or retry.
@eddiegulay
eddiegulay merged commit 9634a85 into main Jul 12, 2026
1 check 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