feat: show the way to publish, and what is blocking it, in the editor

Publishing was reachable only by walking the whole chain blind. The editor
offered one link — "저장본 검증" — and the word "게시" appeared nowhere until
three screens later, so an author with a finished draft could not tell how to
publish it. The working-copy list already named the next step, but the name was
plain text with nowhere to go.

The editor now shows the whole path: 검증 → 미리보기 → 게시, each a link. The
list's next step is a link to that step. Neither weakens the gates — an
unvalidated document is still refused at preview, an unpreviewed one at
publish. What changes is that the order stops being a secret.

What is blocking publication now appears where it gets fixed. The validation
report lived on its own screen, so an author read the list, navigated back, and
had to remember which field each item meant. The editor shows the same issues
above the fields, in red, and says plainly when they describe an older saved
version rather than the current one.

The clock is read during render, not captured as an effect dependency. It is a
new function on every render of the provider, so depending on it refetched the
document endlessly — the editor never settled, and a tab click did not even
register. A value you are asking about now does not belong in a dependency
array.
This commit is contained in:
DongHyeonka
2026-08-21 18:43:10 +09:00
parent fb478f951b
commit 7345500ef3
7 changed files with 153 additions and 7 deletions
@@ -62,6 +62,35 @@ export function DocumentEditor({
<h1>문서 편집</h1>
<p>{controller.draft.title || "제목 없는 작업본"}</p>
</header>
{/*
게시를 막는 것이 무엇인지 고치는 자리에서 보여 준다. 예전에는 별도 검증 화면으로
나가야만 알 수 있었고, 돌아와서는 어느 칸이었는지 기억해야 했다.
검증은 저장된 버전을 기준으로 도므로 이 목록도 그 버전의 것이다 — 저장한 뒤 다시
검증하기 전까지는 방금 고친 것이 아직 반영되지 않는다. 그 사실을 숨기지 않는다.
*/}
{controller.validation && controller.validation.issues.length ? (
<section
className={`studio-editor-validation${controller.validation.current ? "" : " studio-editor-validation--stale"}`}
role={controller.validation.current ? "alert" : "status"}
aria-label="검증에서 지적된 항목"
>
<p className="studio-editor-validation-title">
{controller.validation.current
? "게시하려면 아래를 채워야 합니다"
: `버전 ${controller.validation.version} 검사에서 지적된 항목입니다 — 저장 후 다시 검증하면 갱신됩니다`}
</p>
<ul>
{controller.validation.issues.map((issue) => (
<li key={`${issue.code}-${issue.path}`} data-severity={issue.severity}>
<span>{issue.severity === "ERROR" ? "필수" : "확인"}</span>
{issue.message}
<code>{issue.path}</code>
</li>
))}
</ul>
</section>
) : null}
<CommonDocumentFields draft={controller.draft} topics={topics} projects={projects} relations={relations} onUpdate={controller.update} />
{controller.draft.kind === "CASE"
? <CaseFields draft={controller.draft} onChange={controller.replace} onAssetsObserved={onAssetsObserved} onAssetUploaded={onAssetUploaded} />