feat(supporters): 승인 UI·입력 반영·워커 — §7-5 ClinicInputsPanel + supporter_builds/inputs 마이그레이션 + apply_inputs, §12-2 상단 고지·개설자 승인·색인 빌드 필터, §7-6 워커 E2E(뷰성형외과 URL → 5편 → 게이트 0오류)

- 게이트: DISCLOSURE_TOP_MISSING, APPROVED_*, UNAPPROVED_IN_INDEXABLE_BUILD, PRESS_VOICE 규칙화, 픽스처 추가 (16/16)
- 생성기: --site 옵션, 병원 확인 답변(clinicAnswers) 근거 [A]
- default_briefs.mjs 첫 배치 자동 기획, workers/supporters-build/run.mjs
- 랜딩: SAMPLE REPORT 라벨 "실제 사례"로 (haewon 지시)
- v2 §11-6·§11-7 기록, E2E 리포트

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Fable 5.1 committed 2026-09-07 17:07:06 +09:00
1 parent 64a3bce9a3
commit 7e515b70ae
56 files changed
+2530 -41

No files matched your search

@@ -0,0 +1,6 @@
---
// 글 첫 부분의 지원 관계 고지 (v2 §12-2, 추천·보증 심사지침: 제목 또는 첫 부분에 표시).
// site.sponsorNotice 가 비어 있으면 아무것도 렌더하지 않는다. 켜는 것은 haewon 승인 후.
import { SPONSOR_NOTICE } from '../lib';
---
{SPONSOR_NOTICE && <p class="disclosure disclosure-top">{SPONSOR_NOTICE}</p>}
+2
View File
@@ -15,6 +15,8 @@ const posts = defineCollection({
reviewer: z.string().optional(), // 감수자 id (physicians)
reviewStatus: z.enum(['reviewed', 'pending']).default('pending'),
reviewedAt: z.string().optional(), // 의학 검토 완료일. reviewed일 때 필수로 쓴다
approvedBy: z.string().optional(), // 게시 승인자(의료기관 개설자·직함). v2 §12-2. 병원 입력으로만 채운다
approvedAt: z.string().optional(), // 게시 승인일. 색인 허용 빌드(PUBLIC_INDEXABLE=true)는 이 값이 있는 글만 낸다
datePublished: z.string(),
dateModified: z.string(),
video: z.object({ id: z.string(), title: z.string(), channel: z.string(), speaker: z.string().optional(), published: z.string().optional() }).optional(),
+4
View File
@@ -0,0 +1,4 @@
{
"_comment": "병원이 서면으로 확인해 준 답변(v2 §6 4~7항). apply_inputs.mjs 가 채우고 생성기가 근거 [A]로 쓴다. 화면에는 직접 노출하지 않는다.",
"items": []
}
+5
View File
@@ -15,6 +15,11 @@ export const CATEGORY_LABELS: Record<string, string> = {
export { fact, authors, site };
/** 지원 관계 고지(글 첫 부분). site.sponsorNotice 가 비어 있으면 상단 고지를 렌더하지 않는다(v2 §12-2, haewon 승인 후 켠다). */
export const SPONSOR_NOTICE: string = (site as AnyRec).sponsorNotice || '';
/** 색인 허용 빌드에서는 개설자 게시 승인(approvedAt)이 있는 글만 낸다. 미리보기(noindex)는 전부. */
export const isPublishable = (p: { data: { approvedAt?: string } }): boolean => !INDEXABLE || has(p.data.approvedAt);
/** 비어 있으면 PENDING. 화면 표시용. */
export const v = (x: unknown, fallback: string = PENDING): string => (x === null || x === undefined || x === '' ? fallback : String(x));
/** 비어 있지 않은 값만. 스키마·링크용. */
+2 -2
View File
@@ -2,13 +2,13 @@
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
import PostCard from '../../components/PostCard.astro';
import { authors, personSchema } from '../../lib';
import { authors, personSchema, isPublishable } from '../../lib';
export async function getStaticPaths() {
return Object.keys(authors.supporters).map((id) => ({ params: { id } }));
}
const { id } = Astro.params;
const a = (authors.supporters as Record<string, any>)[id!];
const posts = (await getCollection('posts')).filter((p) => p.data.author === id);
const posts = (await getCollection('posts')).filter(isPublishable).filter((p) => p.data.author === id);
const site = Astro.site!.toString().replace(/\/$/, '');
---
<Base title={`${a.name} · 작성 글`} description={a.bio} jsonLd={personSchema(id!, site)}>
+2 -2
View File
@@ -5,8 +5,8 @@ import PostCard from '../components/PostCard.astro';
import FactBlock from '../components/FactBlock.astro';
import VideoLite from '../components/VideoLite.astro';
import Gallery from '../components/Gallery.astro';
import { SITE_NAME, fact, site as S, clinicSchema, surface, v, has, PENDING } from '../lib';
const posts = (await getCollection('posts')).sort((a, b) => b.data.dateModified.localeCompare(a.data.dateModified));
import { SITE_NAME, fact, site as S, clinicSchema, surface, v, has, PENDING, isPublishable } from '../lib';
const posts = (await getCollection('posts')).filter(isPublishable).sort((a, b) => b.data.dateModified.localeCompare(a.data.dateModified));
const site = Astro.site!.toString().replace(/\/$/, '');
const f = fact as Record<string, any>;
const clinic = v(f.shortName, '병원');
+5 -2
View File
@@ -11,10 +11,11 @@ import Sources from '../../components/Sources.astro';
import History from '../../components/History.astro';
import Disclosure from '../../components/Disclosure.astro';
import FactBlock from '../../components/FactBlock.astro';
import { CATEGORY_LABELS, SITE_NAME, clinicSchema, personSchema, physicianSchema, physician, supporter, fact, surface } from '../../lib';
import DisclosureTop from '../../components/DisclosureTop.astro';
import { CATEGORY_LABELS, SITE_NAME, clinicSchema, personSchema, physicianSchema, physician, supporter, fact, surface, isPublishable } from '../../lib';
export async function getStaticPaths() {
const posts = await getCollection('posts');
const posts = (await getCollection('posts')).filter(isPublishable);
return posts.map((post) => ({ params: { id: post.id }, props: { post } }));
}
const { post } = Astro.props;
@@ -60,10 +61,12 @@ if (d.faq.length) graph.push({ '@type': 'FAQPage', '@id': `${url}#faq`, mainEnti
<span>작성 {supporter(d.author).name}</span>
{reviewer && <span>{d.reviewStatus === 'reviewed' ? '의학 검토' : '설명'} {reviewer.name} {reviewer.title.split(' · ')[0]}{d.reviewStatus === 'reviewed' && d.reviewedAt ? ` (${d.reviewedAt})` : ''}</span>}
{d.reviewStatus !== 'reviewed' && <span>의학 검토 대기</span>}
{d.approvedAt && <span>게시 승인 {d.approvedBy ?? ''} ({d.approvedAt})</span>}
<span>발행 {d.datePublished}</span>
<span>갱신 {d.dateModified}</span>
</div>
</header>
<DisclosureTop />
<Summary items={d.summary} />
{d.hero && (
<figure class="figure">
+2 -2
View File
@@ -2,8 +2,8 @@
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
import PostCard from '../../components/PostCard.astro';
import { CATEGORY_LABELS, SITE_NAME, fact, v } from '../../lib';
const posts = (await getCollection('posts')).sort((a, b) => b.data.dateModified.localeCompare(a.data.dateModified));
import { CATEGORY_LABELS, SITE_NAME, fact, v, isPublishable } from '../../lib';
const posts = (await getCollection('posts')).filter(isPublishable).sort((a, b) => b.data.dateModified.localeCompare(a.data.dateModified));
const cats = Object.keys(CATEGORY_LABELS);
const site = Astro.site!.toString().replace(/\/$/, '');
const ld = { '@type': 'CollectionPage', '@id': `${site}/posts#page`, name: '전체 글', url: `${site}/posts`, inLanguage: 'ko', publisher: { '@type': 'Organization', name: SITE_NAME, url: site }, hasPart: posts.map((p) => ({ '@type': 'Article', headline: p.data.title, url: `${site}/posts/${p.id}`, dateModified: p.data.dateModified })) };
+2 -1
View File
@@ -1,9 +1,10 @@
import type { APIRoute } from 'astro';
import { isPublishable } from '../lib';
import { getCollection } from 'astro:content';
import authors from '../data/authors.json';
export const GET: APIRoute = async ({ site }) => {
const base = site!.toString().replace(/\/$/, '');
const posts = await getCollection('posts');
const posts = (await getCollection('posts')).filter(isPublishable);
const today = new Date().toISOString().slice(0, 10);
const urls = [
{ loc: `${base}/`, lastmod: today },