Skip to content

[FIX] 예상 작업 완료 시간 관련 로직 수정#255

Merged
hyunseo-han merged 1 commit intodevelopfrom
fix/photo-manage-time(#243)
Feb 12, 2026
Merged

[FIX] 예상 작업 완료 시간 관련 로직 수정#255
hyunseo-han merged 1 commit intodevelopfrom
fix/photo-manage-time(#243)

Conversation

@dodaaaaam
Copy link
Contributor

🔀 Pull Request Title

현상관리 예상 작업 완료 시간 계산 로직 수정

📌 PR 설명

이번 PR에서 어떤 작업을 했는지 요약해주세요.

  • getEarlyFinishedTime 수정
  • buildProcessStep 수정

@dodaaaaam dodaaaaam linked an issue Feb 12, 2026 that may be closed by this pull request
2 tasks
@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
finders Ready Ready Preview, Comment Feb 12, 2026 2:10pm

@dodaaaaam dodaaaaam self-assigned this Feb 12, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dodaaaaam, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 예상 작업 완료 시간 계산 로직의 문제를 해결합니다. 작업 완료 시간을 "예상보다 일찍 완료된 시간"으로 계산하는 유틸리티 함수를 분, 시간, 일 단위로 더 정확하게 표시하도록 리팩토링하고, 이 정보를 표시하는 UI 컴포넌트를 업데이트하여 변경 사항을 반영합니다.

Highlights

  • 예상 완료 시간 계산 로직 개선: getEarlyFinishedHours 함수가 getEarlyFinishedTime으로 리팩토링되어, 완료 시간을 시간 단위뿐만 아니라 분, 시간, 일 단위로 더 세분화하여 표시하도록 개선되었습니다.
  • UI 컴포넌트 업데이트: buildProcessSteps 함수가 새로운 getEarlyFinishedTime 함수를 사용하도록 업데이트되었으며, 반환되는 문자열 타입과 조건부 렌더링 로직을 처리하도록 수정되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/lib/buildProcessSteps.tsx
    • getEarlyFinishedTime을 사용하도록 import 문이 업데이트되었습니다.
    • 시간 계산 함수 호출이 getEarlyFinishedHours에서 getEarlyFinishedTime으로 변경되었습니다.
    • "예상보다 일찍 완료된" 메시지의 표시 로직이 새로운 문자열 반환 타입과 조건부 렌더링을 처리하도록 조정되었습니다.
  • src/utils/getEarlyFinishedHours.ts
    • 이전의 예상 완료 시간 계산 유틸리티 파일이 제거되었습니다.
  • src/utils/getEarlyFinishedTime.ts
    • 예상 완료 시간을 분, 시간 또는 일 단위로 계산하고 포맷팅하는 새로운 유틸리티 함수 파일이 추가되었습니다.
Activity
  • 현재까지 특별한 활동은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dodaaaaam dodaaaaam added the refactor 내부 구조 개선(가독성,확장성,유지보수성) label Feb 12, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

예상 작업 완료 시간 계산 로직을 수정하는 PR이네요. 전반적으로 getEarlyFinishedHours를 더 상세한 시간 정보를 제공하는 getEarlyFinishedTime으로 교체하고, 관련 UI를 업데이트하는 변경 사항들이 잘 반영되었습니다. 다만, 새로운 함수의 반환 값 처리에 있어 몇 가지 논리적 결함과 개선점이 보여 리뷰를 남깁니다. 조건부 렌더링 로직과 API 설계를 조금 더 명확하고 안전하게 수정하면 좋겠습니다.

Comment on lines +135 to +139
subcontent={
earlyHours !== -1
? `예상 작업 시간보다 ${earlyHours} 빨리 완료되었어요!`
: undefined
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

현재 조건 earlyHours !== -1getEarlyFinishedTime 함수가 반환하는 문자열 "-1"을 올바르게 처리하지 못하여 버그를 유발할 수 있습니다. 예를 들어, 작업이 예상보다 늦게 끝나면 earlyHours는 문자열 "-1"이 되고, "-1" !== -1true이므로 "예상 작업 시간보다 -1 빨리 완료되었어요!"라는 잘못된 메시지가 표시됩니다. 또한, 유효하지 않은 날짜에 대해 빈 문자열("")이 반환될 때도 의도치 않은 메시지가 보일 수 있습니다. earlyHours가 유효한 시간 문자열일 때만 메시지를 표시하도록 조건을 수정해야 합니다.

Suggested change
subcontent={
earlyHours !== -1
? `예상 작업 시간보다 ${earlyHours} 빨리 완료되었어요!`
: undefined
}
subcontent={
(earlyHours !== -1 && earlyHours !== "" && earlyHours !== "-1")
? `예상 작업 시간보다 ${earlyHours} 빨리 완료되었어요!`
: undefined
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

완료

const diffMs = estimated - completed;

// 일찍 끝나지 않았으면
if (diffMs <= 0) return "-1";
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

조금 더 일관성 있고 사용하기 쉬운 API를 위해, 일찍 끝나지 않은 경우에 매직 스트링 "-1"을 반환하는 대신 빈 문자열("")을 반환하는 것을 고려해보세요. 이렇게 하면 이 함수를 사용하는 쪽에서 """-1"을 모두 확인해야 하는 번거로움을 줄일 수 있고, falsy 값 체크만으로 간단하게 로직을 처리할 수 있습니다.

Suggested change
if (diffMs <= 0) return "-1";
if (diffMs <= 0) return "";

@@ -48,7 +48,7 @@ export function buildProcessSteps({
};

const earlyHours = workData.print
Copy link
Contributor

Choose a reason for hiding this comment

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

SHOULD: 함수명에 맞게 이것도 바꾸면 좋을 거 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

완료

@hyunseo-han hyunseo-han self-requested a review February 12, 2026 14:39
Copy link
Contributor

@MlNTYS MlNTYS left a comment

Choose a reason for hiding this comment

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

gemini에 좋아요 누른 comment 확인 부탁드려요! 어푸 드립니다!

@hyunseo-han hyunseo-han merged commit 6e5af81 into develop Feb 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 내부 구조 개선(가독성,확장성,유지보수성)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 현상관리 예상 작업 완료 시간 계산 로직 수정

3 participants