chore(service-pagination): fix bug about queryTag with pagination#5865
Merged
seungyeoneeee merged 4 commits intomasterfrom May 21, 2025
Merged
chore(service-pagination): fix bug about queryTag with pagination#5865seungyeoneeee merged 4 commits intomasterfrom
seungyeoneeee merged 4 commits intomasterfrom
Conversation
Signed-off-by: seungyeoneeee <sylee1274@mz.co.kr>
Signed-off-by: seungyeoneeee <sylee1274@mz.co.kr>
Signed-off-by: 이승연 <sylee1274@mz.co.kr>
Contributor
|
✅ There are no commits in this PR that require review. |
Contributor
|
🎉 @skdud4659 and @WANZARGEN have been randomly selected as the reviewers! Please review. 🙏 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 4 Skipped Deployments
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug related to query tag handling with pagination within the Alert Manager service module.
- Introduces a new state property (searchFilters) and corresponding setter in the service-list-page-store.
- Refactors query tag and pagination logic in ServiceList.vue, including updating how query parameters are processed and pages reset.
- Updates the state access in ServiceDetailHeader.vue for consistency when navigating back.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/web/src/services/alert-manager/v2/stores/service-list-page-store.ts | Added searchFilters state and a new setter function to store query filters for pagination. |
| apps/web/src/services/alert-manager/v2/components/ServiceList.vue | Refactored query tag handling, pagination reset, and filter splitting logic, and removed the legacy query-tags helper. |
| apps/web/src/services/alert-manager/v2/components/ServiceDetailHeader.vue | Adjusted page number state access to use the store’s $state for consistency. |
Comments suppressed due to low confidence (3)
apps/web/src/services/alert-manager/v2/components/ServiceList.vue:218
- [nitpick] The logic for splitting 'name' filters is duplicated across the onMounted hook and the watch effect; consider refactoring it into a helper function to improve maintainability.
const splitNameFilters = searchQueryHelper.filters.map((f) => { ...
apps/web/src/services/alert-manager/v2/components/ServiceDetailHeader.vue:80
- Ensure consistent access to the store state by using 'serviceListPageStore.$state' uniformly across the validations for page numbers.
const validUnhealthyPage = (!Number.isNaN(serviceListPageStore.$state.unhealthyThisPage) && serviceListPageStore.unhealthyThisPage > 0) ? serviceListPageStore.$state.unhealthyThisPage : 1;
apps/web/src/services/alert-manager/v2/components/ServiceList.vue:64
- Avoid side effects in computed properties; verify that 'searchQueryHelper.setFilters' is a pure function when called within the computed property.
const queryTags = computed(() => searchQueryHelper.setFilters(serviceListPageStore.searchFilters).queryTags);
apps/web/src/services/alert-manager/v2/stores/service-list-page-store.ts
Show resolved
Hide resolved
skdud4659
approved these changes
May 21, 2025
apps/web/src/services/alert-manager/v2/stores/service-list-page-store.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: 이승연 <sylee1274@mz.co.kr>
Contributor
|
✅ There are no commits in this PR that require review. |
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.
Skip Review (optional)
style,chore,ci,test,docs)Description (optional)
Things to Talk About (optional)