fix(fe): 상태 목록 위젯 타임머신 미동작 수정 — http_status 스냅샷 합성 - #1
Open
xgeekover wants to merge 1 commit into
Open
Conversation
status-list 위젯은 다중 http_status 모니터 타깃을 하나의 목록으로 묶어 단일 snapshot key 로 풀 수 없어(snapshotKey.js 가 null 반환), TM 모드에서 항상 "이 시점에 데이터 없음" 으로 표시되던 버그. - useWidgetApiData.tmResults 에서 status-list 를 특수 처리: 각 targetId 의 monitor:http_status|<tid> 스냅샷을 모아 라이브 경로와 동일한 transformMonitorSnapshotToStatusList 로 합성. (ServerResource/Network 카드가 카드 레벨에서 하는 다중 타깃 조립을, status-list 는 라이브 데이터도 이 훅을 타므로 훅 레벨에서 수행) - status-list 는 reportWidgetStatus 를 호출하지 않고 전역 알람은 BE /alerts/active 가 단독 소스라, 과거 시점 데이터로 라이브 알람이 오발화되지 않음. - 카드의 "마지막 갱신 시각" 이 TM 모드에서 스냅샷 시점을 가리키도록 data.checkedAt 를 최신 스냅샷 ts 로 부여 + StatusListCard 가 이를 사용. 검증: vite build 통과, 합성 로직 시뮬레이션 24/24 통과. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STHNiPFvtoxMbemirfk1aU
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.
문제 (Track A)
타임머신(TM) 모드에서 상태 목록(status-list) 위젯만 항상
"이 시점에 데이터 없음"+ dead 로 표시되던 버그.http_status모니터 타깃을 하나의 목록으로 합성하므로 단일 snapshot key 로 풀 수 없어(snapshotKey.js가null반환)useWidgetApiData의tmResults에서 스냅샷을 찾지 못함.monitor:http_status샘플이 실제로 존재하고 이를 그릴StatusListDetail까지 있으나 위젯 배선만 빠져 있었음.변경
monigrid-fe/src/hooks/useWidgetApiData.jsbuildStatusListTmData()추가 — 각 targetId 의monitor:http_status|<tid>스냅샷을 모아 라이브 경로와 동일한transformMonitorSnapshotToStatusList()로{ items, okCount, failCount }형태로 합성.tmResults에서 status-list 를 특수 분기(continue)해 기존 data_api/table/chart 경로는 그대로 유지 → 회귀 위험 없음.data.checkedAt를 최신 스냅샷 ts 로 부여.monigrid-fe/src/components/StatusListCard.jsxdata.checkedAt기준으로 표시(TM=스냅샷 시점, 라이브≈현재).안전성
status-list 는
reportWidgetStatus를 호출하지 않고 전역 알람은 BE/alerts/active가 단독 소스이므로, 과거 시점 데이터로 라이브 알람이 오발화되지 않음.검증
vite build통과 (앱 통합)🤖 Generated with Claude Code
https://claude.ai/code/session_01STHNiPFvtoxMbemirfk1aU