Skip to content

Conversation

@PhilBastian
Copy link
Contributor

@PhilBastian PhilBastian commented Nov 18, 2025

part of #1905, extending #2675 to remove direct SC calls from views

@PhilBastian PhilBastian self-assigned this Nov 18, 2025
johnsimons

This comment was marked as resolved.

@PhilBastian
Copy link
Contributor Author

it is quite unclear why we need to abort ongoing api calls, we didn't need it before?

we used to have 3 views with almost identical functionality, except the API call was made with different parameters. The aborting of calls is so that the logic can be shared in a single store, but if the user switches to another view utilising the same store while an API call is in process, the return of the API call doesn't result in the list data being set to the wrong list

Base automatically changed from deletedmessagegroups_store to monitoring_store November 27, 2025 00:23
# Conflicts:
#	src/Frontend/src/components/audit/AuditList.vue
#	src/Frontend/src/components/failedmessages/DeletedMessageGroups.vue
#	src/Frontend/src/composables/autoRefresh.ts
#	src/Frontend/src/stores/DeletedMessageGroupsStore.ts
# Conflicts:
#	src/Frontend/src/components/failedmessages/DeletedMessages.vue
const { count: requiresFullFailureDetailsSubscriberCount, inc, dec } = useCounter(0);
function requiresFullFailureDetails() {
onMounted(() => inc());
onMounted(() => inc()); //NOTE: not forcing a refresh here since we expect the view utilising this store to also setup a refresh on mount
Copy link
Member

Choose a reason for hiding this comment

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

There is something that does not line up with this store. To me, it feels like we actually should have two different stores.
And adding this comment makes it more obvious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a separate store for setting 2 extra refs? I don't think that passes the sensible test. I'd be more persuaded to remove this property and just allow the extra API calls to always be made, regardless of whether they're needed or not.

Copy link
Member

Choose a reason for hiding this comment

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

I have had a better look at ConnectionsAndStatsStore, and it seems to have a mix of concerns.
I understand the need for this store, given that we need to display message stats at the top nav, but the archivedMessageCount and pendingRetriesMessageCount do not seem to belong here. To me, these belong in the FailedMessagesStore.
If we refactor these out of here and into the FailedMessagesStore, we no longer need to have this extra complexity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I'll spike it on another branch

Copy link
Member

@johnsimons johnsimons left a comment

Choose a reason for hiding this comment

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

Nice PR

const { count: requiresFullFailureDetailsSubscriberCount, inc, dec } = useCounter(0);
function requiresFullFailureDetails() {
onMounted(() => inc());
onMounted(() => inc()); //NOTE: not forcing a refresh here since we expect the view utilising this store to also setup a refresh on mount
Copy link
Member

Choose a reason for hiding this comment

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

I have had a better look at ConnectionsAndStatsStore, and it seems to have a mix of concerns.
I understand the need for this store, given that we need to display message stats at the top nav, but the archivedMessageCount and pendingRetriesMessageCount do not seem to belong here. To me, these belong in the FailedMessagesStore.
If we refactor these out of here and into the FailedMessagesStore, we no longer need to have this extra complexity.

@PhilBastian PhilBastian merged commit 1309625 into monitoring_store Nov 28, 2025
5 checks passed
@PhilBastian PhilBastian deleted the messages_store branch November 28, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants