Skip to content

fix : 중간지점 조회 데이터 값 문제 수정#50

Merged
kim3360 merged 1 commit intomainfrom
feature/GA-Evaluation-Metric
Mar 4, 2026
Merged

fix : 중간지점 조회 데이터 값 문제 수정#50
kim3360 merged 1 commit intomainfrom
feature/GA-Evaluation-Metric

Conversation

@kim3360
Copy link
Member

@kim3360 kim3360 commented Mar 4, 2026

🚀 중간지점 조회 데이터 값 문제 수정

📝 변경사항

  • midpoint_calculated_${id}를 가지고 첫 진입시 first 아닐경우 recalculated

✅ 체크리스트

  • 코드 리뷰를 받았습니다
  • 테스트를 완료했습니다
  • 린터 에러가 없습니다
  • 타입 에러가 없습니다
  • 브라우저에서 테스트를 완료했습니다
  • 모바일에서 테스트를 완료했습니다 (해당되는 경우)

📸 스크린샷

UI 변경 사항이 있다면 이미지를 드래그해서 넣어주세요!

💬 리뷰어 전달사항

  • 리뷰어가 특별히 확인해야 할 사항이 있다면 적어주세요.

Summary by CodeRabbit

릴리스 노트

  • 새 기능

    • 개별 회의별 계산 상태 추적 기능 추가. 각 회의의 계산 여부를 지속적으로 저장하여 재계산 시 이전 계산 상태를 정확히 반영.
  • 버그 수정

    • 회의별 계산 상태 관리 개선으로 계산 타입 결정 로직 안정화.

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mingling-frontend Ready Ready Preview, Comment Mar 4, 2026 0:13am

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Walkthrough

회의별 계산 상태를 추적하기 위해 단순한 id 기반 로직을 localStorage 기반의 지속 플래그로 변경했습니다. calculationType은 midpoint_calculated_<id> 플래그의 값에 따라 결정되며, 초기 계산 시 해당 플래그가 설정됩니다.

Changes

Cohort / File(s) Summary
회의 페이지 상태 관리
app/meeting/[id]/page.tsx
localStorage에 midpoint_calculated_<id> 플래그를 추가하여 회의별 계산 상태를 지속적으로 추적. calculationType 결정 로직을 플래그 값 확인으로 변경하고, 제출 경로(handleSubmit)에서도 동일한 플래그 기반 로직 적용.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • chore : GA4 이벤트 추가 #47: 동일 파일의 midpoint 계산/제출 흐름 및 calculation_type GA 이벤트 설정 로직을 수정하는 관련 PR입니다.

Suggested reviewers

  • kangdy25
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 변경사항과 관련성이 있으며, 중간지점 조회 데이터 값 문제 수정이라는 주요 변경을 명확하게 설명하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 변경사항이 기술되어 있고 체크리스트가 완성되었습니다. 단, 스크린샷과 리뷰어 전달사항이 비워있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/GA-Evaluation-Metric

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kim3360 kim3360 requested a review from kangdy25 March 4, 2026 12:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/meeting/[id]/page.tsx (1)

177-181: 스토리지 접근을 공통 유틸로 통일해 주세요.

Line 177-181에서 localStorage를 직접 다루고 있는데, 같은 파일은 이미 lib/storage.ts(Line 1-27)의 추상화(getMeetingUserId, removeMeetingUserId)를 사용 중입니다. 키 네이밍/SSR 가드가 분산되면 추후 정리나 확장 시 누락 위험이 커집니다. midpoint 플래그도 storage 유틸로 올려 일관화하는 쪽을 권장합니다.

♻️ 제안 코드
- import { getMeetingUserId, removeMeetingUserId } from '@/lib/storage';
+ import {
+   getMeetingUserId,
+   removeMeetingUserId,
+   getMidpointCalculated,
+   setMidpointCalculated,
+ } from '@/lib/storage';
...
-      const alreadyCalculated = localStorage.getItem(`midpoint_calculated_${id}`) === '1';
+      const alreadyCalculated = getMidpointCalculated(id);
       const calculationType = alreadyCalculated ? 'recalculated' : 'first';
       if (!alreadyCalculated) {
-        localStorage.setItem(`midpoint_calculated_${id}`, '1');
+        setMidpointCalculated(id, true);
       }
// lib/storage.ts
export const getMidpointCalculated = (meetingId: string): boolean => {
  if (typeof window === 'undefined') return false;
  return localStorage.getItem(`meeting_${meetingId}_midpoint_calculated`) === '1';
};

export const setMidpointCalculated = (meetingId: string, calculated: boolean) => {
  if (typeof window === 'undefined') return;
  localStorage.setItem(`meeting_${meetingId}_midpoint_calculated`, calculated ? '1' : '0');
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/meeting/`[id]/page.tsx around lines 177 - 181, Replace the direct
localStorage access in page.tsx with new storage helpers: add
getMidpointCalculated(meetingId: string): boolean and
setMidpointCalculated(meetingId: string, calculated: boolean) to lib/storage.ts
(these should include the SSR guard and use a consistent key like
meeting_{id}_midpoint_calculated), then in the component replace the current
alreadyCalculated / localStorage.setItem logic by calling
getMidpointCalculated(id) and setMidpointCalculated(id, true) (or false as
needed) so key naming and SSR checks are centralized in
getMidpointCalculated/setMidpointCalculated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/meeting/`[id]/page.tsx:
- Around line 177-181: Replace the direct localStorage access in page.tsx with
new storage helpers: add getMidpointCalculated(meetingId: string): boolean and
setMidpointCalculated(meetingId: string, calculated: boolean) to lib/storage.ts
(these should include the SSR guard and use a consistent key like
meeting_{id}_midpoint_calculated), then in the component replace the current
alreadyCalculated / localStorage.setItem logic by calling
getMidpointCalculated(id) and setMidpointCalculated(id, true) (or false as
needed) so key naming and SSR checks are centralized in
getMidpointCalculated/setMidpointCalculated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb55beed-ae26-453c-a345-f7099d5b47bc

📥 Commits

Reviewing files that changed from the base of the PR and between 54781f4 and 8677b91.

📒 Files selected for processing (1)
  • app/meeting/[id]/page.tsx

@kim3360 kim3360 merged commit 278befd into main Mar 4, 2026
5 checks passed
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.

2 participants