From c4066f78d83b1440155248f9bc724b905aa88697 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 13 Jul 2026 17:52:10 +0000 Subject: feat(widget): tap event to open its source directly, drop detail popup Tapping a calendar event (or any event-type item) now opens the event's URL (Google Calendar, Plan to Eat, etc.) directly instead of showing an intermediate popup with an "Open in Calendar" button. Removes EventDetailActivity and the recurrence-schedule lookup it was the only consumer of: WidgetRepository.getRecurrence, the Go /api/widget/recurrence endpoint, HandleWidgetRecurrence, GoogleCalendarAPI.GetRecurrenceRule, and formatRecurrence, plus their tests. RecurringEventID itself stays -- it's general calendar-sync metadata used elsewhere in the timeline pipeline, not exclusive to the removed popup. --- internal/handlers/widget.go | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'internal/handlers/widget.go') diff --git a/internal/handlers/widget.go b/internal/handlers/widget.go index f1f7452..0092b6b 100644 --- a/internal/handlers/widget.go +++ b/internal/handlers/widget.go @@ -359,28 +359,6 @@ func (h *Handler) HandleWidgetComplete(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } -// HandleWidgetRecurrence looks up and formats a recurring calendar event's schedule. -func (h *Handler) HandleWidgetRecurrence(w http.ResponseWriter, r *http.Request) { - recurringEventID := r.URL.Query().Get("recurring_event_id") - if recurringEventID == "" { - http.Error(w, "recurring_event_id is required", http.StatusBadRequest) - return - } - - recurrence, err := h.googleCalendarClient.GetRecurrenceRule(r.Context(), recurringEventID) - if err != nil { - http.Error(w, "recurring event not found", http.StatusNotFound) - return - } - - resp := struct { - Recurrence string `json:"recurrence"` - }{Recurrence: recurrence} - - w.Header().Set("Content-Type", "application/json") - _ = json.NewEncoder(w).Encode(resp) -} - // HandleWidgetAdd creates a new undated native task from the widget's quick-add sheet. func (h *Handler) HandleWidgetAdd(w http.ResponseWriter, r *http.Request) { var req widgetAddRequest -- cgit v1.2.3