feat: Calendar — the next event on Home, and a full add/edit lifecycle - #5
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Google Calendar support to Tempo, via the device's
CalendarContractprovider — 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
Reliability
The lifecycle now reports and recovers rather than failing silently:
予定はありません— a free day and a broken one were the same picture, and the user would have believed it.Permissions
Adds
READ_CALENDARandWRITE_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_CALENDARmid-session to confirm the save fails visibly, the draft survives, and the retry writes through to the provider.