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

refactor(web): websocket events #7152

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

michelheusschen
Copy link
Contributor

Refactors the Websocket functionality by implementing a new event bus for real-time communication. The current implementation relies on stores for this purpose, but I don't think they're the right tool for the job. While stores are suitable for scenarios where a value needs to persist in memory and be updated, they are not the best choice for real-time events.

The on_upload_success event has been re-enabled to show uploaded assets without refreshing the page. Previously, this event was commented out but the reason for that isn't clear. Additionally, several small bugs are fixed related to using stores, including issues with unsubscribing and multiple updates not working as expected.

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome back!

@jrasm91 jrasm91 merged commit c84c0ba into immich-app:main Feb 16, 2024
24 of 25 checks passed
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.

3 participants