fix: 요약을 2000자까지 쓰고, 목록과 머리말이 그 길이를 견디게 한다

600 은 「아래 저장 경로가 이미 600 이니 거기 맞추자」는 판단이었지 실제로
쓰는 글의 길이를 본 것이 아니었다. 요약은 여러 문단이다.

길어진 요약이 드러낸 두 가지를 함께 고친다.

목록: 최근 기록·탐색·검색·홈 초점은 요약을 통째로 그렸다. 2000자면 한
항목이 화면을 덮어 목록이 목록이 아니게 된다. 세 줄에서 자른다 — 전문은
문서를 열면 나온다.

머리말: `public-document-header` 만 `PlainText` 를 거치지 않고 요약을
그대로 넣고 있었다. 작성자가 나눈 문단이 전부 한 덩어리로 이어졌다.
판단 결정 요약에서 고쳤던 것과 같은 결함이고, 이 자리를 빠뜨렸다.
되돌리면 <br> 가 3개에서 0개가 되어 가드가 깨지는 것을 확인했다.

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-29 22:23:13 +09:00
co-authored by Claude Opus 5
parent 8fce8ea69c
commit 4e486aac59
11 changed files with 79 additions and 24 deletions
@@ -246,18 +246,18 @@ describe("TechLog Studio document editor", () => {
계약 WorkingCopyInputBase.summary 와 같은 값이어야 한다. 300 이던 시절 이 칸은 문장
중간에서 말없이 입력을 멈췄고, 쓰는 사람에게는 키보드가 고장 난 것처럼 보였다.
*/
expect(summary).toHaveAttribute("maxlength", "600");
expect(summary).toHaveAttribute("maxlength", "2000");
fireEvent.change(summary, { target: { value: "가".repeat(412) } });
expect(screen.getByText("412 / 600")).toBeInTheDocument();
expect(screen.getByText("412 / 2000")).toBeInTheDocument();
expect(
screen.queryByText(/600자까지 모두 썼습니다/),
screen.queryByText(/2000자까지 모두 썼습니다/),
).not.toBeInTheDocument();
fireEvent.change(summary, { target: { value: "가".repeat(600) } });
expect(screen.getByText("600 / 600")).toBeInTheDocument();
fireEvent.change(summary, { target: { value: "가".repeat(2000) } });
expect(screen.getByText("2000 / 2000")).toBeInTheDocument();
// 한계에 닿았을 때만 알린다 — 글자마다 읽어 주면 받아쓰기가 된다.
expect(screen.getByText(/600자까지 모두 썼습니다/)).toBeInTheDocument();
expect(screen.getByText(/2000자까지 모두 썼습니다/)).toBeInTheDocument();
// 글자 수는 칸의 이름에 섞이지 않아야 한다. 섞이면 이름이 타자마다 바뀐다.
expect(screen.getByLabelText("요약")).toBe(summary);