feat(widget): header navigation + fix R8-broken month arrows (#18, #20) #53

Merged
makiolaj merged 4 commits from feat/widget-header-navigation into release/v2.13.0 2026-07-01 10:58:07 +00:00
Owner

Tackles Codeberg #18 and #20 together (both are 2.13.0-milestone widget issues).

#18 — Month widget arrows broken + navigation gaps

  • Fix the broken arrows (regression). The month/agenda widgets' run-callback
    controls (prev/next/today, refresh) go through Glance actionRunCallback<T>(),
    which resolves the callback class reflectively at tap time. R8 full mode
    (AGP 9 default) renamed those classes on release builds, so the taps silently
    did nothing — while actionStartActivity taps (day/event) kept working because
    they need no reflection. Added a proguard keep for ActionCallback impls;
    verified in the release mapping that ShiftMonthAction/ResetMonthAction/
    RefreshAgendaAction retain their original names.
  • Month/year title → opens the Month view. The "today" button now snaps the
    grid back to the current month in place (the reset that used to sit on the
    title).
  • Tap anywhere on a day → opens that day, not just the small date number
    (blank lane area + "+N" overflow are now tap targets too). Event bars still
    open their own detail.

#20 — Agenda "Upcoming" header → opens the default view

So a user whose home view is Week/Month reaches it in one tap instead of drilling
through a day or event.

Both header taps ride a shared WidgetNavRequest.OpenView(view?) (null → the
default home) via MainActivity.openViewIntent + CalendarHost.

Verification

  • :app:assembleRelease (full R8) + :app:assembleReleaseTest build clean.
  • On-device verified on a Pixel (releaseTest, R8-minified — the build that
    surfaces the R8 regression a debug build hides).
  • CHANGELOG updated under [Unreleased] for #18 and #20.

Closes #18, closes #20.

Tackles Codeberg #18 and #20 together (both are 2.13.0-milestone widget issues). ### #18 — Month widget arrows broken + navigation gaps - **Fix the broken arrows (regression).** The month/agenda widgets' run-callback controls (prev/next/today, refresh) go through Glance `actionRunCallback<T>()`, which resolves the callback class *reflectively* at tap time. R8 full mode (AGP 9 default) renamed those classes on release builds, so the taps silently did nothing — while `actionStartActivity` taps (day/event) kept working because they need no reflection. Added a proguard keep for `ActionCallback` impls; verified in the release mapping that `ShiftMonthAction`/`ResetMonthAction`/ `RefreshAgendaAction` retain their original names. - **Month/year title → opens the Month view.** The "today" button now snaps the grid back to the current month in place (the reset that used to sit on the title). - **Tap anywhere on a day → opens that day**, not just the small date number (blank lane area + "+N" overflow are now tap targets too). Event bars still open their own detail. ### #20 — Agenda "Upcoming" header → opens the default view So a user whose home view is Week/Month reaches it in one tap instead of drilling through a day or event. Both header taps ride a shared `WidgetNavRequest.OpenView(view?)` (null → the default home) via `MainActivity.openViewIntent` + `CalendarHost`. ### Verification - `:app:assembleRelease` (full R8) + `:app:assembleReleaseTest` build clean. - **On-device verified** on a Pixel (releaseTest, R8-minified — the build that surfaces the R8 regression a debug build hides). - CHANGELOG updated under [Unreleased] for #18 and #20. Closes #18, closes #20.
makiolaj added 4 commits 2026-07-01 10:38:22 +00:00
The month widget's prev/next/today controls and the agenda widget's
refresh run through Glance `actionRunCallback<T>()`, which persists the
callback's class name into the click PendingIntent and instantiates it
reflectively when tapped. Under R8 full mode (AGP 9 default) those
callback classes — only ever referenced reflectively — were renamed and
lost their no-arg constructor, so the lookup failed silently and the
arrows did nothing on release builds (while actionStartActivity taps,
which need no reflection, kept working).

Keep every ActionCallback's name and constructor. Verified against the
release mapping: ShiftMonthAction/ResetMonthAction/RefreshAgendaAction
now retain their original fully-qualified names.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tapping a widget header now opens the app on a sensible top-level view,
via a shared WidgetNavRequest.OpenView(view?) — a concrete view roots
there over the default home, a null view resolves to the default home:

- Month widget: the month/year title opens the month view (#18). Its
  "today" button now snaps the grid back to the current month in place
  (the reset that used to sit on the title), so paging + jump-to-today
  are both reachable and the title is free to open the app.
- Agenda widget: the "Upcoming" title opens the default view (#20), so
  users whose home view is Week/Month can reach it in one tap instead of
  drilling through a day or event.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Previously only the small day-number was a tap target, so tapping the
blank area of a day cell (or its "+N" overflow) did nothing. Make every
non-event part of a day column open that day — the day number, the empty
lane cells, and the overflow row — via a shared openDayAction, so a tap
anywhere on a day opens it, matching the in-app month grid. Event bars
keep opting out to open their own detail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(changelog): note month-widget day tap opens that day (#18)
All checks were successful
CI / ci (pull_request) Successful in 9m29s
e5aa90bdd6
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit 4c26450ad4 into release/v2.13.0 2026-07-01 10:58:07 +00:00
makiolaj deleted branch feat/widget-header-navigation 2026-07-01 10:58:07 +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#53