fix: UX 리뷰의 출시 차단 다섯 건을 고친다

B1. 검증·미리보기 화면이 CSS 없이 배포됐다. `workflow.module.css` 를 import
하는 파일이 하나도 없었고, Vite 의 CSS Module 은 import 되어야 번들에 들어간다.
제목이 62px 가 아니라 16px 로 나왔고 미리보기의 링크 두 개가 공백 없이 붙었다.
규칙이 전부 `:global()` 이었으므로 모듈일 이유가 없다 — studio.css 로 옮겼다.

B2. Asset 라이브러리에 스타일이 없고 진입 경로도 없었다. 네 클래스에 규칙이
하나도 없어 key·상태·사용 수가 공백 없이 이어 붙었다. 스무 개짜리 목록에
썸네일도 없어 무엇을 고르는지 눌러 봐야 알았다. 내비게이션에도 없어서 URL 을
직접 쳐야 닿았다 — "정리하는 화면" 에 정리하러 갈 길이 없었다.

B3. 삭제에 확인이 없었다. 문서·주제·프로젝트·릴리즈·Asset 전부 한 번에 영구
삭제였고, 그 「삭제」가 행에서 시각적으로 가장 강한 요소였다(16px/600 빨강).
정작 그 행에서 해야 할 일인 「검증하기」는 13px/400 이었다. 확인 창을 하나
만들어 다섯 곳에 붙이고, 행의 우선순위를 되돌렸다.

B4(일부). robots.txt 가 광고하던 sitemap 이 404 였다. 무엇이 게시됐는지는
서버만 알므로 정적 파일이 아니라 조회로 만든다(백엔드 커밋 참조). robots.txt
가 그 주소를 가리키게 했다.

B5. 라우트 프리픽스 밖 URL 이 nginx 의 맨 `Not Found` 로 끝났다. 404 상태는
그대로 두고 — 크롤러에게 링크가 깨졌다고 말하는 것이 그것이다 — 본문만 앱을
주도록 `error_page 404 @not_found` 를 뒀다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTnWufiY9ATv57egkKKVAV
This commit is contained in:
DongHyeonka
2026-09-09 15:31:05 +09:00
co-authored by Claude Opus 5
parent 28dce83398
commit bb6eba00db
15 changed files with 496 additions and 125 deletions
+43 -2
View File
@@ -1,10 +1,43 @@
// @vitest-environment jsdom
import assert from "node:assert/strict";
import { expect, test } from "vitest";
import { act, render, screen, waitFor } from "@testing-library/react";
import { afterEach, beforeEach, expect, test } from "vitest";
import { act, render, screen, waitFor, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
/*
jsdom 에는 `HTMLDialogElement.prototype.showModal` 이 없다. 이 저장소의 다른 다이얼로그
테스트(studio-save-navigation, studio-publication-flow)와 같은 방식으로 채운다.
*/
const originalShowModal = HTMLDialogElement.prototype.showModal;
const originalClose = HTMLDialogElement.prototype.close;
beforeEach(() => {
Object.defineProperty(HTMLDialogElement.prototype, "showModal", {
configurable: true,
value(this: HTMLDialogElement) {
this.setAttribute("open", "");
},
});
Object.defineProperty(HTMLDialogElement.prototype, "close", {
configurable: true,
value(this: HTMLDialogElement) {
this.removeAttribute("open");
},
});
});
afterEach(() => {
Object.defineProperty(HTMLDialogElement.prototype, "showModal", {
configurable: true,
value: originalShowModal,
});
Object.defineProperty(HTMLDialogElement.prototype, "close", {
configurable: true,
value: originalClose,
});
});
import {
AssetLibrary,
canHardDelete,
@@ -151,7 +184,11 @@ test("surfaces ASSET_IN_USE when the server rejects a delete", async () => {
)} />);
await user.click(await screen.findByRole("button", { name: "boundary" }));
// 삭제는 이제 확인을 한 번 거친다. 상세의 버튼이 창을 열고, 창의 버튼이 실제로 지운다.
await user.click(await screen.findByRole("button", { name: "삭제" }));
await user.click(
within(await screen.findByRole("dialog")).getByRole("button", { name: "삭제" }),
);
assert.ok(await screen.findByText("사용 중인 Asset은 삭제할 수 없습니다."));
});
@@ -208,7 +245,11 @@ test("removes the asset and restores focus to the page heading, not the detached
render(<AssetLibrary gateway={gateway} />);
await user.click(await screen.findByRole("button", { name: "boundary" }));
// 삭제는 이제 확인을 한 번 거친다. 상세의 버튼이 창을 열고, 창의 버튼이 실제로 지운다.
await user.click(await screen.findByRole("button", { name: "삭제" }));
await user.click(
within(await screen.findByRole("dialog")).getByRole("button", { name: "삭제" }),
);
assert.ok(await screen.findByText("삭제했습니다."));
assert.equal(deleteCalls.length, 1);
@@ -29,6 +29,7 @@ describe("TechLog navigation derivation", () => {
["게시 기록", "/studio/publications"],
["새 문서", "/studio/documents/new"],
["주제·프로젝트", "/studio/taxonomy"],
["Asset", "/studio/assets"],
["릴리즈", "/studio/releases"],
]);
});
@@ -166,6 +166,7 @@ describe("TechLog route boundary contract", () => {
["TECH_LOG_STUDIO_DOCUMENTS", "STUDIO", "작업본", 10],
["TECH_LOG_STUDIO_DOCUMENT_NEW", "STUDIO", "새 문서", 30],
["TECH_LOG_STUDIO_PUBLICATIONS", "STUDIO", "게시 기록", 20],
["TECH_LOG_STUDIO_ASSETS", "STUDIO", "Asset", 45],
["TECH_LOG_STUDIO_TAXONOMY", "STUDIO", "주제·프로젝트", 40],
["TECH_LOG_STUDIO_RELEASES", "STUDIO", "릴리즈", 50],
]);
@@ -230,14 +231,18 @@ describe("TechLog route boundary contract", () => {
).toThrow();
});
it("registers the studio asset library outside primary navigation", () => {
/*
Asset 화면은 오래 내비게이션 밖에 있었다. 화면 설명은 "사용하지 않는 Asset 을 정리합니다"
인데 거기 갈 방법이 URL 직접 입력뿐이었다 — 정리하라고 만든 화면에 정리하러 갈 길이 없었다.
*/
it("registers the studio asset library in primary navigation", () => {
const route = TECH_LOG_ROUTE_REGISTRY.TECH_LOG_STUDIO_ASSETS;
expect(route).toBeTruthy();
expect(route.path).toBe("/studio/assets");
expect(route.layoutGroup).toBe("STUDIO");
expect(route.navigationLabel).toBeNull();
expect(route.navigationOrder).toBeNull();
expect(route.navigationLabel).toBe("Asset");
expect(route.navigationOrder).toBe(45);
});
it("atomically installs the complete TechLog route and runtime inventories", () => {
@@ -96,6 +96,7 @@ describe("TechLog Studio shell", () => {
["게시 기록", "/studio/publications"],
["새 문서", "/studio/documents/new"],
["주제·프로젝트", "/studio/taxonomy"],
["Asset", "/studio/assets"],
["릴리즈", "/studio/releases"],
["공개 사이트 보기", "/"],
]);