Skip to content

feat(editorial,web,api-server): Published 매거진 재편집 UX 가드 (Track 5 of #448) #551

@cocoyoon

Description

@cocoyoon

Parent: #448

Context

status='published' 인 article 을 chat 으로 다시 열어 수정하는 흐름이 UI 에 없다. 백엔드는 이미 안전:

  • packages/api-server/src/domains/admin/editorial_articles.rs:373ON CONFLICT (id) DO UPDATE 로 operation snapshot UPSERT
  • 같은 article 을 다시 publish 하면 operation 레코드 갱신 (title, subtitle, layout_json, published_at, published_by 모두)

남은 작업은 운영자 UX 가드 (배너 + republish 버튼) + audit event 분리.

Scope

web (신규)

  • packages/web/lib/components/admin/editorial/magazine/RepublishBanner.tsx — 발행 시각 + 안내 + 캐시 만료 안내 (최대 5분)

web (수정)

  • packages/web/app/admin/editorial/magazine/drafts/[id]/page.tsxstatus === 'published' 일 때 RepublishBanner 노출
  • packages/web/lib/components/admin/editorial/magazine/ArticleActions.tsx — published 상태에서 버튼 라벨 "Republish" 로 변경, 활성화

api-server

  • packages/api-server/src/domains/admin/editorial_articles.rs:417 (event INSERT) — from_status='published'step='republish', note='snapshot upsert to operation' 으로 분기

ai-server

변경 없음.

재사용

  • publish_to_operation (editorial_articles.rs:327) — UPSERT idempotent, 백엔드 변경 X
  • apply_patchstatus='published'publish_to_operation 으로 분기 (editorial_articles.rs:302)
  • editorial_article_events — audit step 만 추가

DB migration

없음.

Sub-PR 분할

단일 PR: api-server event step + web RepublishBanner + ArticleActions republish 버튼 (3-4 파일).

Test

  • Unit (api-server): publish_to_operation 테스트에서 from_status='published'step='republish' 검증
  • Manual: dev 에 publish 후 chat 열어 배너 + republish 버튼 → operation snapshot update + events 에 'republish' 확인

Risk

  1. Confirm dialog 피로 — sessionStorage flag 로 article 별 1회만, 또는 배너만 (dialog 없이). 운영 피드백 보고 결정
  2. Stale 변경 표시 (out of scope) — assets.updated_at vs operation.updated_at 비교해 "변경사항 미발행" 배지. 후속 검토

Out of scope

  • Cache invalidation webhook (Track 4 의 300s ISR 로 시작)
  • Stale change detection 배지
  • Audit log UI (events 페이지)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions