diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-13 17:52:10 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 02:42:31 +0000 |
| commit | c4066f78d83b1440155248f9bc724b905aa88697 (patch) | |
| tree | 70b557a1e340f12aa125fd0c53effabcbda4027b /internal/handlers/widget.go | |
| parent | fb41a5eb47a4213c3f9a7095da4b8741f1598725 (diff) | |
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.
Diffstat (limited to 'internal/handlers/widget.go')
| -rw-r--r-- | internal/handlers/widget.go | 22 |
1 files changed, 0 insertions, 22 deletions
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 |
