fix: Studio 리뷰 지적을 반영하고 죽은 머리말 컴포넌트를 걷어낸다
에디터 칸 이름을 공개 화면과 맞춘다. 목적→이 기준을 쓰는 이유, 규칙→판단 기준, 적용 조건→적용할 때, 예외→예외와 주의, 사실→확인한 사실, 미지수→남은 미지수, 선택지→검토한 선택지. 쓰는 사람이 지금 채우는 칸이 공개 화면 어디로 가는지 외우지 않아도 된다. 대시보드의 세 칸이 같은 목록을 세 번 반복했다. 「검증과 미리보기」와 「게시 준비」가 「이어서 작성」을 걸러 낸 부분집합인데 「이어서 작성」은 전체를 그대로 그렸기 때문이다 — 모든 문서가 같은 단계면 세 칸이 겹친다. 각 문서는 지금 서 있는 구간 한 곳에만 나온다. 릴리스에서 「상태 공개 · 공개일 2026-08-22」 옆에 「아직 공개하지 않음」이 같이 나왔다. 경로가 비었다고 미공개는 아니다 — 공개 여부는 상태가 말한다. 행에서 눈에 띄는 단 하나가 되돌릴 수 없는 동작이었다. 편집을 같은 격의 버튼으로 올리고, 삭제는 danger 로 낮추고, 격자에 자리를 만들어 다음 줄로 떨어지지 않게 한다. 게시 기록이 이미 그 모양이었다. 주제·프로젝트는 「다음: 내용 편집」을 안내하면서 그 줄의 버튼은 게시 취소와 삭제뿐이었다. 공개 프로젝트 화면이 비어 있던 이유가 여기다. 죽은 코드였던 PublicDocumentHeader 를 걷어낸다. 화면을 실제로 그리는 것은 PublicRecordRenderer 이고 그 컴포넌트는 아무도 부르지 않았다 — 어제 이 컴포넌트에 줄바꿈을 고쳐 넣었지만 화면에는 닿지 않았다. 그 자리를 지키던 가드도 진짜로 그려지는 쪽으로 옮긴다. 탭 제목과 설명에 문서를 반영한다. 공개 문서가 전부 "Reference · Tech Log" 였고 설명은 모든 화면이 "Tech Log frontend" 하나였다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
co-authored by
Claude Opus 5
parent
ca1fc92e6d
commit
82e992d066
@@ -11,6 +11,13 @@ type CatalogEntry = components["schemas"]["CatalogEntry"];
|
||||
*/
|
||||
const SUMMARY_MAX = 2000;
|
||||
|
||||
/**
|
||||
* 목록·검색 카드는 요약을 세 줄에서 자른다. 작성자에게는 그 경계가 보이지 않아서, 500자를 써도
|
||||
* 독자가 받는 것은 앞 세 줄뿐이라는 사실을 알 방법이 없었다. 정확한 글자 수는 글자 폭에 따라
|
||||
* 달라지므로 어림수로 알린다 — 여기서 필요한 것은 정밀도가 아니라 경계가 있다는 사실이다.
|
||||
*/
|
||||
const SUMMARY_CARD_PREVIEW = 90;
|
||||
|
||||
/** 이 화면이 자기 칸 아래에 보여 줄 수 있는 경로. 나머지는 게시 버튼 옆에 남는다. */
|
||||
export const COMMON_FIELD_PATHS = [
|
||||
"/title",
|
||||
@@ -48,7 +55,7 @@ export function CommonDocumentFields({
|
||||
이름이 되어 "요약 412 / 600" 처럼 타자마다 이름이 바뀐다 — 이름은 「요약」로 두고
|
||||
남은 자리는 그 옆에 따로 보여 준다.
|
||||
*/}
|
||||
<div className="studio-field studio-field--wide"><label htmlFor="studio-field-summary">요약</label><textarea id="studio-field-summary" value={draft.summary} maxLength={SUMMARY_MAX} onChange={(event) => onUpdate({ summary: event.currentTarget.value })} /><span className="studio-char-count" aria-hidden="true" data-full={draft.summary.length >= SUMMARY_MAX ? "" : undefined}>{draft.summary.length} / {SUMMARY_MAX}</span><FieldNotice issues={issues} path="/summary" /></div>
|
||||
<div className="studio-field studio-field--wide"><label htmlFor="studio-field-summary">요약</label><textarea id="studio-field-summary" value={draft.summary} maxLength={SUMMARY_MAX} onChange={(event) => onUpdate({ summary: event.currentTarget.value })} /><span className="studio-char-count" aria-hidden="true" data-full={draft.summary.length >= SUMMARY_MAX ? "" : undefined}>목록 카드에는 약 {SUMMARY_CARD_PREVIEW}자까지 보입니다 · {draft.summary.length} / {SUMMARY_MAX}</span><FieldNotice issues={issues} path="/summary" /></div>
|
||||
<label className="studio-field"><span>Topic</span><select value={draft.topicId ?? ""} onChange={(event) => onUpdate({ topicId: event.currentTarget.value || null })}><option value="">선택하지 않음</option>{topics.map((entry) => <option key={entry.id} value={entry.id}>{entry.label}</option>)}</select><FieldNotice issues={issues} path="/topicId" /></label>
|
||||
<label className="studio-field"><span>Project</span><select value={draft.projectId ?? ""} onChange={(event) => onUpdate({ projectId: event.currentTarget.value || null })}><option value="">미지정</option>{projects.map((entry) => <option key={entry.id} value={entry.id}>{entry.label}</option>)}</select><FieldNotice issues={issues} path="/projectId" /></label>
|
||||
</div>
|
||||
|
||||
@@ -294,14 +294,26 @@ export function DocumentList() {
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<button
|
||||
className="studio-secondary-button"
|
||||
type="button"
|
||||
disabled={deletingId !== null}
|
||||
onClick={() => void removeDocument(item)}
|
||||
>
|
||||
삭제
|
||||
</button>
|
||||
{/*
|
||||
편집은 제목 링크였고 삭제만 버튼이라, 행에서 눈에 띄는 단 하나가 되돌릴 수
|
||||
없는 동작이었다. 편집을 같은 격의 버튼으로 올리고 삭제는 그 옆에 둔다.
|
||||
*/}
|
||||
<div className="studio-row-actions">
|
||||
<GuardedStudioLink
|
||||
className="studio-secondary-button"
|
||||
href={`/studio/documents/${item.id}/edit`}
|
||||
>
|
||||
편집
|
||||
</GuardedStudioLink>
|
||||
<button
|
||||
className="studio-secondary-button studio-danger-button"
|
||||
type="button"
|
||||
disabled={deletingId !== null}
|
||||
onClick={() => void removeDocument(item)}
|
||||
>
|
||||
삭제
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -178,7 +178,13 @@ export function NewDocumentForm() {
|
||||
<button className="studio-primary-button" type="submit" disabled={pending}>
|
||||
{pending ? "만드는 중…" : "작업본 만들기"}
|
||||
</button>
|
||||
<p>이 화면의 작업본은 현재 Studio 세션에서만 유지됩니다.</p>
|
||||
{/*
|
||||
세션이 끊기면 쓴 것이 사라진다. 그 사실이 버튼 옆 작은 회색 글씨로만 있었다 —
|
||||
잃을 수 있는 것을 알리는 문구는 잃기 전에 눈에 들어와야 한다.
|
||||
*/}
|
||||
<p className="studio-field-warning" role="note">
|
||||
이 화면의 작업본은 현재 Studio 세션에서만 유지됩니다. 세션이 끝나면 사라집니다.
|
||||
</p>
|
||||
</div>
|
||||
{error ? (
|
||||
<p className="studio-screen-error" role="alert">
|
||||
|
||||
@@ -40,15 +40,15 @@ export function QuestionFields({ draft, evidence, issues, onChange }: { draft: Q
|
||||
if (value === "RESOLVED") update({ questionStatus: "RESOLVED", resolution: draft.resolution ?? { summary: "", evidenceTargetId: null, linkLabel: "" } });
|
||||
else update({ questionStatus: value === "OPEN" ? "OPEN" : null, resolution: null });
|
||||
}}><option value="">아직 정하지 않음</option><option value="OPEN">OPEN</option><option value="RESOLVED">RESOLVED</option></select><FieldNotice issues={issues} path="/questionStatus" /></label>
|
||||
<OrderedTextList label="사실" fieldId="studio-field-facts" items={draft.facts} onChange={(facts) => update({ facts })} />
|
||||
<OrderedTextList label="확인한 사실" fieldId="studio-field-facts" items={draft.facts} onChange={(facts) => update({ facts })} />
|
||||
<FieldNotice issues={issues} path="/facts" />
|
||||
<OrderedTextList label="가정" fieldId="studio-field-assumptions" items={draft.assumptions} onChange={(assumptions) => update({ assumptions })} />
|
||||
<FieldNotice issues={issues} path="/assumptions" />
|
||||
<OrderedTextList label="미지수" fieldId="studio-field-unknowns" items={draft.unknowns} onChange={(unknowns) => update({ unknowns })} />
|
||||
<OrderedTextList label="남은 미지수" fieldId="studio-field-unknowns" items={draft.unknowns} onChange={(unknowns) => update({ unknowns })} />
|
||||
<FieldNotice issues={issues} path="/unknowns" />
|
||||
<OrderedTextList label="제약" fieldId="studio-field-constraints" items={draft.constraints} onChange={(constraints) => update({ constraints })} />
|
||||
<FieldNotice issues={issues} path="/constraints" />
|
||||
<fieldset id="studio-field-options" className="studio-ordered-list" tabIndex={-1}><legend>선택지</legend>
|
||||
<fieldset id="studio-field-options" className="studio-ordered-list" tabIndex={-1}><legend>검토한 선택지</legend>
|
||||
<FieldNotice issues={issues} path="/options" />
|
||||
{draft.options.length === 0 ? <p>아직 입력한 선택지가 없습니다.</p> : null}
|
||||
{draft.options.map((option, index) => <div className="studio-ordered-item" key={option.id}>
|
||||
|
||||
@@ -32,20 +32,20 @@ export function ReferenceFields({ draft, issues, onChange }: { draft: ReferenceI
|
||||
return (
|
||||
<section className="studio-editor-section" aria-labelledby="studio-reference-fields-title">
|
||||
<div className="studio-editor-section-heading"><p className="studio-eyebrow">REFERENCE</p><h2 id="studio-reference-fields-title">재사용할 기준</h2></div>
|
||||
<label className="studio-field studio-field--wide"><span>목적</span><textarea value={draft.purpose} onChange={(event) => update({ purpose: event.currentTarget.value })} /><FieldNotice issues={issues} path="/purpose" /></label>
|
||||
<fieldset className="studio-ordered-list"><legend>규칙</legend>
|
||||
<label className="studio-field studio-field--wide"><span>이 기준을 쓰는 이유</span><textarea value={draft.purpose} onChange={(event) => update({ purpose: event.currentTarget.value })} /><FieldNotice issues={issues} path="/purpose" /></label>
|
||||
<fieldset className="studio-ordered-list"><legend>판단 기준</legend>
|
||||
<FieldNotice issues={issues} path="/rules" />
|
||||
{draft.rules.length === 0 ? <p>아직 입력한 규칙이 없습니다.</p> : null}
|
||||
{draft.rules.length === 0 ? <p>아직 입력한 판단 기준이 없습니다.</p> : null}
|
||||
{draft.rules.map((rule, index) => <div className="studio-ordered-item" key={rule.id}>
|
||||
<label><span>규칙 {index + 1} 제목</span><input value={rule.title} onChange={(event) => update({ rules: orderedRules(draft.rules.map((candidate, candidateIndex) => candidateIndex === index ? { ...candidate, title: event.currentTarget.value } : candidate)) })} /></label>
|
||||
<label><span>규칙 {index + 1} 본문</span><textarea value={rule.body} onChange={(event) => update({ rules: orderedRules(draft.rules.map((candidate, candidateIndex) => candidateIndex === index ? { ...candidate, body: event.currentTarget.value } : candidate)) })} /></label>
|
||||
<label><span>판단 기준 {index + 1} 제목</span><input value={rule.title} onChange={(event) => update({ rules: orderedRules(draft.rules.map((candidate, candidateIndex) => candidateIndex === index ? { ...candidate, title: event.currentTarget.value } : candidate)) })} /></label>
|
||||
<label><span>판단 기준 {index + 1} 본문</span><textarea value={rule.body} onChange={(event) => update({ rules: orderedRules(draft.rules.map((candidate, candidateIndex) => candidateIndex === index ? { ...candidate, body: event.currentTarget.value } : candidate)) })} /></label>
|
||||
<div className="studio-item-actions"><button type="button" onClick={() => moveRule(index, -1)} disabled={index === 0}>위로</button><button type="button" onClick={() => moveRule(index, 1)} disabled={index === draft.rules.length - 1}>아래로</button><button type="button" onClick={() => update({ rules: orderedRules(draft.rules.filter((_, candidateIndex) => candidateIndex !== index)) })}>삭제</button></div>
|
||||
</div>)}
|
||||
<button className="studio-add-item" type="button" disabled={draft.rules.length >= 50} onClick={() => { if (draft.rules.length < 50) update({ rules: orderedRules([...draft.rules, { id: createNewItemId(), title: "", body: "", order: draft.rules.length }]) }); }}>규칙 추가</button>
|
||||
<button className="studio-add-item" type="button" disabled={draft.rules.length >= 50} onClick={() => { if (draft.rules.length < 50) update({ rules: orderedRules([...draft.rules, { id: createNewItemId(), title: "", body: "", order: draft.rules.length }]) }); }}>판단 기준 추가</button>
|
||||
</fieldset>
|
||||
<OrderedTextList label="적용 조건" items={draft.applyWhen} onChange={(applyWhen) => update({ applyWhen })} />
|
||||
<OrderedTextList label="적용할 때" items={draft.applyWhen} onChange={(applyWhen) => update({ applyWhen })} />
|
||||
<FieldNotice issues={issues} path="/applyWhen" />
|
||||
<OrderedTextList label="예외" items={draft.exceptions} onChange={(exceptions) => update({ exceptions })} />
|
||||
<OrderedTextList label="예외와 주의" items={draft.exceptions} onChange={(exceptions) => update({ exceptions })} />
|
||||
<FieldNotice issues={issues} path="/exceptions" />
|
||||
<OrderedTextList label="예시" items={draft.examples} onChange={(examples) => update({ examples })} />
|
||||
<FieldNotice issues={issues} path="/examples" />
|
||||
|
||||
@@ -208,7 +208,14 @@ export function ReleaseManager() {
|
||||
<p className="studio-row-label">RELEASE</p>
|
||||
<div className="studio-document-title">
|
||||
<h2>{release.title}</h2>
|
||||
<p>{release.publication.canonicalPath ?? "아직 공개하지 않음"}</p>
|
||||
{/*
|
||||
경로가 비었다고 미공개는 아니다. 예전에는 한 줄 안에서 「상태 공개 · 공개일
|
||||
2026-08-22」 옆에 「아직 공개하지 않음」 이 같이 나왔다 — 공개 사이트에는
|
||||
실제로 올라가 있었으므로 뒤쪽이 틀렸다. 공개 여부는 아래 「상태」가 말한다.
|
||||
*/}
|
||||
{release.publication.canonicalPath ? (
|
||||
<p>{release.publication.canonicalPath}</p>
|
||||
) : null}
|
||||
</div>
|
||||
<dl>
|
||||
<div>
|
||||
@@ -232,7 +239,7 @@ export function ReleaseManager() {
|
||||
편집
|
||||
</GuardedStudioLink>
|
||||
<button
|
||||
className="studio-secondary-button"
|
||||
className="studio-secondary-button studio-danger-button"
|
||||
type="button"
|
||||
disabled={pending}
|
||||
onClick={() => void remove(release)}
|
||||
|
||||
@@ -89,10 +89,23 @@ export function StudioDashboard() {
|
||||
return () => controller.abort();
|
||||
}, [gateway]);
|
||||
|
||||
const validationItems =
|
||||
dashboard?.continueWriting.filter((item) =>
|
||||
["VALIDATE", "FIX_VALIDATION", "CREATE_PREVIEW"].includes(item.nextAction),
|
||||
) ?? [];
|
||||
/*
|
||||
세 칸은 한 줄기의 서로 다른 구간이다. 예전에는 「검증과 미리보기」와 「게시 준비」가
|
||||
「이어서 작성」을 걸러 낸 부분집합이면서 「이어서 작성」이 전체를 그대로 그렸다. 그래서 모든
|
||||
문서가 같은 단계에 있으면 세 칸이 같은 목록을 세 번 반복했다 — 대시보드의 60%가 같은 제목
|
||||
다섯 개였고, 두 칸은 구분조차 되지 않았다.
|
||||
|
||||
각 문서는 지금 서 있는 구간 한 곳에만 나온다.
|
||||
*/
|
||||
const VALIDATION_ACTIONS = ["VALIDATE", "FIX_VALIDATION", "CREATE_PREVIEW"];
|
||||
const continueWriting = dashboard?.continueWriting ?? [];
|
||||
const validationItems = continueWriting.filter((item) =>
|
||||
VALIDATION_ACTIONS.includes(item.nextAction),
|
||||
);
|
||||
const readyIds = new Set((dashboard?.readyToPublish ?? []).map((item) => item.id));
|
||||
const writingItems = continueWriting.filter(
|
||||
(item) => !VALIDATION_ACTIONS.includes(item.nextAction) && !readyIds.has(item.id),
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="studio-page studio-dashboard-page">
|
||||
@@ -138,7 +151,7 @@ export function StudioDashboard() {
|
||||
</section>
|
||||
<WorkSection
|
||||
title="이어서 작성"
|
||||
items={dashboard.continueWriting}
|
||||
items={writingItems}
|
||||
href="/studio/documents"
|
||||
empty="이어서 작성할 문서가 없습니다."
|
||||
/>
|
||||
|
||||
@@ -292,14 +292,16 @@ export function TaxonomyManager() {
|
||||
<dd>{topic.status === "ARCHIVED" ? "보관" : "활성"}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<button
|
||||
className="studio-secondary-button"
|
||||
type="button"
|
||||
disabled={pending}
|
||||
onClick={() => void removeTopic(topic)}
|
||||
>
|
||||
삭제
|
||||
</button>
|
||||
<div className="studio-row-actions">
|
||||
<button
|
||||
className="studio-secondary-button studio-danger-button"
|
||||
type="button"
|
||||
disabled={pending}
|
||||
onClick={() => void removeTopic(topic)}
|
||||
>
|
||||
삭제
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
@@ -349,6 +351,17 @@ export function TaxonomyManager() {
|
||||
</div>
|
||||
</dl>
|
||||
<div className="studio-row-actions">
|
||||
{/*
|
||||
「다음: 내용 편집」 을 안내하면서 정작 그 줄의 버튼은 게시 취소와 삭제뿐이라,
|
||||
편집 진입점이 작은 텍스트 링크로만 있었다. 공개 프로젝트 화면이 비어 있던
|
||||
이유가 여기다 — 쓰라고 안내하고 쓸 자리를 눈에 띄게 주지 않았다.
|
||||
*/}
|
||||
<GuardedStudioLink
|
||||
className="studio-secondary-button"
|
||||
href={`/studio/projects/${project.id}`}
|
||||
>
|
||||
내용 편집
|
||||
</GuardedStudioLink>
|
||||
<button
|
||||
className="studio-secondary-button"
|
||||
type="button"
|
||||
@@ -358,7 +371,7 @@ export function TaxonomyManager() {
|
||||
{project.targetVisibility === "PRIVATE" ? "게시" : "게시 취소"}
|
||||
</button>
|
||||
<button
|
||||
className="studio-secondary-button"
|
||||
className="studio-secondary-button studio-danger-button"
|
||||
type="button"
|
||||
disabled={pending}
|
||||
onClick={() => void removeProject(project)}
|
||||
|
||||
Reference in New Issue
Block a user