Step 13 owns iframe-vs-standalone CSS contract in slide_base.html via
3-valued embedded_mode enum (auto / embedded / standalone). Removes
SlideCanvas.tsx runtime CSS injection workaround; frontend now passes
?embedded=1 query so auto-mode script attaches html.embedded class and
scopes the standalone body centering/min-height/padding reset.
- templates/phase_z2/slide_base.html: conditional html.embedded class +
CSP-safe auto-mode <script> + additive html.embedded body/.slide rules
- src/phase_z2_pipeline.py: render_slide gains keyword-only embedded_mode
("auto" default) + ValueError guard; 3 existing call sites unchanged
- Front/client/src/components/SlideCanvas.tsx: derive embeddedSrc with
?embedded=1 (query-preserving), drop reset CSS injection block
- tests/phase_z2/test_slide_base_embedded_mode.py: 6 cases — auto script,
CSS rules, embedded/standalone explicit modes, byte-determinism,
invalid-mode guard
Design Agent Frontend
React + Vite + TypeScript frontend.
위치
Front/— 이 폴더- 원본 작업 위치 =
D:\ad-hoc\kei\design_agent_front\design-agent\(로컬 dev)
실행
cd Front/
pnpm install
pnpm dev
http://localhost:3000 에서 확인. DESIGN_AGENT_ROOT env 로 backend 경로 지정 가능.
구조
Front/
├── client/ React frontend (Vite root)
│ └── src/
│ ├── pages/
│ ├── components/
│ ├── services/
│ └── ...
├── server/ production express
├── vite.config.ts dev plugin + backend 연결
└── ...
Backend 연결 (vite.config.ts)
Vite dev plugin 이 다음 endpoint 등록 :
| Endpoint | 동작 |
|---|---|
POST /api/run |
MDX + overrides → backend pipeline spawn → run_id 반환 |
GET /api/sample-mdx?mdx=... |
sample MDX serve |
GET /frame-preview/{n} |
frame thumbnail |
GET /data/runs/{run_id}/{path} |
pipeline 산출물 serve |