feat(briefing): date picker + 카드별 읽음/하이라이트 액션 #16
Reference in New Issue
Block a user
Delete Branch "feat/briefing-date-picker-and-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
사용자 요청 (2026-05-13):
Schema (migrations 263~266, 단일 statement):
API (app/api/briefing.py):
· briefing_date / total_topics / total_articles / status / read_count / highlighted_count
UI (frontend/src/routes/news/+page.svelte):
사용자 요청 (2026-05-13): - 오늘 briefing 만 보여주고 과거 못 보는 게 아쉬움 → 날짜 선택 UI - 시간대 별 나열은 오히려 불편 → date dropdown 1단계 선택 - 각 카드에 읽음/하이라이트 토글 Schema (migrations 263~266, 단일 statement): - briefing_topics.is_read BOOL NOT NULL DEFAULT false - briefing_topics.read_at TIMESTAMPTZ - briefing_topics.highlighted BOOL NOT NULL DEFAULT false - briefing_topics.highlighted_at TIMESTAMPTZ API (app/api/briefing.py): - TopicResponse 에 id / is_read / read_at / highlighted / highlighted_at 추가 - GET /api/briefing/dates → 사용 가능 날짜 목록 (60일 cap) · briefing_date / total_topics / total_articles / status / read_count / highlighted_count - PATCH /api/briefing/topics/{id}/read body {value: bool} → 읽음 토글 - PATCH /api/briefing/topics/{id}/highlight body {value: bool} → 하이라이트 토글 - 토글 시 *_at 컬럼 자동 설정/NULL UI (frontend/src/routes/news/+page.svelte): - 헤더 우측 <select> date dropdown — 최신 + N일치 (highlighted_count 별 표시) - 선택 시 /api/briefing?date=… 로 해당 날짜 briefing 로드 - 카드 우측 상단 ★ (하이라이트) + 읽음 버튼 - 하이라이트 = Card class ring-2 ring-yellow-400 - 읽음 = 외부 div class opacity-60 (시각 차분화, 펴기 가능) - 토글 즉시 PATCH 호출 + 로컬 state 갱신 each key topic.topic_rank → topic.id 변경 (이미 unique).