fix: 홈의 「지금 집중하는 것」이 단계를 사람 말로 적는다

새로 찍은 화면에서 드러났다. 홈은 `DESIGN` 이라는 저장값을 그대로 찍고 있었고,
프로젝트 화면은 같은 값을 「설계」로 부르고 있었다 — 한 사이트가 같은 것을 두 이름으로
말했다. 활동 종류에서 겪은 것과 같은 실수다.

이름표를 도메인으로 옮긴다. 어댑터는 표현 계층을 import 할 수 없고(경계 규칙), 이름표를
어댑터마다 다시 적으면 정확히 이 문제가 다시 난다. 단계 집합도 도메인이 갖게 해서 포트가
그것을 쓰도록 했다 — 같은 집합을 두 곳에 적으면 한쪽만 늘어난다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015c8cBFUaVr7KLVUx6ujz7D
This commit is contained in:
DongHyeonka
2026-09-15 21:12:34 +09:00
co-authored by Claude Opus 5
parent 9b5ca09f30
commit 623a58942f
10 changed files with 29 additions and 14 deletions
@@ -1,5 +1,5 @@
import { Link } from "react-router-dom";
import { projectStageLabel } from "../../shared/project-phase-labels.ts";
import { projectStageLabel } from "../../../domain/public/project-phase-labels.ts";
import { TECH_LOG_FEATURE_ID } from "../../../application/tech-log-feature-input.ts";
import { publicSiteConfig } from "../../../contracts/public-site-config.ts";
@@ -1,5 +1,5 @@
import { Link } from "react-router-dom";
import { projectStageLabel } from "../../shared/project-phase-labels.ts";
import { projectStageLabel } from "../../../domain/public/project-phase-labels.ts";
import {
RegisteredNotFoundRoute,
@@ -1,5 +1,5 @@
import { Link } from "react-router-dom";
import { projectStageLabel } from "../../shared/project-phase-labels.ts";
import { projectStageLabel } from "../../../domain/public/project-phase-labels.ts";
import { usePublicContent } from "../use-public-content.tsx";
@@ -1,37 +0,0 @@
import type { Project } from "../../application/ports/public-content-queries.ts";
/**
* 프로젝트가 지금 어디까지 왔는지를 사람에게 보여 주는 이름.
*
* <p>이 표가 없던 동안 공개 화면은 `DESIGN` 이라는 낱말을 그대로 그렸다. 한국어 화면의 영어
* 단어였고, 같은 프로젝트를 Studio 는 「설계」로 불렀다 — 두 화면이 서로 다른 말을 했다.
*
* <p>Studio 와 공개 화면이 다루는 값 자체가 다르다. Studio 는 저장하는 단계 일곱을 그대로
* 쓰고(`project_phase_check`), 공개 조회는 그것을 둘로 접어 준다. 그래서 표도 둘이다 —
* 하나로 합치면 없는 값을 화면에 노출하거나 저장이 제약에서 터진다.
*/
export const PROJECT_PHASE_LABELS: Record<string, string> = {
RESEARCH: "조사",
DESIGN: "설계",
IMPLEMENTATION: "구현",
VERIFICATION: "검증",
MAINTENANCE: "유지",
PAUSED: "중단",
COMPLETED: "완료",
};
/**
* 공개 조회가 접어서 주는 단계.
*
* <p>`Record<Project["stage"], string>` 이므로 계약이 값을 늘리면 여기가 비어 있는 것을
* 컴파일러가 잡는다.
*/
export const PROJECT_STAGE_LABELS: Record<Project["stage"], string> = {
DESIGN: "설계",
VALIDATION: "검증",
};
/** 모르는 값이 오면 원문을 그대로 보여 준다 — 빈 칸보다 낫고, 무엇이 빠졌는지도 드러난다. */
export function projectStageLabel(stage: string): string {
return PROJECT_STAGE_LABELS[stage as Project["stage"]] ?? PROJECT_PHASE_LABELS[stage] ?? stage;
}
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState, type FormEvent } from "react";
import { PROJECT_PHASE_LABELS } from "../../shared/project-phase-labels.ts";
import { PROJECT_PHASE_LABELS } from "../../../domain/public/project-phase-labels.ts";
import type { components } from "../../../contracts/studio/generated.ts";
import type {
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState, type FormEvent } from "react";
import { PROJECT_PHASE_LABELS } from "../../shared/project-phase-labels.ts";
import { PROJECT_PHASE_LABELS } from "../../../domain/public/project-phase-labels.ts";
import { DestructiveConfirmDialog } from "./destructive-confirm-dialog.tsx";
import type { ProjectIndexItem, TopicEdit } from "../../../contracts/management/contract.ts";