feat(documents): §2 카테고리 전용 페이지 + 승인 UI #2

Merged
hyungi merged 1 commits from feature/section2-dedicated-pages into main 2026-04-23 15:40:19 +09:00
Owner

plan: ~/.claude/plans/luminous-sprouting-hamster.md §2

Scope

  • GET /api/documents/stats/category-counts — Sidebar/Dashboard 용 카테고리 집계 + library_pending_suggestions
  • DocumentResponse.category / ai_suggestion 노출 (§1 과 병합 · UI 소비용)
  • SuggestionReview.svelte 신규 — 승인 대기함 카드 리스트, 단건/대량 승인, 409 stale toast + refetch
  • /library 상단에 SuggestionReview 삽입 (자료실 + 승인 대기함 역할 겸임)
  • Sidebar 카테고리 내비 재구성 (문서/자료실[pending 배지]/뉴스/메모/검색). audio/video 자리는 §3 주석 예약

§1 계약 맞물림 (코드 상 검증)

  • has_suggestion=true&proposed_category=library 필터 ✓
  • POST /accept-suggestion body {expected_source_updated_at} + 409 두 벡터 ✓
  • DELETE /suggestion 204 ✓
  • DocumentResponse 에 category / ai_suggestion 노출 ✓

DoD — 배포 후 smoke

  • /library 상단 제안 섹션에 §1 backfill 결과로 발주서/계산서 노출
  • 1-click 승인 → category=library + @library/... 태그 + suggestion NULL
  • 다른 탭에서 title PATCH 후 accept → 409 toast + 자동 refetch
  • Sidebar 카테고리 배지 = /api/documents/stats/category-counts 응답 일치
  • /search 회귀 OK (건드린 파일 없음)

Merge

Gitea UI Rebase and merge (memory 정책).

plan: `~/.claude/plans/luminous-sprouting-hamster.md` §2 ## Scope - `GET /api/documents/stats/category-counts` — Sidebar/Dashboard 용 카테고리 집계 + `library_pending_suggestions` - `DocumentResponse.category` / `ai_suggestion` 노출 (§1 과 병합 · UI 소비용) - `SuggestionReview.svelte` 신규 — 승인 대기함 카드 리스트, 단건/대량 승인, 409 stale toast + refetch - `/library` 상단에 SuggestionReview 삽입 (자료실 + 승인 대기함 역할 겸임) - Sidebar 카테고리 내비 재구성 (문서/자료실[pending 배지]/뉴스/메모/검색). audio/video 자리는 §3 주석 예약 ## §1 계약 맞물림 (코드 상 검증) - `has_suggestion=true&proposed_category=library` 필터 ✓ - POST `/accept-suggestion` body `{expected_source_updated_at}` + 409 두 벡터 ✓ - DELETE `/suggestion` 204 ✓ - DocumentResponse 에 category / ai_suggestion 노출 ✓ ## DoD — 배포 후 smoke - [ ] `/library` 상단 제안 섹션에 §1 backfill 결과로 발주서/계산서 노출 - [ ] 1-click 승인 → category=library + `@library/...` 태그 + suggestion NULL - [ ] 다른 탭에서 title PATCH 후 accept → 409 toast + 자동 refetch - [ ] Sidebar 카테고리 배지 = `/api/documents/stats/category-counts` 응답 일치 - [ ] `/search` 회귀 OK (건드린 파일 없음) ## Merge Gitea UI Rebase and merge (memory 정책).
hyungi added 1 commit 2026-04-23 15:40:11 +09:00
plan: ~/.claude/plans/luminous-sprouting-hamster.md §2

- GET /api/documents/stats/category-counts — Sidebar/Dashboard 용
  카테고리별 문서 건수 + library_pending_suggestions
- DocumentResponse 에 category / ai_suggestion 필드 노출 (§1 과 동일
  수정, rebase 시 합쳐짐)
- SuggestionReview.svelte 신규 — ai_suggestion.proposed_category='library'
  제안 카드 리스트. 단건 승인/반려 + 체크박스 대량 승인. 409 stale 시
  warning toast + 자동 refetch
- /library 상단에 SuggestionReview 배치 (자료실 + 승인 대기함 겸).
  승인/반려 후 tree/docs/facet 재조회
- Sidebar 재구성: 카테고리 내비(문서/자료실/뉴스/메모/검색) + 자료실
  pending 배지. /api/documents/stats/category-counts 바인딩. audio/video
  자리는 §3 주석 예약

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hyungi merged commit a93d1689d8 into main 2026-04-23 15:40:19 +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#2