refactor(db-repository): extract folder details operations to FolderDetailsRepository - #11478
Merged
Merged
Conversation
rafaeltonholo
temporarily deployed
to
botmobile
September 1, 2026 16:07 — with
GitHub Actions
Inactive
rafaeltonholo
temporarily deployed
to
botmobile
September 1, 2026 16:07 — with
GitHub Actions
Inactive
Contributor
|
✅ Validation Passed: All report and feature-flag labels are correctly set. |
rafaeltonholo
temporarily deployed
to
botmobile
September 1, 2026 16:09 — with
GitHub Actions
Inactive
rafaeltonholo
force-pushed
the
chore/11470/split-folder-repository
branch
from
September 2, 2026 10:50
377d788 to
b0b642b
Compare
wmontwe
reviewed
Sep 2, 2026
wmontwe
requested changes
Sep 3, 2026
| verify(messageStore, never()).setPushEnabled(any(), any()) | ||
| assertThat(result).isEqualTo(Outcome.success(Unit)) | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Suggested change
| @Test | |
| fun `partial update should update unified inbox inclusion when provided`() = runTest { | |
| // Arrange | |
| val partialUpdate = PartialUpdatableFolderDetails( | |
| folderId = REGULAR_FOLDER_ID, | |
| includeInUnifiedInbox = true, | |
| ) | |
| // Act | |
| val result = testSubject.update(accountId, partialUpdate) | |
| // Assert | |
| verify(messageStore).setIncludeInUnifiedInbox(REGULAR_FOLDER_ID, true) | |
| assertThat(result).isEqualTo(Outcome.success(Unit)) | |
| } | |
Comment on lines
+36
to
+37
| val includeInUnifiedInbox: Boolean? = null, | ||
| val integrate: Boolean? = null, |
Member
There was a problem hiding this comment.
I think these properties represent the same setting. In the database, the integrate column determines whether a folder is included in the unified folder. Elsewhere, the legacy name includeInUnifiedInbox is used. Since “Unified Folders” is the current terminology, includeInUnifiedFolder would be clearer and should be the only property in the partial-update model. The rename is nice to have.
Suggested change
| val includeInUnifiedInbox: Boolean? = null, | |
| val integrate: Boolean? = null, | |
| val includeInUnifiedFolder: Boolean? = null, |
Member
Author
There was a problem hiding this comment.
Got it. I will drop the integrate property, then.
- Add DefaultFolderPushTrackingRepository with observeEnabled, isEnabled, and disable methods - Add FolderPushTrackingRepository interface to folder API - Add FolderError sealed interface with AccountNotFound, NotFound, and Unavailable cases
…pository - Replace FolderRepository push methods with FolderPushTrackingRepository delegation - Update PushController to use new repository methods (disable, isEnabled, observeEnabled) - Make AccountBackendPusherCallback.onPushNotSupported suspend function - Add AggregateRepositories to compose FolderRepository dependencies
…lsRepository - Add FolderDetailsRepository interface with findById and update methods - Add DefaultFolderDetailsRepository implementation - Remove folder details methods from FolderRepository interface - Update FolderSettingsViewModel and FolderSettingsDataStore to use FolderDetailsRepository - Update DefaultSpecialFolderUpdater to use partial updates via new repository - Add PartialUpdatableFolderDetails for granular folder property updates - Add FailedPrecondition error case to FolderError
- Add HasPii annotation to mark classes containing sensitive user data - Add Ignore annotation to exclude properties from logging - Add Mask annotation to redact sensitive values in log output
- Annotate Folder and FolderDetails with @LoggingPii.HasPii - Annotate Folder.name with @LoggingPii.Mask - Add toStringPiiSafe() extension functions for safe logging - Update DefaultFolderDetailsRepository to use PII-safe logging - Reformat multi-line log messages for consistency
…alUpdatableFolderDetails The `integrate` property was redundant with `includeInUnifiedInbox` and has been replaced throughout the codebase.
rafaeltonholo
force-pushed
the
chore/11470/split-folder-repository
branch
from
September 3, 2026 14:16
b0b642b to
8101bf8
Compare
wmontwe
self-requested a review
September 4, 2026 09:12
rafaeltonholo
temporarily deployed
to
botmobile
September 4, 2026 10:49 — with
GitHub Actions
Inactive
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contribution Summary
Linked Issue/Ticket: Part of #11470
Description
AI Disclosure
Select one of the following (mandatory)
Contribution Checklist
gradlew spotlessCheckto check andgradlew spotlessApplyto format your source code; will be checked by CI).gradlew testDebugUnitTest; will be checked by CI).Stack created with GitHub Stacks CLI • Give Feedback 💬