Goal
When the creator clicks "Schedule" on a poll, also insert a Google Calendar event into a shared calendar of their choice — picked from a dropdown of their writable calendars in the scheduling toolbar.
This is the missing piece for community workflows where the shared calendar is the source of truth (e.g., sensemakingscenius@gmail.com, where every member is subscribed). Today the creator has to manually copy the time/title/description over after scheduling.
Spec & plan
The plan is fully decomposed into 5 tasks with exact code blocks and commands. Execute it with the superpowers:subagent-driven-development skill (one fresh subagent per task) or superpowers:executing-plans (inline batched).
Scope
v1 — in scope:
- Creator picks one of their own writable Google Calendars at schedule time. Inherits write access through their existing membership on the shared calendar — no service account.
- Choice remembered per-creator in
localStorage.
- Scope upgrade from
calendar.readonly to calendar.events via incremental GIS consent.
- Calendar insert runs after
finalizePoll succeeds; calendar failure never rolls back the schedule.
Out of scope (deferred):
- Service-account flow.
- Per-community calendar pre-config — filed as Citizen-Infra/community-admin#12.
- Adding participants as event attendees.
- Auto-cancel/update of the Google event when a poll is unscheduled or re-scheduled (would need lexicon change to track
googleEventId).
- Adding a client-side test runner — keep avails' "no client tests, manual smoke" pattern.
Files to change
| File |
Change |
client/src/lib/googleCalendar.js |
Add scope constants, parameterise requestGoogleAccess, add listWritableCalendars and insertEvent. |
client/src/components/SchedulingGrid.jsx |
Add the "Add to" picker / connect link to the toolbar. |
client/src/pages/PollView.jsx |
Hold writable-calendars + chosen-calendar + token state; persist to localStorage; insert event after finalize; render success link / retry-able error. |
No server changes. No lexicon changes. No new dependencies.
Definition of done
- Plan tasks 1–5 executed, each with its own commit per the plan.
- Smoke test (plan Task 5) walked end-to-end — happy path, don't-add, localStorage default, OAuth refused, retry, re-schedule orphan.
- Pushed and deployed to Railway (
avails.zhgnv.com).
- Verified live by scheduling a real poll into the Sensemaking Scenius shared calendar.
- This issue closed referencing the merge commit.
Follow-up after v1
When/if persisting googleEventId and googleCalendarId on the poll lexicon becomes worth doing, revisit:
- Auto-cancel orphan Google event on
handleUnschedule.
- Auto-update on re-schedule.
- Per-community defaults pulled from community-admin#12.
Goal
When the creator clicks "Schedule" on a poll, also insert a Google Calendar event into a shared calendar of their choice — picked from a dropdown of their writable calendars in the scheduling toolbar.
This is the missing piece for community workflows where the shared calendar is the source of truth (e.g.,
sensemakingscenius@gmail.com, where every member is subscribed). Today the creator has to manually copy the time/title/description over after scheduling.Spec & plan
docs/superpowers/specs/2026-05-06-google-calendar-event-creation-design.mddocs/superpowers/plans/2026-05-06-google-calendar-event-creation.mdThe plan is fully decomposed into 5 tasks with exact code blocks and commands. Execute it with the
superpowers:subagent-driven-developmentskill (one fresh subagent per task) orsuperpowers:executing-plans(inline batched).Scope
v1 — in scope:
localStorage.calendar.readonlytocalendar.eventsvia incremental GIS consent.finalizePollsucceeds; calendar failure never rolls back the schedule.Out of scope (deferred):
googleEventId).Files to change
client/src/lib/googleCalendar.jsrequestGoogleAccess, addlistWritableCalendarsandinsertEvent.client/src/components/SchedulingGrid.jsxclient/src/pages/PollView.jsxlocalStorage; insert event after finalize; render success link / retry-able error.No server changes. No lexicon changes. No new dependencies.
Definition of done
avails.zhgnv.com).Follow-up after v1
When/if persisting
googleEventIdandgoogleCalendarIdon the poll lexicon becomes worth doing, revisit:handleUnschedule.