Skip to content

히스토리 페이지 개발#84

Merged
Jieunsse merged 1 commit into
mainfrom
feature/history
Feb 24, 2026
Merged

히스토리 페이지 개발#84
Jieunsse merged 1 commit into
mainfrom
feature/history

Conversation

@HWAN0218

Copy link
Copy Markdown
Contributor

Summary

  • 페이지 경로 변경
  • 미구현 기능 수정

Issue

Scope

  • 포함

@HWAN0218 HWAN0218 added this to the 페이지 milestone Feb 24, 2026
@HWAN0218 HWAN0218 requested review from a team, Jieunsse, jungwon123 and yooolleee February 24, 2026 12:13
@HWAN0218 HWAN0218 self-assigned this Feb 24, 2026
@HWAN0218 HWAN0218 added the 기능추가 기능개발 및 추가할 때 사용해주세요. label Feb 24, 2026
@HWAN0218 HWAN0218 added this to workers Feb 24, 2026
@github-project-automation github-project-automation Bot moved this to 개발 대기중 in workers Feb 24, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @HWAN0218, 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!

이 Pull Request는 히스토리 페이지의 전반적인 구조를 리팩토링하고 기능을 개선합니다. 페이지 경로를 변경하고, 불필요한 UI 컴포넌트 의존성을 제거하며, 완료된 작업 데이터를 보다 효율적으로 처리하도록 로직을 업데이트했습니다. 또한, 팀 관리 기능을 추가하고 사용자 경험을 위한 UI/UX 조정을 포함합니다.

Highlights

  • 파일 경로 및 이름 리팩토링: 히스토리 페이지의 컴포넌트 및 CSS 파일이 src/app/[teamid]/_domain/components/MyHistory/ 경로로 이동하고 MyHistory로 이름이 변경되었습니다.
  • 전역 UI 컴포넌트 제거: 히스토리 페이지에서 Sidebar, MobileHeader, MobileDrawer 등 전역 UI 컴포넌트의 직접적인 사용 및 관련 스타일이 제거되었습니다.
  • 동적 라우팅 및 날짜 처리 개선: useRouteruseParams 훅이 도입되어 teamid 기반의 동적 라우팅을 지원하며, 월 및 날짜 처리 유틸리티 함수가 세분화되고 개선되었습니다.
  • 완료된 작업 데이터 로딩 로직 변경: 완료된 작업(done tasks)을 가져오는 로직이 개선되어, 선택된 월을 포함한 다음 달 시작까지의 모든 작업을 가져온 후 선택된 월에 해당하는 작업만 필터링하도록 수정되었습니다.
  • PC 좌측 패널 '내가 한 일' 섹션 추가: PC 버전의 좌측 패널에 '내가 한 일' 섹션이 추가되었으며, 데이터가 있는 월만 표시하고 최신순으로 정렬하는 기능이 구현되었습니다.
  • 팀 관리 메뉴 추가: 팀 헤더에 팀 수정 및 삭제 기능을 위한 팀 메뉴가 추가되었으며, 관련 스타일이 정의되었습니다.
  • 히스토리 작업 항목 상호작용 비활성화: 히스토리 페이지의 작업 항목에서 체크박스 및 삭제 버튼의 상호작용이 비활성화되어, 히스토리 데이터의 변경을 방지합니다.
  • API 오류 처리 및 팀 삭제 기능 추가: queries.ts 파일에 ApiError 클래스가 추가되어 API 오류 처리가 개선되었고, 팀 삭제를 위한 deleteTeam 뮤테이션이 추가되었습니다.

🧠 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/app/(root)/history/history.module.css
    • 파일 이름이 MyHistory.module.css로 변경되고 경로가 이동되었습니다.
    • 데스크톱 사이드바 및 모바일 GNB 관련 스타일이 제거되었습니다.
    • 메인 콘텐츠 패딩이 조정되었습니다.
    • 팀 메뉴 관련 스타일(teamMenu, teamMenuItem, teamMenuItemDanger)이 추가되었습니다.
    • 칩(Chip) 행 및 태스크 상세 카드 관련 스타일이 업데이트되었습니다.
  • src/app/(root)/history/hooks/queries.ts
    • 파일 이름이 queries.ts로 변경되고 경로가 이동되었습니다.
    • API 응답 오류를 처리하기 위한 ApiError 클래스가 추가되었습니다.
    • useDoneTasksByTaskList 훅이 제거되고, 여러 태스크 리스트의 완료된 작업을 한 번에 가져오는 useDoneTasksForTaskLists 훅이 개선되었습니다.
    • 팀 삭제를 위한 deleteTeam 뮤테이션이 추가되었습니다.
  • src/app/(root)/history/page.tsx
    • 파일 이름이 MyHistory.tsx로 변경되고 경로가 이동되었습니다.
    • Sidebar, MobileHeader, MobileDrawer 등 전역 UI 컴포넌트 임포트 및 사용이 제거되었습니다.
    • useRouteruseParams 훅이 추가되어 동적 라우팅을 지원합니다.
    • 날짜 및 월 처리 유틸리티 함수가 pad2, parseYm, addMonths, dayKeyFromIso, monthKeyFromIso 등으로 세분화되고 개선되었습니다.
    • 완료된 작업 데이터를 가져오는 로직이 useDoneTasksForTaskLists를 사용하여 특정 월에 대한 필터링을 강화하도록 변경되었습니다.
    • PC 좌측 패널에 월별 작업 요약을 표시하는 leftMonthBlocks 로직이 추가되었습니다.
    • 팀 수정 및 삭제 기능을 위한 teamMenuOpen 상태와 관련 핸들러(goTeamEditPage, doDeleteTeam)가 구현되었습니다.
    • 작업 항목의 체크박스 및 케밥 메뉴의 삭제 버튼이 비활성화되었습니다.
    • useMediaQuery 훅이 제거되었습니다.
Activity
  • 이 Pull Request에는 아직 인간 활동(댓글, 리뷰 등)이 없습니다.
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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request significantly refactors the MyHistory component, primarily by removing the desktop sidebar and mobile GNB UI elements and their associated logic and styles, consolidating the component to focus solely on the history view. Key changes include updating padding values in MyHistory.module.css, introducing new styles for a team menu with responsive adjustments, and refining existing styles for task lists and detail cards. The component's logic was updated to remove mobile/desktop specific state management, introduce new utility functions for date manipulation, and refine how DoneTask data is fetched and filtered to display tasks by selected month and category. The tasksByDate sorting order was reversed to show newer items first, and a new leftMonthBlocks logic was added to display only months with data. Error handling was improved by adding validation for groupId in API calls and a check before creating comments. Review comments highlighted potential UI issues from removing padding-top on mobile, suggested using CSS variables and extracting common styles for the new team menu, questioned the specificity of global !important chip overrides, and sought confirmation on design alignment for font changes and the new descending sort order for tasks.


@media (max-width: 1023px) {
.main {
padding: 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The padding-top calculation involving env(safe-area-inset-top) was removed. This might affect the layout on devices with safe areas (e.g., iPhones with notches) in mobile view. Please ensure this removal does not introduce any UI issues on such devices.

Comment on lines 114 to +118
queryFn: async () => {
// ✅ TODO: 스웨거 경로 확인해서 여기만 맞추면 끝
// 흔한 형태 예시:
// 1) groups/{groupId}/task-lists/{taskListId}/tasks/done?from=...&to=...
// 2) groups/{groupId}/task-lists/{taskListId}/tasks?done=true&from=...&to=...
const path = `groups/${groupId}/task-lists/${taskListId}/tasks/done?from=${encodeURIComponent(
fromIso,
)}&to=${encodeURIComponent(toIso)}`;

const data = await apiFetch<DoneTasksResponse>(path);

// taskListId가 서버 응답에 없으면 주입해서 history에서 필터링 가능하게
const tasks = (data?.tasksDone ?? []).map((t) => ({
...t,
taskListId: (t.taskListId ?? taskListId) as number,
}));

return { tasksDone: tasks };
if (!Number.isFinite(groupId) || groupId <= 0) {
throw new ApiError(400, 'Invalid groupId');
}
return await apiFetch<GroupDetailResponse>(`groups/${groupId}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Adding validation for groupId (!Number.isFinite(groupId) || groupId <= 0) and throwing an ApiError is a critical improvement. This prevents API calls with invalid group IDs, leading to more predictable behavior and better error messages.

Comment on lines 192 to +197
.leftScroll {
max-height: 768px;
overflow: auto;
padding-right: 10px;
box-sizing: border-box;
margin-top: 40px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Adding margin-top: 40px; to .leftScroll directly within the style definition is a specific layout adjustment. If this margin is context-dependent, consider if it should be applied conditionally or derived from a spacing system.

Comment on lines +68 to +82
/* TeamHeader 톱니 메뉴 */
.teamMenu {
position: absolute;
right: 0;
top: 52px;
width: 140px;
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 12px;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
z-index: 15000;
padding: 8px;
display: flex;
flex-direction: column;
gap: 6px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The .teamMenu styling is well-defined. However, consider using CSS variables for colors (#fff, #e2e8f0, #0f172a, #f1f5f9, #ef4444, #fff1f2) to maintain consistency with the rest of the application's theme, as seen in other parts of this file (e.g., var(--color-background-secondary)).

Comment on lines +101 to +111
.teamMenuItem {
width: 100%;
height: 34px;
border: none;
background: transparent;
cursor: pointer;
text-align: center;
border-radius: 10px;
font-size: 14px;
color: #0f172a;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The .teamMenuItem and .teamMenuItemDanger classes share many common properties (width, height, border, background, cursor, text-align, border-radius, font-size). These common styles could be extracted into a base class to reduce duplication and improve maintainability.


const keys = Array.from(map.keys()).sort((a, b) => (a > b ? 1 : -1));
return keys.map((k) => ({ dayKey: k, tasks: map.get(k)! }));
const keys = Array.from(map.keys()).sort((a, b) => (a > b ? -1 : 1));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The sorting order for tasksByDate keys has been changed from ascending (a > b ? 1 : -1) to descending (a > b ? -1 : 1). This means newer dates will appear first. Ensure this change aligns with the desired display order for the history items.

Comment on lines +234 to +238
const list = (map.get(k) ?? []).slice().sort((a, b) => {
const ai = a.doneAt ?? a.date ?? '';
const bi = b.doneAt ?? b.date ?? '';
return ai > bi ? -1 : 1;
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The inner sorting of tasks within each day (list.sort) has also been changed to descending order based on doneAt or date. This ensures that within each day, the most recently completed tasks appear first.

Comment on lines +709 to +710
if (!effectiveSelectedTaskId) return;
createComment.mutate({ content });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Adding a check if (!effectiveSelectedTaskId) return; before calling createComment.mutate is a good defensive programming practice. It prevents attempting to create a comment for a non-existent task, improving the robustness of the component.

flex-direction: column;
min-width: 0;
padding: 120px 85px 80px;
padding: 120px 67px 80px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The padding value changed from 85px to 67px. While this is a valid change, it would be beneficial to understand the reasoning behind this specific value. Is it based on a design system, a new responsive breakpoint, or a visual adjustment?

const isLoading = queries.some((q) => q.isLoading);
const isError = queries.some((q) => q.isError);

const tasksDoneAll = queries.flatMap((q) => (q.data?.tasksDone ?? []) as DoneTask[]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The removal of isError from the return value of useDoneTasksForTaskLists might be an oversight. While isLoading is still present, isError is also a valuable state to expose for comprehensive error handling in the UI. Consider re-adding it if error states need to be explicitly handled.

@Jieunsse Jieunsse merged commit 44c9b90 into main Feb 24, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능추가 기능개발 및 추가할 때 사용해주세요.

Projects

Status: 개발 완료

Development

Successfully merging this pull request may close these issues.

2 participants