feat: delete a decision, manage assets while writing, and sweep before deploying

Four things an author could not do, and the check that should have caught them.

A Decision could not be deleted. Case, Reference and Question all could, so an
author who opened a decision draft had no way to close it. The contract gained
the operation and the list now offers it for every kind. Its path carries the
project because a decision belongs to one; a row with no project says so rather
than failing.

Assets could only be managed by leaving the document. The picker now deletes
one in place — the server still refuses an asset a document uses — so a
mistaken upload does not cost the author their editing session.

Zoom was decided for the author and could not be changed: only a DIAGRAM got
it, so a screenshot uploaded as an image or attachment went in with zoom off
and no way to turn it on. It now defaults on for images and the picker offers
the choice. The toggle is a picker control, not a document field, and carries
its own class — wearing the field class put it in the editor's field list.

`scripts/smoke/production-sweep.ts` walks every public and Studio screen and
the document flow, reporting console errors, failed API calls and error text.
It exists because verifying only the screen I had just changed is what let
broken screens reach production repeatedly; this runs before a deploy, not
after a report.
This commit is contained in:
DongHyeonka
2026-08-21 17:20:42 +09:00
parent 21f8425f1e
commit 89a73c13c6
16 changed files with 545 additions and 43 deletions
@@ -87,14 +87,14 @@ describe("TechLog Studio index screens", () => {
const gateway = createTechLogFeatureInstalledInput(MOCK_STUDIO_INSTALL_CONTEXT).input.createStudioGateway();
renderScreen(<DocumentList />, gateway);
expect(await screen.findByText("7개의 작업본")).toBeVisible();
expect(await screen.findByText("7개 표시 중")).toBeVisible();
fireEvent.change(screen.getByLabelText("검색"), { target: { value: "Fetch Join" } });
fireEvent.submit(screen.getByRole("search"));
expect(await screen.findByText("1개의 작업본")).toBeVisible();
expect(await screen.findByText("1개 표시 중")).toBeVisible();
expect(screen.getByText("컬렉션 Fetch Join과 페이징은 왜 충돌하는가")).toBeVisible();
fireEvent.change(screen.getByLabelText("종류"), { target: { value: "QUESTION" } });
expect(await screen.findByText("0개의 작업본")).toBeVisible();
expect(await screen.findByText("0개 표시 중")).toBeVisible();
expect(screen.getByRole("heading", { level: 2, name: "조건에 맞는 작업본이 없습니다" })).toBeVisible();
});
@@ -116,7 +116,7 @@ describe("TechLog Studio index screens", () => {
fireEvent.change(screen.getByLabelText("종류"), { target: { value: "CASE" } });
await waitFor(() => expect(obsoleteSignal?.aborted).toBe(true));
expect(await screen.findByText("1개의 작업본")).toBeVisible();
expect(await screen.findByText("1개 표시 중")).toBeVisible();
await userEvent.click(screen.getByRole("button", { name: "다음 작업본" }));
await waitFor(() => expect(listDocuments).toHaveBeenCalledTimes(3));
expect(screen.getByText(secondPage.items[0]!.title)).toBeVisible();
@@ -138,7 +138,7 @@ describe("TechLog Studio index screens", () => {
expect(await screen.findByRole("alert")).toHaveTextContent("작업본을 불러오지 못했습니다.");
await user.click(screen.getByRole("button", { name: "다시 시도" }));
expect(await screen.findByText("7개의 작업본")).toBeVisible();
expect(await screen.findByText("7개 표시 중")).toBeVisible();
expect(gateway.listDocuments).toHaveBeenCalledTimes(2);
});