Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-17912] Sync vault when saving an item #13212

Closed
wants to merge 1 commit into from

Conversation

jake-herrmann
Copy link

@jake-herrmann jake-herrmann commented Feb 2, 2025

🎟️ Tracking

#12022

πŸ“” Objective

This syncs the vault after an item is saved, as a workaround for the bug where saved items do not show the changes that were made until some action is taken to "refresh" the view of the item.

This is almost certainly the wrong way to fix the bug, but I wanted to demonstrate a workaround to get more visibility on this issue and prompt further discussion on what the real solution might be.

I copied the await this.syncService.fullSync(true, true) line from apps/desktop/src/app/app.component.ts#L355, and did not preserve the try/catch behavior. Also note that if you scroll up in that file you'll see a DEPRECATED comment that warns Please do not use the AppComponent to send events between services, so even if syncing on item save is the correct solution for this bug, I'm probably doing it the wrong way.

Also note that with this workaround, there is still a delay after saving the item in which the old state is displayed before the vault finishes syncing, at which point the item changes to show the new state.

@jake-herrmann jake-herrmann requested a review from a team as a code owner February 2, 2025 20:34
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-17912
Link: https://bitwarden.atlassian.net/browse/PM-17912

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title Sync vault when saving an item [PM-17912] Sync vault when saving an item Feb 3, 2025
@jake-herrmann
Copy link
Author

I didn't realize that this bug was already being worked on at #13186, so if that's the better solution then feel free to close this PR. I was just trying to get the ball rolling on this issue.

@jake-herrmann
Copy link
Author

I also suspect that re-syncing after item save just masks the real problem, because item changes should immediately display regardless of whether the vault syncs. So I'm closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desktop client shows old state after saving changes
4 participants