fix: 가오픈 설문 알림의 중복 갱신 유지

동일한 front status가 연속 도착해도 방금 열린 설문 알림을 즉시 닫지 않도록 cursor 처리를 멱등하게 만든다. production Chromium 회귀로 실시간 재조회 뒤 알림 유지를 검증한다.
This commit is contained in:
2026-08-27 06:00:18 +00:00
parent 66fc28058f
commit d1950070d0
2 changed files with 16 additions and 1 deletions
@@ -306,7 +306,13 @@ export const useMainDashboardStore = defineStore('mainDashboard', () => {
const storageKey = `state.${serverId}.lastVote`;
const lastSeenVoteId = Number.parseInt(window.localStorage.getItem(storageKey) ?? '0', 10);
if (latestVote.id <= (Number.isFinite(lastSeenVoteId) ? lastSeenVoteId : 0)) {
surveyNotice.value = null;
// Initial mounting, general creation and realtime invalidation can fetch
// the same front status in quick succession. The first response records
// the cursor; a duplicate response must not immediately dismiss the
// notice that response just opened.
if (surveyNotice.value?.id !== latestVote.id) {
surveyNotice.value = null;
}
return;
}
window.localStorage.setItem(storageKey, latestVote.id.toString());