From 59332659752ee17c095471d06e7f0fc8b00c89b4 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sat, 15 Aug 2026 23:41:34 +0900 Subject: [PATCH] feat: port TechLog Studio editors --- .../task-11-report.md | 33 +++ .../studio/components/case-fields.tsx | 20 ++ .../components/common-document-fields.tsx | 33 +++ .../components/document-editor-screen.tsx | 110 ++++++++ .../studio/components/document-editor.tsx | 78 ++++++ .../components/document-status-rail.tsx | 24 ++ .../studio/components/instant-preview.tsx | 52 ++++ .../studio/components/ordered-text-list.tsx | 31 +++ .../components/publication-flow-classes.ts | 38 +++ .../studio/components/question-fields.tsx | 51 ++++ .../studio/components/reference-fields.tsx | 40 +++ .../studio/components/relation-editor.tsx | 34 +++ .../studio/pages/document-edit-page.tsx | 7 + .../presentation/studio/studio-provider.tsx | 38 ++- .../presentation/studio/use-studio.ts | 40 ++- .../tech-log/studio-editor-smoke.test.tsx | 253 ++++++++++++++++++ 16 files changed, 879 insertions(+), 3 deletions(-) create mode 100644 .superpowers/sdd/2026-08-15-techlog-ui-migration/task-11-report.md create mode 100644 src/features/tech-log/presentation/studio/components/case-fields.tsx create mode 100644 src/features/tech-log/presentation/studio/components/common-document-fields.tsx create mode 100644 src/features/tech-log/presentation/studio/components/document-editor-screen.tsx create mode 100644 src/features/tech-log/presentation/studio/components/document-editor.tsx create mode 100644 src/features/tech-log/presentation/studio/components/document-status-rail.tsx create mode 100644 src/features/tech-log/presentation/studio/components/instant-preview.tsx create mode 100644 src/features/tech-log/presentation/studio/components/ordered-text-list.tsx create mode 100644 src/features/tech-log/presentation/studio/components/publication-flow-classes.ts create mode 100644 src/features/tech-log/presentation/studio/components/question-fields.tsx create mode 100644 src/features/tech-log/presentation/studio/components/reference-fields.tsx create mode 100644 src/features/tech-log/presentation/studio/components/relation-editor.tsx create mode 100644 src/features/tech-log/presentation/studio/pages/document-edit-page.tsx create mode 100644 tests/features/tech-log/studio-editor-smoke.test.tsx diff --git a/.superpowers/sdd/2026-08-15-techlog-ui-migration/task-11-report.md b/.superpowers/sdd/2026-08-15-techlog-ui-migration/task-11-report.md new file mode 100644 index 0000000..0e47dcc --- /dev/null +++ b/.superpowers/sdd/2026-08-15-techlog-ui-migration/task-11-report.md @@ -0,0 +1,33 @@ +# Task 11 report + +## Mapping + +- Source common, Case, Reference, and Question fields → exact target labels, controls, order, loaded values, conditional resolution fields, and CSS classes. +- Source ordered text/rule/option/relation editors → presentation-owned add, remove, reorder, local IDs, limits, and accessibility names. +- Source document editor/status rail → source tabs, keyboard focus, working-copy status, dirty indicator, version/kind rail, and deferred workflow controls. +- Source instant preview → Content Format v1 `projectWorkingCopy` plus the shared `PublicRecordRenderer`; no gateway preview mutation or parser/renderer duplication. +- Source edit page → registered route input adaptation for the document ID. +- Task 10 provider seam → smallest generic provider-owned editor session (`saved`, `draft`, `status`) retained across editor tabs. + +## TDD evidence + +- RED: `corepack pnpm exec vitest run tests/features/tech-log/studio-editor-smoke.test.tsx` failed at the exact missing `document-editor-screen.tsx` import before test collection. +- First GREEN: the same focused command passed 1 file / 5 tests. +- Focused regression: editor smoke plus `content-format.test.ts` and `public-render.test.tsx` passed 3 files / 41 tests. +- Scope check: `git diff --check` passed. + +## Files + +- Added the 12 Task 11 component/page files under `src/features/tech-log/presentation/studio/`. +- Extended `studio-provider.tsx` and `use-studio.ts` only with presentation-owned editor session state. +- Added `tests/features/tech-log/studio-editor-smoke.test.tsx`. + +## SHA + +- Base: `887f5e6eb1a5ccdf4feab0b27fae1c5823233190`. +- Implementation: the commit containing this report, titled `feat: port TechLog Studio editors` (final SHA recorded in the Task 11 handoff). + +## Deferred + +- Save/conflict resolution, guarded navigation, validation, server preview, publish, and unpublish workflows remain deferred to Tasks 12/13. The source Save control is present but disabled until Task 12 supplies the workflow. +- Broad app/test types, lint, build, architecture, security, visual, and full-suite gates remain deferred to integrated Task 14 by user direction. diff --git a/src/features/tech-log/presentation/studio/components/case-fields.tsx b/src/features/tech-log/presentation/studio/components/case-fields.tsx new file mode 100644 index 0000000..c654e4c --- /dev/null +++ b/src/features/tech-log/presentation/studio/components/case-fields.tsx @@ -0,0 +1,20 @@ +import type { components } from "../../../contracts/studio/generated.ts"; + +type CaseInput = components["schemas"]["CaseInput"]; + +export function CaseFields({ draft, onChange }: { draft: CaseInput; onChange(draft: CaseInput): void }) { + const update = (patch: Partial) => onChange({ ...draft, ...patch }); + return ( +
+

CASE

문제와 검증

+
+