fix: 관계 목록이 사람이 읽는 이름과 요약을 보여 준다

Reference 화면에 `supportingCases` 가 한글 라벨 없이 네 번 반복해서 나왔다.
라벨 표의 키가 계약이 실제로 주는 이름과 어긋나 있었기 때문이다 —
`originCases`·`projectDecisions` 로 적혀 있었고 계약은 `supportingCases`·
`relatedDecisions` 를 준다. 표에 없는 키는 그대로 화면에 나온다.

Question 은 같은 결함을 이미 겪고 고친 자리다(주석에 남아 있다). 이번에는
표를 상수로 빼서 계약이 주는 이름 전부가 등록됐는지 확인할 수 있게 한다.

계약은 관계마다 요약도 함께 주는데 평탄화가 그것을 버렸다. 독자가 목록에서
보는 것이 제목뿐이라, 왜 이 기록이 걸려 있는지는 눌러 봐야 알 수 있었다.
요약을 흘려보내 제목 아래 두 줄로 보여 준다.

요약은 링크의 이름에서 뺀다 — 이름에 들어가면 관계 목록을 훑을 때 링크
하나하나가 문단이 되어 목록으로서 쓸모가 없어진다.

`cardSummary` 를 domain 으로 옮긴다. 어댑터가 presentation 을 import 하는
것을 아키텍처 규칙이 막았고, 그 지적이 옳다 — 이 함수는 화면이 아니라
글을 다루는 규칙이다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
DongHyeonka
2026-08-31 11:04:42 +09:00
co-authored by Claude Opus 5
parent 6429aee74e
commit 642afa878c
13 changed files with 89 additions and 28 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ describe("검색어 강조", () => {
describe("카드 요약", () => {
it("백틱을 지우고 줄바꿈을 접는다", async () => {
const { cardSummary } = await import(
"../../src/features/tech-log/presentation/shared/card-summary.ts"
"../../src/features/tech-log/domain/content-format/card-summary.ts"
);
expect(cardSummary("모두 하나의 `로그인 상태`로 보면\n안 된다.\n\n두 번째 문단.")).toBe(
"모두 하나의 로그인 상태로 보면 안 된다. 두 번째 문단.",
@@ -54,7 +54,7 @@ describe("카드 요약", () => {
it("빈 값이면 빈 문자열을 준다", async () => {
const { cardSummary } = await import(
"../../src/features/tech-log/presentation/shared/card-summary.ts"
"../../src/features/tech-log/domain/content-format/card-summary.ts"
);
expect(cardSummary(undefined)).toBe("");
expect(cardSummary(" ")).toBe("");