[PR #5587] [MERGED] fix: reminder race condition #6902

Closed
opened 2026-03-23 23:17:11 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/5587
Author: @Xazin
Created: 6/20/2024
Status: Merged
Merged: 6/20/2024
Merged by: @Xazin

Base: mainHead: fix/reminder-bug


📝 Commits (1)

  • 412041f fix: reminder race condition

📊 Changes

3 files changed (+13 additions, -8 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart (+6 -1)
📝 frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart (+3 -6)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart (+4 -1)

📄 Description

Closes: #5332

I wasn't able to figure out the concluding reason why, but due to the ReminderBloc acting as a Singleton (basically as a cached service for Reminders throughout our application), on application startup the Startup event would be triggered, but due to eg. window resizing/rendering or similar, it would not be able to finish and thus the reminders in state would not be properly initialized.

I've moved the Started event respectively to Mobile and Desktop first points of contact (their home screens). This is a fix for the immediate problem.

The long-term solution is finding a way to return the Reminder itself along with the DateCell, so that it does not rely on other lazy operations or futures.

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/5587 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 6/20/2024 **Merged by:** [@Xazin](https://github.com/Xazin) **Base:** `main` ← **Head:** `fix/reminder-bug` --- ### 📝 Commits (1) - [`412041f`](https://github.com/AppFlowy-IO/AppFlowy/commit/412041f7fbd47cf5821d83051a3cd6c2c6dcafc6) fix: reminder race condition ### 📊 Changes **3 files changed** (+13 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart` (+6 -1) 📝 `frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart` (+3 -6) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart` (+4 -1) </details> ### 📄 Description Closes: #5332 I wasn't able to figure out the concluding reason why, but due to the ReminderBloc acting as a Singleton (basically as a cached service for Reminders throughout our application), on application startup the Startup event would be triggered, but due to eg. window resizing/rendering or similar, it would not be able to finish and thus the reminders in state would not be properly initialized. I've moved the Started event respectively to Mobile and Desktop first points of contact (their home screens). This is a fix for the immediate problem. The long-term solution is finding a way to return the Reminder itself along with the DateCell, so that it does not rely on other lazy operations or futures. #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:17:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#6902
No description provided.