Refactor/issue 17 change auth supabase#116
Open
lnu8926-web wants to merge 33 commits into
Open
Conversation
- use client 지시어 누락 수정 (admin/users, ProjectBoardProvider, ProjectBoardFilter) - useSearchParams Suspense 래핑 (admin/page, login/page) - Resend 이메일 발송을 supabaseAdmin.auth.admin.inviteUserByEmail()로 대체
- next.config.ts: ignoreBuildErrors 제거, TS 타입 검사 복원 - tsconfig.json: noUnusedLocals/noUnusedParameters false (ESLint 중복 관리 제거) - Header.tsx: let → const, mounted+useEffect → resolvedTheme 패턴으로 교체 - RichTextEditor.tsx: applyFormat 선언 순서 수정, ToolbarButton 컴포넌트 상단 추출 - ProjectForm.tsx: useEffect setState → useState lazy initializer로 교체 - ProjectBoardBody.tsx: effect 내 setState에 eslint-disable 주석 추가 - 타입 오류 수정: notice/layout.tsx children 타입, invitations join 캐스트, announcements handleRequest 타입, mockTasks import 경로, modal union 타입, Dropdown fallback return, Modal useEffect return, middleware 코드 경로 return, ProjectListSkeleton import 경로, TaskDetail disabled prop 제거
- src/lib/로 마이그레이션 완료된 루트 /lib/ 잔재 제거 - 삭제 파일: projectAPI.ts, noticeService.ts, userAPI.ts, calendarUtils.ts, supabase.ts, constants.ts, toast.tsx, toast-style.tsx, utils.ts, supabase/client.ts, constants/messages.ts - 활성 임포트는 모두 @/lib/ (→ src/lib/) 경로 사용 중
…nagement, ProjectCard, kanban) - types/projectMember.ts: ProjectMemberWithUser 조인 타입 추가 - AssigneeField.tsx: members any → ProjectMemberWithUser[], 이벤트 핸들러 타입 명시 - TaskDetail.tsx: members any → ProjectMemberWithUser[] | undefined - TaskAdd.tsx: 로컬 ProjectMemberWithUser 제거 → 공통 타입 import - useTaskManagement.ts: tasks any[] → Task[], createTask/updateTask 파라미터 타입 명시 - ProjectCard.tsx: project/projectMember any → Project/Record 타입, 이벤트 핸들러 타입 명시 - types/kanban.ts: subtasks any → Subtask[]
- TaskDetail.tsx: 내부 컴포넌트 props any → EditableFieldProps/ActionButtonsProps 인터페이스 정의 - useModal.ts: openModal 파라미터 any → 명시적 union 타입 - ProjectBoardBody.tsx: projectList any[] → Project[], projectMember any → Record<string,number>, as any 캐스팅 제거, formattedProjects 불필요한 camelCase 매핑 제거
- tasks.ts: handleApiError를 generic으로 변경 (ApiResponse<T>) - RichTextEditor.tsx: onChange prop 타입을 union으로 확장 (ChangeEvent | object) - useCalendarEvents.ts: avatarUrl null 처리로 타입 안정성 개선
- providers.tsx: QueryClientProvider 추가 (staleTime 5분) - ProjectBoardProvider.tsx: 미사용 projectList state/useEffect 제거 - ProjectBoardBody.tsx: useState+useCallback+useEffect → useQuery로 교체 - ProjectCard.tsx: setProjectList prop 제거 → invalidateQueries로 캐시 갱신
- ProjectForm.tsx: useEffect+fetchData → useQuery (users, project-form) - ProjectForm.tsx: handleSubmit async/try-catch → useMutation으로 교체 - 저장 완료 후 projects 캐시 자동 무효화 - 저장 중 버튼 disabled + 로딩 텍스트 표시 - handleChange, handleSubmit any 타입 제거
- src/lib/constants/queryKeys.ts 신규 생성 - projects.all / projects.list / projects.detail - users.all - projectForm.detail - ProjectBoardBody, ProjectCard, ProjectForm에서 queryKeys 상수 적용 - 하드코딩된 문자열 배열 제거
- src/lib/utils/apiError.ts 신규 생성 (handleError 유틸) - projects.ts: console.log+throw → handleError로 11곳 통일 - users.ts: console.error/log+throw → handleError로 2곳 통일 - providers.tsx: QueryClient mutations.onError 전역 핸들러 추가 (toast 표시)
- workspace/page.tsx: 7개 useState → useQuery 3개 + useMutation 3개로 교체 - tasks, projectName/Date, userRole 상태 제거 - useQuery: workspace-info, tasks (staleTime 0), workspace-role - useMutation: createTask, updateTask, deleteTask - Realtime 핸들러: setTasks → queryClient.setQueryData로 캐시 직접 업데이트 - handleRefresh: queryClient.invalidateQueries로 교체 - fetchData useEffect → 칸반보드 초기화만 담당 (프로젝트/태스크 fetch 분리) - queryKeys.ts: tasks.list, workspace.info, workspace.role 추가
- workspace 메인 화면의 무거운 컴포넌트 동적 import 적용 - CalendarView, KanbanBoard, MemoView, ProjectInfoPanel - 로그인 ProfileModal의 img 태그를 next/image로 교체 - 홈 페이지 렌더 경로의 불필요한 console.log 제거 - workspace realtime 디버그 로그 제거
[refactor][structure] CommonTable 파일명/경로 정리
[refactor][ui] UI 컴포넌트 export 규칙 통일
[refactor][structure] 상수 파일 구조 정리
[chore][ci] 품질 게이트 정식 적용
…p1-ui-move [refactor][structure] FSD 파일럿 1차: task ui 이동
…-fsd-step2-model-extract Co-authored-by: lnu8926-web <231175281+lnu8926-web@users.noreply.github.com>
…p2-model-extract [refactor][structure] FSD 파일럿 2차: task model 분리
…p3-public-api [refactor][structure] FSD 파일럿 3차: task public API 정리
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.