You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: offer the way back to the month from a day opened in the month grid #125 - #134
#125: tapping a day in the month grid opened the day view with no way back to the month other than the drawer's view list, and Android's back left the Calendar tab altogether. The webmail on a phone (what the reporter saw in the iOS PWA) remembers that the day came from Month and puts a "back to month" arrow in the menu button's place (mobileReturnToMonth in calendar-app.tsx). This does the same in the app.
Changes
CalendarScreen.tsx:openDay notes whether it was called from the month view (returnToMonth). While that is set and the day view is shown, the header shows an arrow labelled "Back to month" (the existing calendar.back_to_month string, already in every locale) instead of the menu button, and Android's back does the same through useBackWhileFocused. Changing view any other way (the drawer, a calendar link) clears it, so a day opened from the drawer or from a week day header keeps the menu as before.
calendar-back-to-month-wiring.test.ts: checks that wiring.
My code follows the project's code style and conventions
I have run npm run typecheck and there are no errors (native has no lint script)
The build passes (no npm run build in native; an x86_64 release APK, assembleGithubRelease -PallowDebugSignedRelease=true, builds and runs)
I have tested my changes locally
I have added or updated documentation if needed (none needed)
I have updated translations (locales/) if my changes affect user-facing text (no new text: calendar.back_to_month exists in every locale; npm run i18n:check passes)
I have included screenshots or a screen recording for UI changes
Tests:npx vitest run: 7106 passed, 163 skipped (the live Stalwart suites), 0 failed.
Tested by hand on the Android 16 emulator (1080x2424, 420 dpi), upstream b3b4230 against this branch, reading the screen's view hierarchy after each step:
Step
Before
After
Month, tap a day
day view, menu button
day view, "Back to month" arrow in its place
Tap the arrow
month view, menu button back
Month, tap a day, Android back
leaves the Calendar tab (to Mail)
month view
Month, tap a day, then "Go to today"
arrow stays; it returns to the month of today
Drawer > Day, then Android back
menu button; back leaves the tab
the same
Week, tap a day header
day view, menu button
the same
Not tested: iOS (the change is in the shared screen; the only platform-specific part is Android's back), a tablet.
Screenshots / demo
Day opened from the month, before
after
Notes for reviewers
The drawer is out of reach while the arrow shows, as on the webmail's phone layout, where the arrow also takes the menu's place. Going back to the month brings the menu back.
The arrow returns to the month of the day on screen, so after swiping a few days on, the month shown is the one those days are in. The webmail does the same.
I didn't find any problems. The test check passed on this commit (run).
I looked at every place on main that changes the view: changeViewMode, the date-link branch of applyDateLink, and openDay are the only callers of setViewMode (L521-L562, L620-L626). This PR sets or clears returnToMonth in each of them, and showBackToMonth also requires viewMode === 'day'.
Your manual test table doesn't say whether the free-scroll month was covered. That view (MonthScrollView) and the paged MonthView both call openDay (L1134-L1170), which sets returnToMonth whenever the view is month, so both paths go through the same code.
Bulwark Warden is an AI assistant and can be wrong. It answers from the docs, the code and earlier issues, and links its sources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#125: tapping a day in the month grid opened the day view with no way back to the month other than the drawer's view list, and Android's back left the Calendar tab altogether. The webmail on a phone (what the reporter saw in the iOS PWA) remembers that the day came from Month and puts a "back to month" arrow in the menu button's place (
mobileReturnToMonthincalendar-app.tsx). This does the same in the app.Changes
CalendarScreen.tsx:openDaynotes whether it was called from the month view (returnToMonth). While that is set and the day view is shown, the header shows an arrow labelled "Back to month" (the existingcalendar.back_to_monthstring, already in every locale) instead of the menu button, and Android's back does the same throughuseBackWhileFocused. Changing view any other way (the drawer, a calendar link) clears it, so a day opened from the drawer or from a week day header keeps the menu as before.calendar-back-to-month-wiring.test.ts: checks that wiring.Related issues
Closes #125
Type of change
Checklist
npm run typecheckand there are no errors (native has nolintscript)npm run buildin native; an x86_64 release APK,assembleGithubRelease -PallowDebugSignedRelease=true, builds and runs)locales/) if my changes affect user-facing text (no new text:calendar.back_to_monthexists in every locale;npm run i18n:checkpasses)Tests:
npx vitest run: 7106 passed, 163 skipped (the live Stalwart suites), 0 failed.Tested by hand on the Android 16 emulator (1080x2424, 420 dpi), upstream b3b4230 against this branch, reading the screen's view hierarchy after each step:
Not tested: iOS (the change is in the shared screen; the only platform-specific part is Android's back), a tablet.
Screenshots / demo
Notes for reviewers
🤖 Generated with Claude Code