Desktop Log Table Props Contract
화면 픽스처(앱 저장소):
src/react/ui/mobile/fixtures/SessionScreen.fixture.ts,src/react/ui/mobile/fixtures/WorkoutFlow.fixture.ts
작성일: 2026-07-01
UiDesktopLogTableScreen은 데스크톱 운동 기록표 화면입니다. UI 컴포넌트는 Supabase나 repository를 직접 알지 않고, 컨테이너가 아래 props를 주입합니다.
Input Props
groups:{ id, name, exerciseIds }[]- 즐겨찾기 그룹 목록입니다.
exerciseIds는 canonicalexercises.id기준이어야 합니다.
catalog:{ [exerciseId]: { name, nameEn?, equip?, part? } }- 컬럼 헤더와 모달에서 쓰는 운동 표시 정보입니다.
rowsById:{ [isoDate]: { [exerciseId]: { load, reps, sets, treps, vol, review?, sess?, sessAt?, d? } } }- 월별 기록표 셀 데이터입니다.
load는 대표 중량,reps는 대표 반복수,sets는 세트 수,treps는 메인세트 반복수 합,vol은 볼륨 kg입니다.sess/sessAt은 날짜 드로어의 세션 그룹 헤더에 쓰는 표시용 세션명/시각입니다. RPC cell detail 또는 현재 로딩된 full session에서 보강합니다.d는 선택 셀 상세입니다:{ review, sets:[{ load, reps, type, rest, memo }] }.
initialMonth:"YYYY-MM"- 최초 표시 월입니다.
initialGroup:string | null- 최초 선택 즐겨찾기 그룹 id입니다.
profilePhoto:string- 포스트/헤더 아바타 이미지 URL 또는 data URL입니다.
profileShort:string- 이미지가 없을 때 쓰는 짧은 이니셜입니다.
exerciseDetailById:{ [exerciseId]: ExerciseDetail }- 운동 헤더 클릭 시 중앙 모달에 보여줄 PR 상세 데이터입니다.
- PR 화면의
selectedExercise와 같은 shape를 사용합니다.
Callback Props
onChangeMonth(monthKey)- 사용자가 월 이동 버튼을 누르면 호출합니다.
- 컨테이너는
get_log_table_monthRPC로 해당 월 데이터를 다시 로드합니다.
onOpenExercise(exerciseId)- 운동 상세 모달의 “나의 기록에서 보기” 액션입니다.
onOpenDate(isoDate)- 날짜/셀 모달에서 해당 날짜 운동일지로 이동합니다.
Data Rules
Month navigation loads only aggregate cells from
get_log_table_month; the response contains nocell_detailsor set arrays and is capped at 31 x 30 rows / 900,000 UTF-8 bytes per call (#938 D7, 20260830160000). Favorites above 30 are split into <= 5 chunked calls and merged client-side (#938 D6).Opening a cell triggers
get_log_table_cell_detail(date, exerciseId)once for that selected identity. The controller keeps at most 64 details in an LRU and derivesrowsById[date][exerciseId].dwithout mutating the canonical month aggregate.Selected-cell detail contains at most 48 presentation set tokens and exposes
setsTruncatedplus text truncation flags. It is not an editable/raw table source.기록표 화면은 raw
sessions,session_exercises,exercise_sets를 직접 조합하지 않습니다.월별 셀 데이터는
get_log_table_monthRPC 결과와 materialized stats 기반 mapper에서 가져옵니다.legacy UI id는 컨테이너/mapper 경계에서 canonical id로 정규화합니다.
Design Markers
- view:
dashboard.logtable - hooks:
logtableGroupSelect,logtableModeToggle,logtableExerciseHead,logtableDateHead,logtableCell,logtableExerciseDrawer,logtableDateDrawer,logtableDateOpen,logtableCellDrawer,logtableCellOpen - actions:
logtable.month.prev,logtable.month.next,logtable.group,pr.open