feat(briefing): date picker + 카드별 읽음/하이라이트 액션 #16

Merged
hyungi merged 1 commits from feat/briefing-date-picker-and-actions into main 2026-05-13 07:54:51 +09:00
Owner

사용자 요청 (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):

  • 헤더 우측 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).
사용자 요청 (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).
hyungi added 1 commit 2026-05-13 07:54:47 +09:00
사용자 요청 (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).
hyungi merged commit 38b3630492 into main 2026-05-13 07:54:51 +09:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hyungi/hyungi_document_server#16