feat: 기록 상세에 작성자·최종 수정 표기 + 투약 시간 버튼 안 보이던 버그 (v0.6.0) - #40
Merged
Conversation
두 가지 사용 피드백.
1. 케어 화면의 투약 시간 버튼("오전 8:00" 등)이 흰 배경에 흰 글자였다.
.care-dose-slot-btn이 color를 지정하지 않아 전역 button { color:
var(--color-primary-text) }(라이트 모드 흰색)를 그대로 물려받는데, 배경은
var(--color-surface)(라이트 모드에서도 흰색)라 텍스트가 안 보였다. "수정"
버튼(.btn-action)은 색을 명시해서 멀쩡했다.
2. 기록 상세 하단에 "{이름} 작성 · {날짜} 수정" 한 줄을 추가했다.
Event.createdById·updatedAt은 이미 스키마에 있었다 — API select에서
createdBy 관계를 안 뽑고 있었을 뿐이다. POST/PATCH/GET /api/events,
GET /api/events/:id, GET /api/home(recentEvents, /q 화면이 씀) 세 select
모두에 createdBy를 추가했다.
eventAuditParts()(eventDisplay.ts)로 로직을 분리했다: 작성자를 모르면
(API 토큰으로 생성된 기록 등) 그 줄만 건너뛰고, 생성과 동시(2초 이내)면
"수정" 표시를 하지 않는다 — 이 문턱이 없으면 createdAt·updatedAt이 사실상
같은 순간인 모든 기록에 "방금 수정됨"이 붙어 정보가 아니라 소음이 된다.
알아낸 것: button { color: ... } 기본값을 물려받는 커스텀 버튼 클래스는
배경만 바꾸고 글자색을 빠뜨리기 쉽다. /q(홈 빠른 기록) 화면의 최근 기록
목록은 GET /api/events가 아니라 GET /api/home의 별도 select를 쓴다 —
관계 필드를 추가할 때 이 select도 함께 챙겨야 같은 상세 시트인데 여는
경로에 따라 필드가 있다 없다 하는 일이 없다.
eventAuditParts는 순수 함수로 분리해 문턱값·작성자 누락 케이스를 테스트로
고정했다. 버튼 색은 브라우저에서 라이트·다크 모드 모두 실측했다.
Co-Authored-By: Claude Sonnet 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.
두 가지 사용 피드백을 처리했습니다.
1. 투약 시간 버튼이 흰 배경에 흰 글자였던 버그
"처방 추가 했는데 수정 빼고 시간 입력한 메뉴가 아무것도 텍스트 표기가 안됨" — 정확히 짚으신 대로였습니다.
케어 화면의
.care-dose-slot-btn(투약 시간 버튼, "오전 8:00" 등)이color를 지정하지 않아 전역button { color: var(--color-primary-text) }(라이트 모드 흰색)를 그대로 물려받는데, 배경은var(--color-surface)(라이트 모드에서도 흰색)라 텍스트가 안 보였습니다. "수정" 버튼(.btn-action)은 색을 명시해서 멀쩡했던 것 — "수정 빼고" 안 보인다는 관찰이 정확히 원인을 가리켰습니다.라이트·다크 모드 모두 브라우저에서 실측해 확인했습니다.
2. 기록 상세에 작성자·최종 수정 표기
기록 상세 하단에 다음처럼 한 줄이 붙습니다:
Event.createdById·updatedAt은 이미 스키마에 있었습니다 — API select에서createdBy관계를 안 뽑고 있었을 뿐입니다.POST/PATCH/GET /api/events,GET /api/events/:id,GET /api/home(recentEvents,/q화면이 씀) 세 select 모두에 추가했습니다.로직은
eventAuditParts()(eventDisplay.ts)로 분리했습니다:createdAt·updatedAt을 같은 순간에 찍는데, 문턱 없이 그대로 비교하면 모든 기록에 "방금 수정됨"이 붙어 정보가 아니라 소음이 됩니다 — 실제로 나중에 고쳤을 때만 보입니다알아낸 것
button { color: ... }기본값을 물려받는 커스텀 버튼 클래스는 배경만 바꾸고 글자색을 빠뜨리기 쉽습니다. 새 버튼 클래스를 추가할 때color를 항상 같이 확인해야 합니다/q(홈 빠른 기록) 화면의 최근 기록 목록은GET /api/events가 아니라GET /api/home의 별도 select를 씁니다. 관계 필드를 추가할 때 이 select도 함께 챙겨야, 같은 상세 시트인데 여는 경로에 따라 필드가 있다 없다 하는 일이 없습니다검증
build·lint·test(266개) 통과.eventAuditParts는 순수 함수로 분리해 문턱값·작성자 누락 케이스를eventDisplay.test.ts로 고정했습니다. 버튼 색·감사 줄 배치는 브라우저에서 정적 하네스로 렌더 확인했습니다.남긴 것
GET /api/home의contactselect에 좌표·placeUrl이 여전히 빠져 있습니다(events.ts·createEvent.ts의 select에는 있음) — 이번 작업 범위 밖이라 별도 태스크로 분리했습니다.🤖 Generated with Claude Code