Repository: jangjunho2/AiLectureSummary
Pull request #35: Feat/total-duration
Author: login: imjjh
Created: 2025-05-23T13:38:12Z | Merged: 2025-05-23T13:50:34Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for lecture duration in lecture registration, detail, and upload responses.
  - Lecture lists now include total duration and display duration for each lecture.
  - Dashboard displays total saved time fetched directly from the API.

- **Bug Fixes**
  - Improved handling of unknown properties during lecture registration.

- **Refactor**
  - Updated lecture list API responses to provide a structured object with items and total duration, instead of a plain list.
  - Dashboard duration calculation moved from client-side to server-provided total duration.

- **Chores**
  - Removed test and health-check pages from the frontend.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java b/backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java
index d2ccf33..b3f1b13 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java
@@ -5,6 +5,7 @@
 import com.ktnu.AiLectureSummary.dto.memberLecture.LectureDetailResponse;
 import com.ktnu.AiLectureSummary.dto.lecture.PersonalNoteRequest;
 import com.ktnu.AiLectureSummary.dto.memberLecture.MemberLectureListItemResponse;
+import com.ktnu.AiLectureSummary.dto.memberLecture.MemberLectureListResponse;
 import com.ktnu.AiLectureSummary.security.CustomUserDetails;
 import com.ktnu.AiLectureSummary.service.MemberLectureService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -36,11 +37,11 @@ public class MemberLectureController {
             summary = "내 강의 목록 조회",
             description = "로그인한 사용자가 등록한 강의들의 제목 및 간략 정보를 반환합니다."
     )
-    public ResponseEntity<ApiResponse<List<MemberLectureListItemResponse>>> dashBoard(@AuthenticationPrincipal CustomUserDetails user){
+    public ResponseEntity<ApiResponse<MemberLectureListResponse>>dashBoard(@AuthenticationPrincipal CustomUserDetails user){
         // 현재 로그인한 사용자의 강의 목록 조회
-        List<MemberLectureListItemResponse> userLectureList = memberLectureService.getUserLectureList(user);
+        MemberLectureListResponse memberLectureListResponse = memberLectureService.getUserLectureList(user);
         // 응답 상태코드 200 OK로 반환
-        return ResponseEntity.ok(ApiResponse.success("내 강의 목록 조회 성공", userLectureList));
+        return ResponseEntity.ok(ApiResponse.success("내 강의 목록 조회 성공", memberLectureListResponse));
     }
 
     /**
@@ -66,6 +67,8 @@ public ResponseEntity<ApiResponse<LectureDetailResponse>> getLectureDetail(@Auth
      * @param request
      * @return 사용자가 등록한 강의 상세 정보
      */
+
+
     @Transactional
     @PostMapping("/{lectureId}/my-note")
     @Operation(summary = "내 특정 강의 개인 메모",description = "로그인한 사용자가 등록한 특정 강의의 개인 메모를 작성합니다.")
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java b/backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java
index 9fe1d3a..5e3aa29 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java
@@ -27,6 +27,8 @@ public class Lecture {
     @Column(nullable = false)
     private String titleByAi;
 
+    @Column(nullable = false)
+    private Long duration;
 
     @Column(nullable = false, columnDefinition = "TEXT")
     private String originalText;
@@ -47,6 +49,7 @@ public static Lecture from(LectureRegisterRequest request, String hash) {
         lecture.setHash(hash);
         lecture.setAiSummary(request.getAiSummary());
         lecture.setOriginalText(request.getOriginalText());
+        lecture.setDuration(request.getDuration());
         return lecture;
     }
 }
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
index 8f52ddd..780e0af 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
@@ -1,11 +1,16 @@
 package com.ktnu.AiLectureSummary.dto.lecture;
 // FastAPI -> Spring
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Getter;
 
+@JsonIgnoreProperties(ignoreUnknown = true)
 @Getter
 public class LectureRegisterRequest {
     private String title;
     private String originalText;
     private String aiSummary;
+    private long duration;
+//    private String filename;
+//    private String timestamp;
 }
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java
index 2ad3b2f..322818b 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java
@@ -14,16 +14,18 @@ public class LectureUploadResponse {
     private String title;
     private String originalText;
     private String aiSummary;
+    private long duration;
 
 
 
     public static LectureUploadResponse from(Lecture lecture) {
 
-        return    LectureUploadResponse.builder()
-                    .id(lecture.getId())
-                    .title(lecture.getTitleByAi())
-                    .originalText(lecture.getOriginalText())
-                    .aiSummary(lecture.getAiSummary())
-                    .build();
+    return    LectureUploadResponse.builder()
+                .id(lecture.getId())
+                .title(lecture.getTitleByAi())
+                .originalText(lecture.getOriginalText())
+                .aiSummary(lecture.getAiSummary())
+                .duration(lecture.getDuration())
+                .build();
         }
 }
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
index a51f13a..e0ef2a9 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
@@ -15,12 +15,14 @@ public class LectureDetailResponse {
     private String originalText;
     private String aiSummary;
     private String personalNote;
+    private long duration;
 
     public static LectureDetailResponse from(MemberLecture memberLecture) {
         Lecture lecture = memberLecture.getLecture();
 
         return LectureDetailResponse.builder()
                 .id(lecture.getId())
+                .duration(lecture.getDuration())
                 .title(memberLecture.getPersonalTitle())
                 .aiSummary(lecture.getAiSummary())
                 .originalText(lecture.getOriginalText())
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java
index 66e9085..651e9dd 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java
@@ -1,5 +1,6 @@
 package com.ktnu.AiLectureSummary.dto.memberLecture;
 
+import com.ktnu.AiLectureSummary.domain.Lecture;
 import com.ktnu.AiLectureSummary.domain.MemberLecture;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
@@ -13,10 +14,16 @@
 public class MemberLectureListItemResponse {
     Long lectureId;
     String title;
+    Long duration;
 
     public static List <MemberLectureListItemResponse> fromList(List<MemberLecture> memberLectures){
+
         return memberLectures.stream()
-                .map(memberLecture -> new MemberLectureListItemResponse(memberLecture.getLecture().getId(), memberLecture.getPersonalTitle()))
+                .map(memberLecture -> new MemberLectureListItemResponse(
+                    memberLecture.getLecture().getId(),
+                    memberLecture.getPersonalTitle(),
+                    memberLecture.getLecture().getDuration()
+                ))
                 .toList();
     }
 }
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java
new file mode 100644
index 0000000..d5f60e4
--- /dev/null
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java
@@ -0,0 +1,29 @@
+package com.ktnu.AiLectureSummary.dto.memberLecture;
+
+import com.ktnu.AiLectureSummary.domain.MemberLecture;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class MemberLectureListResponse {
+    private List<MemberLectureListItemResponse> items;
+    private long totalDuration;
+
+
+
+    public static MemberLectureListResponse from(List<MemberLecture> memberLectures, long totalDuration) {
+        return MemberLectureListResponse.builder()
+                .items(MemberLectureListItemResponse.fromList(memberLectures))
+                .totalDuration(totalDuration)
+                .build();
+
+    }
+}
diff --git a/backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java b/backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java
index 6100ae8..9fea8b3 100644
--- a/backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java
+++ b/backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java
@@ -1,6 +1,7 @@
 package com.ktnu.AiLectureSummary.service;
 import com.ktnu.AiLectureSummary.domain.Member;
 import com.ktnu.AiLectureSummary.dto.memberLecture.MemberLectureListItemResponse;
+import com.ktnu.AiLectureSummary.dto.memberLecture.MemberLectureListResponse;
 import com.ktnu.AiLectureSummary.exception.MemberNotFoundException;
 import com.ktnu.AiLectureSummary.repository.MemberRepository;
 
@@ -44,15 +45,29 @@ public void save(Long memberId, Lecture lecture) {
     /**
      * 사용자가 등록한 모든 강의 목록을 조회합니다.
      * 내부적으로 MemberLecture를 통해 강의 리스트를 추출하고
-     * LectureListItemResponse DTO 형태로 응답할 수 있도록 변환합니다.
+     * MemberLectureListResponse를 반환합니다.
      *
      * @param user 현재 로그인한 사용자 정보
-     * @return MemberLectureListItemResponse 리스트 (강의 ID + personTitle)
+     * @return MemberLectureListResponse ((강의 ID,  personTitle), totalDuration)
      */
-    public List<MemberLectureListItemResponse> getUserLectureList(CustomUserDetails user) {
+    public MemberLectureListResponse getUserLectureList(CustomUserDetails user) {
 
         List<MemberLecture> memberLectures = memberLectureRepository.findAllByMember_Id(user.getId());
-        return MemberLectureListItemResponse.fromList(memberLectures);
+        Long totalDuration=calculateTotalDuration(memberLectures); // 하나도 없는 경우 0?
+        return MemberLectureListResponse.from(memberLectures,totalDuration);
+    }
+
+    /**
+     * 사용자가 등록한 모든 강의 시간의 총 합
+     * @param memberLectures
+     * @return Long
+     */
+    private static long calculateTotalDuration(List<MemberLecture> memberLectures) {
+
+        return memberLectures.stream()
+                .map(memberLecture -> memberLecture.getLecture().getDuration())
+                .mapToLong(Long::longValue)
+                .sum(); // sum의 기본 리턴값은 0, list가 비어있어도 0을 반환
     }
 
     /**
diff --git a/fastapi/app/main.py b/fastapi/app/main.py
index 7dc7352..7b2c37a 100644
--- a/fastapi/app/main.py
+++ b/fastapi/app/main.py
@@ -52,7 +52,7 @@ class SummaryResponse(BaseModel):
     title: str
     aiSummary: str
     originalText: str
-    duration: str
+    duration: int
     filename: str
     timestamp: str
 
@@ -165,8 +165,7 @@ async def process_video(file: UploadFile = File(...)):
             logger.warning(f"유효하지 않은 동영상 길이: {duration_sec}, 0으로 설정")
             duration_sec = 0
 
-        duration = format_duration(duration_sec)
-        logger.info(f"최종 포맷된 동영상 길이: {duration}")
+        logger.info(f"최종 포맷된 동영상 길이(초): {duration_sec}")
 
         # GPT 요약 프롬프트
         title = "요약 제목 없음"
@@ -213,7 +212,7 @@ async def process_video(file: UploadFile = File(...)):
             "title": title,
             "aiSummary": ai_summary,
             "originalText": original_text,
-            "duration": duration,
+            "duration": int(duration_sec),
             "filename": file.filename,
             "timestamp": datetime.now(KST).strftime("%Y-%m-%d %H:%M:%S")
         }
diff --git a/frontend/src/app/about/page.tsx b/frontend/src/app/about/page.tsx
index a75dfe1..da3fbf9 100644
--- a/frontend/src/app/about/page.tsx
+++ b/frontend/src/app/about/page.tsx
@@ -32,10 +32,10 @@ export default function AboutPage() {
       className="container mx-auto px-4 py-16"
     >
       <motion.div variants={item} className="max-w-5xl mx-auto text-center mb-20"
-      initial={{ opacity: 0, y: 20 }}
-      animate={{ opacity: 1, y: 0 }}
-      transition={{ duration: 0.5 }}
-      >  
+        initial={{ opacity: 0, y: 20 }}
+        animate={{ opacity: 1, y: 0 }}
+        transition={{ duration: 0.5 }}
+      >
         <h1 className="text-5xl font-extrabold tracking-tight mb-4 bg-linear-to-r from-pink-500 to-orange-500 text-transparent bg-clip-text">
           서비스 소개
         </h1>
@@ -126,7 +126,7 @@ export default function AboutPage() {
         </div>
       </motion.section>
 
-      {/* CTA Section */}
+      {/* CTA Section = call to action(웹사이트나 앱에서 사용자가 어떤 행돌을 하도록 유도하는 영역) */}
       <motion.section variants={item} className="bg-muted p-10 rounded-2xl text-center">
         <h2 className="text-2xl font-bold mb-4">지금 바로 시작하세요</h2>
         <p className="text-muted-foreground mb-6">
diff --git a/frontend/src/app/dashboard/page.tsx b/frontend/src/app/dashboard/page.tsx
index 0d7e08e..f67d058 100644
--- a/frontend/src/app/dashboard/page.tsx
+++ b/frontend/src/app/dashboard/page.tsx
@@ -28,6 +28,7 @@ export default function DashboardPage() {
   const [user, setUser] = useState<User | null>(null);
   const [lectures, setLectures] = useState<Lecture[]>([]);
   const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
+  const [totalDuration, setTotalDuration] = useState<number>(0);
 
   useEffect(() => {
     async function fetchLectures() {
@@ -35,10 +36,12 @@ export default function DashboardPage() {
         const res = await axios.get(`${API_BASE_URL}/api/member-lectures/dashboard`, {
           withCredentials: true,
         });
-        setLectures(res.data.data);
+        setLectures(res.data.data.items); // 강의 목록
+        setTotalDuration(res.data.data.totalDuration); // 총 절약한 시간
       } catch (error) {
         console.error("강의 목록 불러오기 실패", error);
         setLectures([]);
+        setTotalDuration(0);
       }
     }
 
@@ -63,29 +66,10 @@ export default function DashboardPage() {
     // 서버에도 삭제 요청하고 싶다면 여기에 fetch 추가
   };
 
-  const getTotalDurationText = (lectures: Lecture[]): string => {
-    let totalSeconds = 0;
-
-    lectures.forEach((lecture) => {
-      const duration = lecture.duration;
-
-      if (!duration || typeof duration !== "string") return;
-
-      const parts = duration.split(":").map((s) => parseInt(s, 10));
-
-      if (parts.length === 2) {
-        // "MM:SS"
-        const [minutes, seconds] = parts;
-        totalSeconds += (minutes * 60) + seconds;
-      } else if (parts.length === 1) {
-        // "MM"
-        totalSeconds += parts[0] * 60;
-      }
-    });
-
-    const hours = Math.floor(totalSeconds / 3600);
-    const minutes = Math.floor((totalSeconds % 3600) / 60);
-
+  // Helper function to format totalDuration (seconds) as "X시간 Y분"
+  const getTotalDurationText = () => {
+    const hours = Math.floor(totalDuration / 3600);
+    const minutes = Math.floor((totalDuration % 3600) / 60);
     return `${hours}시간 ${minutes}분`;
   };
 
@@ -120,7 +104,7 @@ export default function DashboardPage() {
               <div className="w-20 h-20 rounded-full bg-primary/10 flex items-center justify-center mb-4">
                 <Clock className="h-10 w-10 text-primary" />
               </div>
-              <h3 className="text-2xl font-bold mb-1">{getTotalDurationText(lectures)}</h3>
+              <h3 className="text-2xl font-bold mb-1">{getTotalDurationText()}</h3>
               <p className="text-sm text-muted-foreground">절약한 시간</p>
             </CardContent>
           </Card>
diff --git a/frontend/src/app/test/health-check/page.tsx b/frontend/src/app/test/health-check/page.tsx
deleted file mode 100644
index 544cd7b..0000000
--- a/frontend/src/app/test/health-check/page.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-"use client";
-
-import { useEffect, useState } from "react";
-
-const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
-
-export default function Home() {
-  const [msg, setMsg] = useState("");
-
-  useEffect(() => {
-    fetch(`${API_BASE_URL}/hello`)
-      .then((res) => res.text())
-      .then(setMsg)
-      .catch(() => setMsg("연결 실패 😢"));
-  }, []);
-
-  return (
-    <main className="p-8 min-h-screen bg-gray-900 text-white">
-      <h1 className="text-4xl font-bold text-blue-500">Tailwind CSS 테스트</h1>
-      <p className="mt-4 text-lg">
-        이 텍스트가 파란색으로 보인다면 Tailwind CSS가 정상 적용된 것입니다.
-      </p>
-      <p className="mt-2 text-sm">
-        추가 테스트: 버튼에 마우스를 올리면 변화가 있어야 합니다.
-      </p>
-      <button className="mt-4 px-4 py-2 bg-green-500 hover:bg-green-600 rounded">
-        클릭해보세요
-      </button>
-      <p>{msg}</p>
-    </main>
-  );
-}
diff --git a/frontend/src/app/test/page.tsx b/frontend/src/app/test/page.tsx
deleted file mode 100644
index 4076a10..0000000
--- a/frontend/src/app/test/page.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-export default function TestPage() {
-  return (
-    <main className="min-h-screen bg-white dark:bg-zinc-900 text-zinc-900 dark:text-white p-10">
-      <h1 className="text-3xl font-bold text-indigo-600 dark:text-indigo-400">
-        ✅ Tailwind Test Page
-      </h1>
-      <p className="mt-4 text-lg">
-        이 페이지는 Tailwind가 정상 동작하는지 확인하기 위한 테스트입니다.
-      </p>
-      <button className="mt-6 px-4 py-2 bg-pink-500 hover:bg-pink-600 text-white rounded">
-        버튼을 눌러보세요!
-
-        vercel preview test2332
-      </button>
-    </main>
-  );
-}


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

Adds and standardizes handling of lecture durations across the stack, removing frontend test pages and extending backend APIs to return aggregate and individual durations.

- Remove legacy test pages in the frontend  
- FastAPI: change `duration` from formatted string to integer seconds  
- Spring Boot: introduce `totalDuration` in lecture list, add `duration` to DTOs and domain

### Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

<details>
<summary>Show a summary per file</summary>

| File                                                      | Description                                          |
| --------------------------------------------------------- | ---------------------------------------------------- |
| frontend/src/app/test/page.tsx                            | Removed unused test page                            |
| frontend/src/app/test/health-check/page.tsx               | Removed unused health-check test page                |
| fastapi/app/main.py                                       | Switched `duration` to `int` and removed formatting  |
| backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java | Calculate and return totalDuration in list endpoint  |
| backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java | New response DTO including items + totalDuration     |
| backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java | Added per-item `duration` field                      |
| backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java | Include `duration` in detail response                |
| backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java | Add `duration` on upload response                    |
| backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java | Add `duration` input field                           |
| backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java | Persist `duration` in domain model                   |
| backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java | Update controller to return `MemberLectureListResponse` |
</details>



<details>
<summary>Comments suppressed due to low confidence (3)</summary>

**backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java:47**
* Update or remove this Javadoc line to reflect that the method now returns `MemberLectureListResponse` rather than `MemberLectureListItemResponse`.
```
* LectureListItemResponse DTO 형태로 응답할 수 있도록 변환합니다.
```
**backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java:38**
* [nitpick] Since the response now includes total duration, consider updating this Swagger description to mention that `totalDuration` is returned.
```
description = "로그인한 사용자가 등록한 강의들의 제목 및 간략 정보를 반환합니다."
```
**backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java:65**
* Add unit tests for `calculateTotalDuration`, including edge cases (empty list, single item, multiple items) to ensure correct summation of durations.
```
private static long calculateTotalDuration(List<MemberLecture> memberLectures) {
```
</details>


state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T13:40:28Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 4**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>fastapi/app/main.py (1)</summary><blockquote>

`90-100`: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Consider removing unused function.**

The `format_duration` function is no longer used in the response path since duration is now returned as an integer. Consider removing it if it's not used elsewhere.

---

🏁 Script executed:

```shell
#!/bin/bash
# Search for usage of format_duration function
rg -A 3 "format_duration" --type py
```

Length of output: 319

---



</details>

**Remove the unused `format_duration` helper in fastapi/app/main.py**

No usages of `format_duration` were found in the codebase (search via `rg format_duration` only returns its own definition). Since durations are now handled as integers in the response, you can safely delete this function.

• File to update:  
  - `fastapi/app/main.py` – remove the entire `format_duration` function (lines ~90–100)

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (2)</summary><blockquote>

<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java (2)</summary><blockquote>

`17-17`: _🛠️ Refactor suggestion_

**Type consistency concern with domain entity.**

Same issue as in `LectureDetailResponse` - using primitive `long` when the domain entity uses `Long` wrapper.



```diff
-    private long duration;
+    private Long duration;
```

---

`28-28`: _⚠️ Potential issue_

**Potential NullPointerException risk.**

Same null safety concern as in `LectureDetailResponse`.



```diff
-                .duration(lecture.getDuration())
+                .duration(lecture.getDuration() != null ? lecture.getDuration() : 0L)
```

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (7)</summary><blockquote>

<details>
<summary>fastapi/app/main.py (2)</summary><blockquote>

`168-168`: **Update logging message for clarity.**

The logging message should be updated to reflect that we're now returning raw duration in seconds rather than formatted duration.


```diff
-        logger.info(f"최종 포맷된 동영상 길이(초): {duration_sec}")
+        logger.info(f"최종 동영상 길이(초): {duration_sec}")
```

---

`215-215`: **Ensure integer conversion handles edge cases properly.**

The conversion to `int(duration_sec)` looks correct, but consider the behavior when `duration_sec` is 0.0 or a very small positive number.



Consider adding explicit handling for edge cases:

```diff
-            "duration": int(duration_sec),
+            "duration": max(0, int(duration_sec)),
```

</blockquote></details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java (1)</summary><blockquote>

`65-71`: **Review the type conversion in duration calculation.**

The duration calculation logic is correct, but `Long::longValue` conversion might be unnecessary if the `duration` field is already of primitive `long` type.


Consider verifying the actual type of `getDuration()` return value. If it returns `long`, simplify to:

```diff
-                .mapToLong(Long::longValue)
+                .mapToLong(duration -> duration)
```

Or if it returns `Long`, the current implementation is correct for handling potential null values.

```shell
#!/bin/bash
# Description: Check the return type of getDuration() method in Lecture entity

# Search for getDuration method definition
ast-grep --pattern $'getDuration() {
  $$$
}'

# Also search for duration field declaration
rg "duration" --type java -A 2 -B 2 | grep -E "(private|public|protected).*duration"
```

</blockquote></details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java (2)</summary><blockquote>

`40-44`: **Good alignment with service layer changes, but fix formatting.**

The return type update to `MemberLectureListResponse` correctly aligns with the service layer changes and maintains consistency.



Fix the method signature formatting by adding a space:

```diff
-    public ResponseEntity<ApiResponse<MemberLectureListResponse>>dashBoard(@AuthenticationPrincipal CustomUserDetails user){
+    public ResponseEntity<ApiResponse<MemberLectureListResponse>> dashBoard(@AuthenticationPrincipal CustomUserDetails user){
```

---

`70-71`: **Remove unnecessary blank lines.**

The additional blank lines don't add value and should be removed for cleaner code formatting.


```diff
-
-
```

</blockquote></details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java (2)</summary><blockquote>

`12-16`: **Add JavaDoc for clarity**  
The DTO and its factory method lack documentation. Consider adding class-level and method-level JavaDoc to explain the purpose of `MemberLectureListResponse`, the units of `totalDuration`, and usage of the `from` method.

---

`22-28`: **Consider moving total-duration calculation into the DTO**  
Currently, the service must compute `totalDuration` before calling `from(...)`. To centralize responsibility and prevent mismatches, you could derive `totalDuration` directly in the DTO from the mapped items:

```diff
-public static MemberLectureListResponse from(List<MemberLecture> memberLectures, long totalDuration) {
-    return MemberLectureListResponse.builder()
-            .items(MemberLectureListItemResponse.fromList(memberLectures))
-            .totalDuration(totalDuration)
-            .build();
-}
+public static MemberLectureListResponse from(List<MemberLecture> memberLectures) {
+    List<MemberLectureListItemResponse> items = MemberLectureListItemResponse.fromList(memberLectures);
+    long totalDuration = items.stream()
+                              .mapToLong(MemberLectureListItemResponse::getDuration)
+                              .sum();
+    return MemberLectureListResponse.builder()
+            .items(items)
+            .totalDuration(totalDuration)
+            .build();
+}
```
This ensures the DTO always reflects its own data and reduces coupling with the service layer.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 0dae781bd835e56212ed27722b01574ef964e5ff and 70c0f38b529a28243f0ca8fe594e51304b1d96b5.

</details>

<details>
<summary>📒 Files selected for processing (11)</summary>

* `backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java` (3 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java` (2 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java` (1 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java` (1 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java` (1 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java` (2 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java` (1 hunks)
* `backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java` (2 hunks)
* `fastapi/app/main.py` (3 hunks)
* `frontend/src/app/test/health-check/page.tsx` (0 hunks)
* `frontend/src/app/test/page.tsx` (0 hunks)

</details>

<details>
<summary>💤 Files with no reviewable changes (2)</summary>

* frontend/src/app/test/page.tsx
* frontend/src/app/test/health-check/page.tsx

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (2)</summary>

<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java (1)</summary><blockquote>

<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java (1)</summary>

* `AllArgsConstructor` (11-29)

</details>

</blockquote></details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java (3)</summary><blockquote>

<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java (1)</summary>

* `Getter` (10-31)

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java (1)</summary>

* `Getter` (9-32)

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java (1)</summary>

* `Getter` (12-29)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>🔇 Additional comments (12)</summary><blockquote>

<details>
<summary>fastapi/app/main.py (1)</summary>

`55-55`: **Good change to standardize duration as integer.**

This change aligns with the backend Java implementation using numeric duration values, providing consistency across the system.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java (2)</summary>

`30-31`: **Good implementation with database constraint.**

The `nullable = false` constraint ensures database-level validation. Using `Long` wrapper type is appropriate for JPA entities.

---

`52-52`: <details>
<summary>✅ Verification successful</summary>

**Verify LectureRegisterRequest duration field.**

Ensure that `LectureRegisterRequest.getDuration()` properly validates the duration field and doesn't allow null values.

---

🏁 Script executed:

```shell
#!/bin/bash
# Search for LectureRegisterRequest class definition and duration field
ast-grep --pattern 'class LectureRegisterRequest {
  $$$
}'
```

Length of output: 61

---

I wasn’t able to locate `LectureRegisterRequest` with AST-grep, so let’s fall back to ripgrep to find and inspect its definition and how it handles `duration`:



This will confirm whether `duration` is non-null-checked or validated before use.

---

🏁 Script executed:

```shell
#!/bin/bash
# 1. Find the file containing LectureRegisterRequest
rg -l 'class LectureRegisterRequest'

# 2. In that file, show the field declaration for duration
file=$(rg -l 'class LectureRegisterRequest')
rg -n 'private .*duration' -C2 "$file"

# 3. And show the getter implementation
rg -n 'getDuration' -C5 "$file"
```

Length of output: 662

---



</details>

**Duration field is a primitive long and cannot be null**

I confirmed that in `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java` the `duration` is declared as a `long` (primitive), so it will never be `null`. JSON binding will default it to `0` if omitted. No null-check is needed.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java (3)</summary>

`3-3`: **LGTM! Import addition is necessary.**

The import for `Lecture` is required since the mapping method now accesses `memberLecture.getLecture().getDuration()`.

---

`17-17`: **Good addition of duration field.**

The `Long duration` field aligns with the PR objective to include duration information in lecture responses.

---

`19-28`: <details>
<summary>✅ Verification successful</summary>

**Verify the mapping logic is consistent with other DTOs.**

The mapping correctly extracts duration from the lecture entity. However, ensure this approach is consistent with other DTO mappings in the codebase.


---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Verify that other DTOs use similar duration mapping patterns

# Search for similar duration mapping patterns in other response DTOs
rg -A 3 -B 3 "\.getDuration\(\)" --type java
```

Length of output: 4457

---



</details>

**Mapping duration consistent across DTOs**

Verified that `MemberLectureListItemResponse.fromList` uses `lecture.getDuration()` in the same way as other DTOs (see `LectureUploadResponse.java` and `LectureDetailResponse.java`). No changes required.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java (2)</summary>

`4-4`: **Excellent addition of JsonIgnoreProperties annotation.**

Adding `@JsonIgnoreProperties(ignoreUnknown = true)` improves API robustness by gracefully handling unknown JSON properties during deserialization.



Also applies to: 7-7

---

`13-13`: **Good addition of duration field.**

The `long duration` field aligns with the PR objective to capture lecture duration information.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java (2)</summary>

`4-4`: **LGTM! Import addition is necessary.**

The import for `MemberLectureListResponse` is required for the new return type.

---

`48-58`: **Excellent implementation of wrapper DTO pattern.**

The method signature change to return `MemberLectureListResponse` properly encapsulates both the lecture items and total duration. The javadoc is updated accordingly.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java (1)</summary>

`8-8`: **LGTM! Import addition is necessary.**

The import for `MemberLectureListResponse` is required for the updated return type.

</details>
<details>
<summary>backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java (1)</summary>

`12-19`: **Excellent use of Lombok and Builder pattern**  
Leveraging `@Getter`, `@NoArgsConstructor`, `@AllArgsConstructor`, and `@Builder` cleanly reduces boilerplate. The private fields `items` and `totalDuration` are well encapsulated, and the builder-based static factory promotes immutability.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-23T13:40:30Z
user: login: light-castle
body: good
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T13:50:04Z

Review comments:
diff_hunk: @@ -1,11 +1,16 @@
 package com.ktnu.AiLectureSummary.dto.lecture;
 // FastAPI -> Spring
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Getter;
 
+@JsonIgnoreProperties(ignoreUnknown = true)
 @Getter
 public class LectureRegisterRequest {
     private String title;
     private String originalText;
     private String aiSummary;
+    private long duration;
path: backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
user: login: Copilot
body: Jackson won’t be able to set the new `duration` field since there’s no setter or no-args constructor; consider adding Lombok’s `@NoArgsConstructor` and either `@Setter` or switching to `@Data` so JSON deserialization works.
created_at: 2025-05-23T13:40:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -36,11 +37,11 @@ public class MemberLectureController {
             summary = "내 강의 목록 조회",
             description = "로그인한 사용자가 등록한 강의들의 제목 및 간략 정보를 반환합니다."
     )
-    public ResponseEntity<ApiResponse<List<MemberLectureListItemResponse>>> dashBoard(@AuthenticationPrincipal CustomUserDetails user){
+    public ResponseEntity<ApiResponse<MemberLectureListResponse>>dashBoard(@AuthenticationPrincipal CustomUserDetails user){
path: backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java
user: login: Copilot
body: [nitpick] Add a space between the generic closing `>>` and the method name (`dashBoard`) for readability and to adhere to common style conventions.
```suggestion
    public ResponseEntity<ApiResponse<MemberLectureListResponse>> dashBoard(@AuthenticationPrincipal CustomUserDetails user){
```
created_at: 2025-05-23T13:40:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -15,12 +15,14 @@ public class LectureDetailResponse {
     private String originalText;
     private String aiSummary;
     private String personalNote;
+    private long duration;
 
     public static LectureDetailResponse from(MemberLecture memberLecture) {
         Lecture lecture = memberLecture.getLecture();
 
         return LectureDetailResponse.builder()
                 .id(lecture.getId())
+                .duration(lecture.getDuration())
path: backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Potential NullPointerException risk.**

If `lecture.getDuration()` returns null (Long wrapper), assigning it to a primitive long field will cause a NullPointerException.


Consider adding null safety:

```diff
-                .duration(lecture.getDuration())
+                .duration(lecture.getDuration() != null ? lecture.getDuration() : 0L)
```

Or change the field type to `Long` to handle null values gracefully.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
                .duration(lecture.getDuration() != null ? lecture.getDuration() : 0L)
```

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In
backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
at line 25, the assignment of lecture.getDuration() to a primitive long field
risks a NullPointerException if getDuration() returns null. To fix this, either
add a null check before assignment and provide a default value if null, or
change the field type from primitive long to Long to allow null values safely.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-23T13:40:29Z
author_association: NONE
diff_hunk: @@ -15,12 +15,14 @@ public class LectureDetailResponse {
     private String originalText;
     private String aiSummary;
     private String personalNote;
+    private long duration;
path: backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider type consistency with domain entity.**

The DTO uses primitive `long` while the domain entity uses `Long` wrapper type. This could cause NullPointerException if the entity's duration is null.


```diff
-    private long duration;
+    private Long duration;
```

Alternatively, ensure the domain entity's duration is never null by adding validation.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In
backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java
at line 18, change the type of the duration field from primitive long to the
wrapper class Long to maintain consistency with the domain entity and avoid
potential NullPointerExceptions when the entity's duration is null.
Alternatively, if you prefer to keep it as long, add validation in the domain
entity to ensure duration is never null before mapping to the DTO.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-23T13:40:29Z
author_association: NONE
diff_hunk: @@ -47,6 +49,7 @@ public static Lecture from(LectureRegisterRequest request, String hash) {
         lecture.setHash(hash);
         lecture.setAiSummary(request.getAiSummary());
         lecture.setOriginalText(request.getOriginalText());
+        lecture.setDuration(request.getDuration());
path: backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Add null validation for request parameter.**

Consider adding validation to ensure the duration from the request is not null before setting it.


```diff
-        lecture.setDuration(request.getDuration());
+        if (request.getDuration() == null) {
+            throw new IllegalArgumentException("Duration cannot be null");
+        }
+        lecture.setDuration(request.getDuration());
```

This will fail fast if invalid data is provided rather than deferring the error to database persistence.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
        if (request.getDuration() == null) {
            throw new IllegalArgumentException("Duration cannot be null");
        }
        lecture.setDuration(request.getDuration());
```

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java at line
52, add a null check for the duration value obtained from the request before
calling lecture.setDuration. If the duration is null, handle it appropriately by
either throwing an exception or returning an error to fail fast, preventing
invalid data from being set and deferring errors to database persistence.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-23T13:40:29Z
author_association: NONE
diff_hunk: @@ -1,11 +1,16 @@
 package com.ktnu.AiLectureSummary.dto.lecture;
 // FastAPI -> Spring
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Getter;
 
+@JsonIgnoreProperties(ignoreUnknown = true)
 @Getter
 public class LectureRegisterRequest {
     private String title;
     private String originalText;
     private String aiSummary;
+    private long duration;
+//    private String filename;
+//    private String timestamp;
path: backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
user: login: coderabbitai[bot]
body: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Clarify the status of commented fields.**

The `filename` and `timestamp` fields are commented out but not removed. This suggests incomplete refactoring or temporary changes that should be addressed.


Are these fields permanently removed or temporarily disabled? Consider removing them entirely if they're no longer needed to keep the codebase clean.

---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Check if filename and timestamp fields are used elsewhere in the codebase

# Search for usage of filename field in the codebase
echo "Searching for filename field usage:"
rg "filename" --type java -A 2 -B 2

echo -e "\n\nSearching for timestamp field usage:"
rg "timestamp" --type java -A 2 -B 2
```

Length of output: 8907

---



</details>

**Remove unused commented fields in LectureRegisterRequest**

The commented-out `filename` and `timestamp` fields in `LectureRegisterRequest.java` aren’t referenced anywhere in the codebase (the only use of a `filename` field is in `MultipartFileResource`, and `timestamp` is used only in error responses). Leaving them commented clutters the DTO and can lead to confusion. Please delete these lines entirely to keep the class clean and maintainable.

• File:  
  `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java`  
  – Remove the commented lines for `private String filename;` and `private String timestamp;`

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In
backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java
around lines 14 to 15, remove the commented-out declarations of the fields
'private String filename;' and 'private String timestamp;' entirely, as they are
unused and only clutter the code. This will clean up the DTO and improve
maintainability.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-23T13:40:29Z
author_association: NONE

PR comments:
user: login: vercel[bot]
created_at: 2025-05-23T13:38:17Z
body: [vc]: #S5zP1BnDrRe/EusoSjg/iJhc3/8bWTwae/1hZHPoDpQ=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJhaXN1bW1hcnlfbW9ubyIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJhaXN1bW1hcnltb25vLWdpdC1mZWF0LXRvdGFsZHVyYXRpb24tamFuZ2p1bmhvMnMtcHJvamVjdHMudmVyY2VsLmFwcCJ9LCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vamFuZ2p1bmhvMnMtcHJvamVjdHMvYWlzdW1tYXJ5X21vbm8vNHRyRDVXRXkzdGg1SGRrc05aZ3hGaWNNWnA5biIsInByZXZpZXdVcmwiOiJhaXN1bW1hcnltb25vLWdpdC1mZWF0LXRvdGFsZHVyYXRpb24tamFuZ2p1bmhvMnMtcHJvamVjdHMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsInJvb3REaXJlY3RvcnkiOiJmcm9udGVuZCJ9XX0=
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **aisummary_mono** | ✅ Ready ([Inspect](https://vercel.com/jangjunho2s-projects/aisummary_mono/4trD5WEy3th5HdksNZgxFicMZp9n)) | [Visit Preview](https://aisummarymono-git-feat-totalduration-jangjunho2s-projects.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/aisummarymono-git-feat-totalduration-jangjunho2s-projects.vercel.app?via=pr-comment-feedback-link) | May 23, 2025 1:40pm |


author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-05-23T13:38:19Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

This update introduces a new `duration` field to several lecture-related DTOs and entities across the backend and API layers. It also changes the dashboard response structure to encapsulate lecture items and their total duration. Additionally, two frontend test page components were removed, and the API now returns duration as an integer instead of a string.

## Changes

| File(s)                                                                                         | Change Summary |
|-------------------------------------------------------------------------------------------------|---------------|
| `backend/src/main/java/com/ktnu/AiLectureSummary/controller/MemberLectureController.java`        | Changed `dashBoard` method return type from a list of `MemberLectureListItemResponse` to `MemberLectureListResponse` (includes total duration). |
| `backend/src/main/java/com/ktnu/AiLectureSummary/domain/Lecture.java`                            | Added non-nullable `duration` field; updated factory method to set duration from request. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureRegisterRequest.java`        | Added `@JsonIgnoreProperties`, new `duration` field; commented out `filename` and `timestamp`. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/dto/lecture/LectureUploadResponse.java`         | Added `duration` field; updated factory method to include duration. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/LectureDetailResponse.java`   | Added `duration` field; updated factory method to set duration from entity. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListItemResponse.java` | Added `duration` field; updated mapping to include duration. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java` | Introduced new DTO encapsulating a list of lecture items and total duration. |
| `backend/src/main/java/com/ktnu/AiLectureSummary/service/MemberLectureService.java`              | Changed user lecture list method to return `MemberLectureListResponse` with total duration; added duration calculation helper. |
| `fastapi/app/main.py`                                                                           | Changed `duration` in `SummaryResponse` from string to integer; updated endpoint to return raw duration in seconds. |
| `frontend/src/app/test/health-check/page.tsx`, `frontend/src/app/test/page.tsx`                 | Deleted test page components for health check and Tailwind CSS verification. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Client
    participant Controller
    participant Service
    participant Repository

    Client->>Controller: GET /dashboard
    Controller->>Service: getUserLectureList(user)
    Service->>Repository: findLecturesByUser(user)
    Repository-->>Service: List<MemberLecture>
    Service->>Service: calculateTotalDuration(lectures)
    Service-->>Controller: MemberLectureListResponse (items, totalDuration)
    Controller-->>Client: ApiResponse<MemberLectureListResponse>
```

## Possibly related PRs

- [#24](https://github.com/jangjunho2/AiLectureSummary/pull/24): Adds the initial `dashBoard` method in `MemberLectureController` returning a list of lecture items; this PR refines and extends that implementation.
- [#33](https://github.com/jangjunho2/AiLectureSummary/pull/33): Modifies the `dashBoard` method's return type to a list of `MemberLectureListItemResponse`, which is further extended in this PR to a wrapper DTO including total duration.

## Suggested reviewers

- minwoChoi
- light-castle
- ddoyo

## Poem

> In the warren where lectures grow long,  
> Rabbits now track duration—so strong!  
> With lists wrapped up neat,  
> And seconds complete,  
> The dashboard’s a hop, not a slog.  
> Old test pages gone,  
> The code hops on! 🐇⏱️

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 70c0f38b529a28243f0ca8fe594e51304b1d96b5 and 9ed442bc55c26e4d733acd1c55525b7ae329903b.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `frontend/src/app/about/page.tsx` (2 hunks)
* `frontend/src/app/dashboard/page.tsx` (3 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* frontend/src/app/about/page.tsx

</details>

<details>
<summary>🔇 Additional comments (5)</summary><blockquote>

<details>
<summary>frontend/src/app/dashboard/page.tsx (5)</summary>

`31-31`: **LGTM! Appropriate state variable added.**

The new `totalDuration` state variable with `number` type aligns well with the backend changes to provide duration in seconds.

---

`44-44`: **LGTM! Consistent error handling.**

Good practice to reset `totalDuration` to 0 in the error case, maintaining state consistency.

---

`69-74`: **LGTM! Simplified and more efficient implementation.**

The refactored helper function is much cleaner, working directly with seconds instead of parsing duration strings. The logic correctly converts seconds to hours and minutes.

---

`107-107`: **LGTM! Proper usage of the refactored helper function.**

The function call is correct and will display the formatted total duration.

---

`39-40`: <details>
<summary>✅ Verification successful</summary>

**Verify API response structure consistency.**

The destructuring looks correct for the new response structure, but ensure the backend consistently returns `totalDuration` as a number (seconds) rather than a string.

---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Check for API endpoint implementation to verify response structure
# Expected: Find the dashboard endpoint returning items and totalDuration

rg -A 10 -B 5 "dashboard.*endpoint|/dashboard.*api" --type=java --type=ts --type=js
```

Length of output: 85

---

To locate where `totalDuration` is defined and consumed, let’s search the entire codebase for its occurrences:

---

🏁 Script executed:

```shell
#!/bin/bash
rg -C2 "totalDuration"
```

Length of output: 4340

---



</details>

**Ensure totalDuration is a JSON number**  
Confirmed that in `backend/src/main/java/com/ktnu/AiLectureSummary/dto/memberLecture/MemberLectureListResponse.java`, `totalDuration` is declared as a Java `long`, so Jackson will serialize it as a numeric value. The front end’s `useState<number>` and subsequent calculations all expect a number, so the types are consistent. No changes needed.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AxEtQD0BXGgtha2KuPwYDAOWxmAUouAGYAVgMAVUQQyCFMIiFsDFh8ACYjfWNwKDJ6fAAzHAJiMmUaeiZWdi5efmFRcSkZeSYlKlV1LR1skyg4VFRMEsJSci86BRqMTkgqAHdIREDmNAp5OQUOlTVNbV0wQxzTAwE0BgBrfIdECgYHNfgMBwSJNAdqh0vcDGwHACC8AAMk1PCQAMqrdayT4+XAUfAWKwUBwAWRIQUooLE4IAwvDEcjKBo3mgOAYAETUgwAYlpkABAEkyhNqFMVqwYfxigxYIlpGZYCR5iRcJ4sLhZNwRUVILhhZAAAa0NCIWAAIXw61oSsgbAVihQWCVGKxFBx4ooJAJsyJKL1CzVjH5GFI9EKiOYyoAStJuD5YgBRWbqWTAAHceB+xABjCxYDApC4YBm4IWsHWpOIXBMmjMGNx2J6Et6gi+/2Bkgh8RSiNRwtV1OY9OW8HZ3CN+MkUsaSAEijW2M+WjPIgWWQAGnliveFHgKiskDSFlHbpnIuwsQoAHJkFZcdbIBZk5AnchsNxVZVIJ6WOhlR3m+a21nk3nMV3i2X8A/TS3sUzEgOy/Eg9UEEQxGna1CgPcR1zQF0BWNDdlkoCR4AYEUDTSWg91FK1JWlEg+zgEUhyLEUBEUeQMHwJYFiobhkAVVByCWf8XyAkDK27PVnhzewCmKRCTxzPs/F/fAFUoY98CITD+D4Jg7SRW8LHopC3WkM9KGwtAlD7AFaFHbwMFcCdp1wBZfwECxMEuY9nh0hY9PQEypmCQp8CPGTlUY9QSAABUoRAfFcSSaD1HDFGnBYED5SBaHwHS6NwdBCkKJpbxSMR4HCk8pQ0IwjHpRkLBoLx8vjeVfz8pQGHsqrAx5SASAADwDCgb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zEQmSdI/Klhausm3Z0j+rBjbda5BCirUbmmz3uURRV7RB17pwBnm24tFQdmlSfFKIm6GmgN9Hq4OZMCwQAFlZC4LWexKgEBp0JSCsbdKPQ3zDUVAeS1IcK02kp382OT/eissB1gUoQMJAOKBgkPjd92ErWJUufkno1YkBfKROOmVRSUBfwFEJoKqgnAsF8u+UGVKF3YBgBQBaqVwN1XlKlUA4qNTulsCE7TR1wVbdOMenwiH0k6ucVAKe06yQAmQ4VAyFhxa5cYUeUwYUBYAuQrdvke9agE4RFCuA5OtAeQFGzAZcpb+UWa5FgDXrsJ7iXdX8GkE8C7l/uA9SDr1ENZkd7W0TI3nnlQDGDTBtdVbNmUCJWCsBZ/QcGgE2ASpjqzmB/tpkIEqDR0o4LntwJQaptmig/cbkTRH65teoM3YaN0UqYigr+xCdyJHBWi890oAAbVwG+xpwXcPqvRQGoYAAAuquk+i3Rl+D0TbodiPZFpZ+fDefi7UX6jCOEM7M7lABsDi9kaNNOaPTS8orRIkPQ1wH0O3b2FHox6MprolOitD+hAMLgEfXlxi1dhzgr+IcPlpXCJ68uKYsMPVALDxheoSYVMWmETs5hIw+6IsIfZncbaRwE4HkClRlU8AYwF7lMAV5cBFg2/TAlsCjKdA9gPQQ4IYH6DTA+6uAfOqWQLrWgCurkWgPnQrjdRsRkIyAAAHYbqDAG6oUFCAAAOAQOEHSAABONAOkBZHpAAALKEEKAMi0ALIrKOEE5H8iSA4QAAIyhAbq/IgQDKNoCciAAbOyOpG4jORdAfkfyPSACAGA4QcIAwHSCqiSA/I2gLSNCChALgtAGUYaKNHpBwgAgWkWgBIChAuRnIm6qEAEDUiDAuI4VOoEJGj186JIkaGSPzr5BsRQAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=jangjunho2/AiLectureSummary&utm_content=35):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE