Skip to content

refactor(client): time 흐름 분리 - #70

Merged
tartelettie merged 3 commits into
refactor/notes-edit-flowfrom
refactor/time-flow
Sep 3, 2026
Merged

tartelettie merged 3 commits into
refactor/notes-edit-flowfrom
refactor/time-flow

Conversation

@tartelettie

@tartelettie tartelettie commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

이 PR을 어떻게 봐야 하나

이 PR들은 리뷰를 쉽게 하려고 기능 단위로 쌓아 둔 PR입니다.

지금 GitHub 화면에서 #66/#69/#70은 main으로 바로 merge되는 PR이 아닙니다. 선행 PR 브랜치를 base로 둬서 리뷰어가 "이번 PR에서 추가로 바뀐 부분"만 작게 볼 수 있게 해 둔 상태입니다.

예를 들어 #66 화면에 이렇게 보이면 정상입니다.

refactor/todo-routine-flow → refactor/frontend-context-foundation

이 상태에서 바로 merge하면 main이 아니라 refactor/frontend-context-foundation으로 들어갑니다. 그래서 실제 main merge는 아래 순서로 합니다.

#65를 main에 merge
→ #66 base를 main으로 바꾼 뒤 merge
→ #69 base를 main으로 바꾼 뒤 merge
→ #70 base를 main으로 바꾼 뒤 merge

즉 리뷰할 때는 지금처럼 stacked PR로 작게 보고, merge할 때만 다음 PR의 base를 main으로 바꿔서 순서대로 넣습니다.


왜

time 관련 화면과 handler가 마지막까지 Screens.tsx/useAppData.ts에 남아 있었습니다. todo, routine, notes를 기능별 폴더로 분리한 뒤에도 time이 남으면 Screens.tsx가 계속 거대한 통합 화면 파일로 남고, 리뷰 기준인 기능별 domain 구조도 일관되지 않습니다.

이 PR은 time 범위만 분리해서 frontend 리팩토링 스택의 마지막 기능 영역을 정리합니다.

무엇을 했나

  • TimeScreen을 client/src/time/components/로 분리했습니다.
  • time 화면 스타일을 TimeScreen.styles.ts로 분리했습니다.
  • time 상태와 handler를 제공하는 hook 이름을 useTimeTracking으로 정리했습니다.
  • TimeScreen, SessionTracker, StudyPlanner는 time 묶음 객체 대신 sessions, activeSession, timerMinutes, onStartSession, onRecordMomentNote 같은 명시적 props를 받게 했습니다.
  • 타이머, 세션 기록, 순간 메모, 주간 planner 관련 handler를 useTimeTracking으로 이동했습니다.
  • session.ts와 테스트를 client/src/time/domain/으로 이동했습니다.
  • 기존 Screens.tsx를 제거하고, 각 기능 화면은 자기 feature 폴더에서 import되도록 정리했습니다.

어떻게 바뀌었나

  • before: Screens.tsx가 time 화면 UI, timer 상태, session 계산, planner handler까지 같이 들고 있었습니다.
  • after: time 화면은 time/components/TimeScreen.tsx, time 상태/handler 조립은 time/hooks/useTimeTracking, 순수 계산은 time/domain/session.ts가 담당합니다.
  • 화면 컴포넌트는 필요한 props를 명시적으로 받습니다. Actions나 time 같은 넓은 객체 prop은 사용하지 않습니다.
  • 컴포넌트는 현재 시각과 오늘 날짜를 hook에서 받은 값으로 사용하고, 순수 규칙은 domain 함수로 이동했습니다.

유지한 내용

  • 타이머 시작/정지/기록 UX
  • 순간 메모 판별과 세션 시간 계산 규칙
  • 주간 planner 표시/수정 흐름
  • API 요청 방식과 저장 DTO
  • useAppData의 workspace data, cache, loading, request helper 소유권
  • 자정을 넘는 기록을 별도로 고치지 않는 기존 정책
  • todo/routine/notes 동작

일부러 제외한 내용

  • workspace/cache/loading/request 소유권 분리
  • 자정 넘는 session 표시 버그 수정
  • 보관/아카이빙 기능
  • line limit, e2e/smoke test, 새 임의 CI 정책 추가
  • AGENTS.md 변경

검증

  • cd client && npm test -- --run
  • cd client && npm run typecheck
  • cd client && npm run format:check

@vercel

vercel Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
todo Ready Ready Preview Sep 3, 2026 10:35am UTC

@tartelettie
tartelettie changed the base branch from main to refactor/notes-edit-flow August 28, 2026 12:57
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from eb0e044 to 9967771 Compare August 29, 2026 00:54
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 9967771 to fddfa48 Compare August 29, 2026 01:05
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from fddfa48 to 79f8294 Compare August 29, 2026 01:21
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 79f8294 to 75eea3b Compare August 29, 2026 02:30
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 75eea3b to cab7886 Compare August 29, 2026 02:35
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from cab7886 to 7b05733 Compare August 29, 2026 02:46
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 31522a5 to d9c37b4 Compare August 29, 2026 03:42
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from d9c37b4 to 5bc1eaf Compare August 29, 2026 07:39
@tartelettie
tartelettie marked this pull request as ready for review August 29, 2026 08:23
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch 3 times, most recently from 1d1d290 to 5e02511 Compare August 29, 2026 08:49
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 5e02511 to 6078d30 Compare August 29, 2026 08:58
@tartelettie
tartelettie force-pushed the refactor/time-flow branch 2 times, most recently from 7e84c66 to 0e99736 Compare August 29, 2026 08:59
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 6078d30 to 90100dd Compare August 29, 2026 09:23
@tartelettie
tartelettie force-pushed the refactor/notes-edit-flow branch from 90100dd to c4f74c7 Compare August 29, 2026 09:36
@CheHyeonYeong

Copy link
Copy Markdown
Owner

todo에도 썼듯
component
ㄴ style

domain
test
이렇게 나눠주심 좋을 것 같아요

이거 하심 그냥 merge 해주세요 고생하셨습니다

This branch was successfully deployed

1 active deployment
Preview — a4770d20 Deployed Sep 3, 2026 by vercel[bot]
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