[PM-41957] fix: Show New folder created toast on all folder creation paths - #2991
[PM-41957] fix: Show New folder created toast on all folder creation paths#2991andrebispo5 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2991 +/- ##
==========================================
- Coverage 79.53% 79.52% -0.01%
==========================================
Files 1169 1169
Lines 75095 75112 +17
==========================================
+ Hits 59724 59733 +9
- Misses 15371 15379 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the four commits that make the "New folder created." toast appear on all three folder-creation paths. The Code Review DetailsNo findings. |
There was a problem hiding this comment.
Pull request overview
This PR fixes inconsistent user feedback when creating folders by ensuring the “New folder created.” toast appears across all folder-creation entry points (settings, item editor folder picker, and vault list), and by preventing vault refresh flows from clearing unrelated toasts prematurely.
Changes:
- Show the folder-created toast when a folder is added via the item editor’s folder picker.
- Wire the vault list into the add-folder flow as an
AddEditFolderDelegateso it can display the folder-created toast. - Prevent vault refresh/stream updates from dismissing unrelated toasts by only dismissing the specific slow-loading toast.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddEditItemProcessorTests.swift | Expands folderAdded(_:) test coverage to assert the folder-created toast is shown. |
| BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddEditItemProcessor.swift | Sets the folder-created toast when a new folder is added from the item editor flow. |
| BitwardenShared/UI/Vault/Vault/VaultList/VaultListProcessorTests.swift | Adds tests for vault list folder delegate behavior and for preserving unrelated toasts across refresh/stream updates. |
| BitwardenShared/UI/Vault/Vault/VaultList/VaultListProcessor.swift | Passes self as add-folder delegate, adds slow-loading toast dismissal scoping, and implements AddEditFolderDelegate to show folder-created toast. |
| BitwardenShared/UI/Vault/Vault/VaultCoordinatorTests.swift | Verifies delegate propagation behavior when navigating to add-folder with/without context. |
| BitwardenShared/UI/Vault/Vault/VaultCoordinator.swift | Passes an optional AddEditFolderDelegate through to the add/edit folder coordinator. |
| BitwardenShared/UI/Platform/Settings/Settings/Vault/Folders/AddEditFolder/AddEditFolder/AddEditFolderProcessor.swift | Fixes swapped doc comments for folderDeleted() / folderEdited() in the delegate protocol. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| extension VaultListProcessor: AddEditFolderDelegate { | ||
| func folderAdded(_: FolderView) { | ||
| state.toast = Toast(title: Localizations.folderCreated) |
There was a problem hiding this comment.
🤔 One thing I noticed is that if this toast is displayed while the "This is taking longer than expected" toast is visible, the "New folder created" toast is never dismissed.
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-08-26.at.10.06.10.mov
This might be an existing bug introduced by this: https://github.com/bitwarden/ios/pull/2827/changes#diff-68b12b1d47e8d01df3d910e70d76c1ba459cafe2c142501b36a2febad412be45. Any idea if we can fix this, revert that change, or switch the task to onChange(of:)?
There was a problem hiding this comment.
Good catch, thanks. The root cause was in ToastView rather than here:
- The
.taskrunning the dismiss timer had noid, and.id(toast.id)sits further in on theVStack, so swappingstate.toastfor a different toast never restarted it. - The task that did run started while the manual dismiss toast was up, hit the
guard mode == .automaticDismissand returned, so the "New folder created" toast ended up with no timer at all. - Changed it to
.task(id: toast.id)in 87458dd. That also fixes a second case where one automatic toast replacing another inherited the first's leftover time and could disappear almost immediately.
Verified in the simulator with both toasts in sequence.
There was a problem hiding this comment.
Screen.Recording.2026-08-27.at.12.18.37.mov
87458dd to
d6afc9d
Compare
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-41957
📔 Objective
Creating a folder only told you it worked in one of the three places you can do it.
folderDeleted/folderEditeddoc comments on the delegate protocol while I was in there.📸 Screenshots
Screen.Recording.2026-08-25.at.13.17.35.mov