Fix all messages / audit view not loading data when selected#2885
Open
ramonsmits wants to merge 1 commit intomasterfrom
Open
Fix all messages / audit view not loading data when selected#2885ramonsmits wants to merge 1 commit intomasterfrom
ramonsmits wants to merge 1 commit intomasterfrom
Conversation
The auto-refresh composable was mutating the store's refresh method via Object.assign, replacing it with checkForSuccessfulMessages. This broke AuditList's full fetch since it also called store.refresh(). Add a customRefresh parameter to useStoreAutoRefresh so the lightweight checkForSuccessfulMessages can be used for polling without mutating the store.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the “All Messages / Audit view not loading until full page reload” behavior by preventing the auto-refresh composable from mutating the Pinia store’s refresh() method (which had unintended global side effects).
Changes:
- Extend
useStoreAutoRefreshwith an optionalcustomRefresh(store)callback used only for polling. - Update audit polling to call
checkForSuccessfulMessages()viacustomRefreshrather than overridingstore.refresh().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Frontend/src/composables/useAutoRefresh.ts |
Adds optional customRefresh hook so auto-refresh can poll lightweight checks without modifying store methods. |
src/Frontend/src/composables/useAuditStoreAutoRefresh.ts |
Switches audit polling to customRefresh to avoid breaking AuditStore.refresh() consumers (e.g., AuditList). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
This seems to fix something else but MIGHt sufficient for the issue that I'm experiencing: |
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.
ALWAYS when I open all messages view nothing happens. Switching do a different tab and back still no data until I do a full page reload.
Note
This is a suggestion by Claude so this really needs to be reviewed by someone that understands this. I don't really have an understanding how the refresh is designed.
Background info
The auto-refresh composable was mutating the store's refresh method via Object.assign, replacing it with checkForSuccessfulMessages. This broke AuditList's full fetch since it also called store.refresh().
Add a customRefresh parameter to useStoreAutoRefresh so the lightweight checkForSuccessfulMessages can be used for polling without mutating the store.
Reviewer Checklist