fix(edit): default reminder for ACTION_INSERT events + import prompt (Codeberg #49) #71

Merged
makiolaj merged 2 commits from fix/insert-intent-default-reminder into release/v2.14.1 2026-07-12 10:03:36 +00:00
Owner

Fixes Codeberg issue #49 — events created from an external ACTION_INSERT intent (Google Maps' "add to calendar", the Todo Agenda widget) opened the new-event form with no reminder, ignoring the configured default.

Root cause: the insert-prefill path shares openImported() with the single-event .ics import path, which froze reminders as touched (_remindersTouched = true) so a file's own VALARMs are respected. An insert intent carries no reminders, so the empty freeze just suppressed the settings default.

Fix (two commits, per the two paths):

  • ACTION_INSERT intents apply the settings default automatically, exactly like an in-app new event (openNew()).
  • .ics file imports keep respecting the file's reminders, but instead of silently deciding, raise a one-time prompt: This event was imported with N reminder(s) — apply your default? Accepting swaps in the default; declining keeps the file's. Skipped when there's no real choice (no default configured, or the file already carries exactly it).

openImported() now takes an ImportSource; CalendarHost tags the overlay Insert vs File. The prompt is a plain two-choice AlertDialog, per the app's dialog conventions.

CI-green locally (test + lint + assembleDebug, translation check clean). UI change — on-device review owed before release (dialog copy + import-prompt behaviour).

🤖 Generated with Claude Code

Fixes Codeberg issue #49 — events created from an external `ACTION_INSERT` intent (Google Maps' "add to calendar", the Todo Agenda widget) opened the new-event form with no reminder, ignoring the configured default. **Root cause:** the insert-prefill path shares `openImported()` with the single-event `.ics` import path, which froze reminders as touched (`_remindersTouched = true`) so a file's own VALARMs are respected. An insert intent carries no reminders, so the empty freeze just suppressed the settings default. **Fix (two commits, per the two paths):** - **ACTION_INSERT intents** apply the settings default automatically, exactly like an in-app new event (`openNew()`). - **`.ics` file imports** keep respecting the file's reminders, but instead of silently deciding, raise a one-time prompt: *This event was imported with N reminder(s) — apply your default?* Accepting swaps in the default; declining keeps the file's. Skipped when there's no real choice (no default configured, or the file already carries exactly it). `openImported()` now takes an `ImportSource`; `CalendarHost` tags the overlay Insert vs File. The prompt is a plain two-choice `AlertDialog`, per the app's dialog conventions. CI-green locally (`test` + `lint` + `assembleDebug`, translation check clean). **UI change — on-device review owed** before release (dialog copy + import-prompt behaviour). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
makiolaj added 2 commits 2026-07-12 09:58:39 +00:00
External ACTION_INSERT launches (e.g. Google Maps' "add to calendar",
the Todo Agenda widget) share the single-event .ics prefill channel:
CalendarHost routes requestedInsertForm as importForm, so EventEditScreen
calls openImported(), which froze reminders as touched to respect a file's
own VALARMs. But an insert intent carries no reminders, so the empty freeze
just suppressed the configured settings default — the event opened (and
saved) with no reminder.

Make the freeze follow the source, not the path: a form that carries its
own reminders (an .ics with VALARMs) still freezes them; a form with none
(every insert intent, and an .ics without VALARMs) falls back to the
settings default via applyDefaultReminder(), exactly like openNew(). An
intent that did carry reminders still wins.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(edit): offer default reminder on .ics import instead of auto-applying (#49)
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 5m21s
6aacdd9111
Split the two prefill paths that share openImported(): an ACTION_INSERT
intent still auto-applies the settings default (it carries no reminder
semantics), but a .ics file — which owns its reminders — no longer silently
decides. It keeps the file's reminders and raises a one-time prompt
("This event was imported with N reminder(s) — apply your default?") so the
user chooses. The prompt is skipped when there's no real choice: no default
configured, or the file already carries exactly it.

openImported() now takes an ImportSource; CalendarHost tags the overlay
Insert vs File. Accepting swaps in the default and reveals the section;
declining (or dismissing) keeps the file's own reminders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit 974185f354 into release/v2.14.1 2026-07-12 10:03:36 +00:00
makiolaj deleted branch fix/insert-intent-default-reminder 2026-07-12 10:03:36 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#71