Repository navigation
feat: 単独アプリ (apps/web) を作り、現像の E2E を回す - #9
Merged
Merged
Conversation
現像だけを使える最小のアプリで、E2E の土台を兼ねる。
- Vite + React で <Editor host={standaloneHost()} /> を出す
- ホスト:
- 下書きは IndexedDB の lumorphia-editor (prismtone と分ける)
- ?draft= で開き直す
- 表示言語はブラウザから決める
- 送り先はまだ無く「端末に保存」だけ (送客は #6)
- E2E のフックは __lumorphiaEditor
- 配信は server/serve.ts (Node の http)。dist と /models/ を返す
- COOP same-origin と COEP credentialless を付ける (onnxruntime-web のマルチスレッド)
- CSP は unsafe-eval なし、wasm-unsafe-eval あり
- パスの解決 (root の外に出ない)、ヘッダ、型、キャッシュの決まりは server/static.ts の純粋関数にしてテストする
- 配色トークンは今は prismtone と同じ値を app.css に写す (既定のテーマをパッケージに持たせるかは #5)
- build:packages: パッケージだけをビルドする (apps/web の build から呼ぶ。pnpm -r build から呼ぶと自分を呼び返す)
Refs #3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lumorphia/prismtone から移した E2E を apps/web に対して回せるようにする。 - Playwright の設定 (SwiftShader の WebGL、日本語で固定) と、CSP の違反を 見張る共通の test (e2e/test.ts) を置く - URL を / に、E2E のフラグと IndexedDB の名前を lumorphia のものにする - 部分補正のテストの「投稿へ → 現像をやり直す」(prismtone の投稿画面が要る) を、 下書きの ID から ?draft= で開き直す形に変える。確かめたいこと (下書きから 部分補正がよみがえる) は同じ。人物補正のテストと共通のヘルパーにする - 保存のファイル名は単独アプリの接尾辞 (無し) に合わせる - editor-styles.spec.ts: UI のクラスがホストの CSS に入っていること (@source を外すと落ちることを確かめた) 25 passed、1 skipped (PERF=1 専用)。顔検出と切り抜きも含む。 Refs #3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
公開リポジトリで Actions の時間の制約が無く、E2E は 30 秒ほどで終わる。 認識のモデルは一覧 (bin/assets.ts) と lockfile のハッシュでキャッシュし、 Chromium は Playwright の版でキャッシュする (prismtone と同じ)。 Closes #3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
現像だけを使える最小の単独アプリを作り、lumorphia/prismtone から移した E2E をこれに対して回す (milestone「v0.1 パッケージの初版」)。
単独アプリ (
apps/web)<Editor host={standaloneHost()} />を出すlumorphia-editor(prismtone とは名前を分ける)?draft=で下書きを開き直すserver/serve.ts(Node の http、依存なし)。dist と/models/を返す/editと同じく COOP same-origin と COEP credentialless を付けるunsafe-evalなし、wasm-unsafe-evalありserver/static.tsの純粋関数にしてテストした (17 件)..、エンコードした..、NUL、壊れたエスケープ) は拒む..は 404 になることを確かめたapp.cssに写した。既定のテーマをパッケージに持たせるかは 現像だけを使える単独アプリを出す #5 で決めるE2E
testを置いた/にした?draft=で開き直す形に変えた。確かめたいこと (下書きから部分補正がよみがえる) は同じeditor-styles.spec.ts: UI のクラスがホストの CSS に入っていることを確かめる。@sourceを外すとタッチ操作のテストが落ちることを確かめた確かめたこと
pnpm lint && pnpm format:check && pnpm typecheck(E2E の spec も型検査の対象にした)pnpm e2e: 25 passed、1 skipped (PERF=1専用)途中で直したこと
apps/webの build は最初、全パッケージの build (pnpm -r build) を呼んでいて、その中に自分自身が入っていたため無限に呼び合った。パッケージだけをビルドするbuild:packagesを足して、そちらを呼ぶようにしたapps/web/models、MediaPipe のローダー) まで見ていたので、除外に足したCloses #3
🤖 Generated with Claude Code