Skip to content

Conversation

@seungyeoneeee
Copy link
Contributor

Skip Review (optional)

  • Minor changes that don't affect the functionality (e.g. style, chore, ci, test, docs)
  • Previously reviewed in feature branch, further review is not mandatory
  • Self-merge allowed for solo developers or urgent changes

Description (optional)

Things to Talk About (optional)

Signed-off-by: seungyeoneeee <sylee1274@mz.co.kr>
Signed-off-by: seungyeoneeee <sylee1274@mz.co.kr>
Signed-off-by: 이승연 <sylee1274@mz.co.kr>
@github-actions
Copy link
Contributor

✅ There are no commits in this PR that require review.

@github-actions
Copy link
Contributor

🎉 @skdud4659 and @WANZARGEN have been randomly selected as the reviewers! Please review. 🙏

@github-actions github-actions bot requested review from WANZARGEN and skdud4659 May 21, 2025 01:42
@vercel
Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
console ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 4:14am
dashboard ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 4:14am
feature-integration-project-detail ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 4:14am
web-storybook ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 4:14am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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);

@seungyeoneeee seungyeoneeee removed the request for review from WANZARGEN May 21, 2025 01:42
Copy link
Member

@skdud4659 skdud4659 left a comment

Choose a reason for hiding this comment

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

LGTM~

Signed-off-by: 이승연 <sylee1274@mz.co.kr>
@github-actions
Copy link
Contributor

✅ There are no commits in this PR that require review.

@seungyeoneeee seungyeoneeee merged commit 1298994 into master May 21, 2025
14 checks passed
@seungyeoneeee seungyeoneeee deleted the hotfix-service-pagination branch May 21, 2025 04:23
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