feat(routines): 루틴 — 미리 정한 값을 /q에서 1탭 저장 (§7.24) - #120
Merged
Merged
Conversation
사료 10g·영양제 3종처럼 매일 똑같이 넣는 기록을 시트 없이 한 번에. - API: Routine/RoutineItem 테이블 + 마이그레이션, /api/routines CRUD. 항목의 타입·칩·제품이 같은 가구·같은 반려동물 것인지 검사(K-1), medication 타입 거부. /api/home에 routines 포함. 격리 테스트 4건 - 웹: /q 입력 바를 기록 칩 / 루틴 두 패널로 — 세그먼트, CSS scroll-snap 옆으로 밀기, 하단 내비 기록 탭 재탭 토글. 마지막 모드는 localStorage. 루틴 버튼은 항목마다 POST /api/events(K-4) + 같은 entryId(§7.22) + 실행취소 토스트. 루틴이 0개면 화면은 지금과 같다 - 관리: 더보기 → 루틴 (/routines) — 이름 + 항목(칩·제품·양·단위) - 문서: WORKPLAN §7.24·P2-15, WORKLOG R157~R160, api.md Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- API: 항목의 칩이 보관(archivedAt)됐으면 presetId·preset을 null로 내린다 — 칩은 소프트 보관이라 FK SetNull이 안 걸리고 createEvent()가 404를 내던 것 - 수정 시트: 목록에 없는 presetId는 같은 타입 칩으로 되돌린다 — 옛 id를 들고 있으면 저장 때 항목이 조용히 빠졌다 - /q: 항목 N개 중 하나가 실패해도 이미 들어간 건에 실행취소를 붙인다 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
무엇
매일 똑같이 넣는 기록(사료 10g, 영양제 3종, 물 5.5)을
/q에서 시트 없이 1탭으로 저장하는 루틴. WORKPLAN §7.24 · P2-15.지금
/q칩은 어떤 것이든 시트를 열고(lastItems가 지난 묶음을 채워도 2탭), "마지막"은 한 번 다르게 기록하면 바뀝니다. 루틴은 고정된 정의이고 아침/저녁 영양제처럼 변형 둘을 동시에 들 수 있습니다.어떻게
데이터 —
Routine/RoutineItem새 테이블 (마이그레이션20260915000000_routines).Preset에 얹지 않은 이유는 (가구·개체·타입)당 활성 1행이라 "사료 10g"과 "사료 5g"이 같이 못 들어가서 (R157).API —
/api/routinesGET/POST/PATCH/DELETE. 항목의 타입·칩·제품이 같은 가구·같은 반려동물 것인지 검사(K-1),medication거부./api/home에routines. 격리 테스트 4건./q— 입력 바가 기록 칩 / 루틴 두 패널이 됩니다. 즉시 저장 버튼과 시트를 여는 칩이 섞이지 않게 (R159).scroll-snap, 제스처 코드 없음) · 하단 내비 기록 탭 재탭(/q에서만preventDefault+ 윈도 이벤트, 시트 열려 있으면 무시). 둥근 메뉴는 기각 (R158)localStorage에 기억 — 루틴 사용자는 앱 열기 → 기록 탭 → 버튼 = 1탭POST /api/events(K-4), 둘 이상이면 같은entryId(§7.22), 항목별dedupeKey, 오프라인 큐 그대로. 실행취소 토스트는 N건을 한 번에 지웁니다관리 — 더보기 → 루틴 (
/routines): 이름 + 항목(칩 · 등록 제품 · 양 · 단위). 기록에서 "루틴으로 저장"은 보류 (R160).검증
npm test전부 통과 (shared 69 · api 313 · web 300), lint 0 errors/q·/routines실행: 루틴 생성/수정/삭제, 3항목 루틴 1탭 → POST 3건(같은entryId, 역순), 타임라인 묶음 표시, 실행취소로 3건 삭제, 내비 재탭 토글, 새로고침 후 루틴 모드 복원IntersectionObserver)·부드러운 스크롤은 브라우저 페인이 프레임을 안 돌려 검증 불가. 실기에서 밀기 ↔ 세그먼트, 세로 타임라인 스크롤과의 축 잠금, iOS 가장자리 뒤로가기를 봐 주세요prisma migrate deploy🤖 Generated with Claude Code