GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — chore: 旧 scripta からユニットテスト 60 ファイルを復元(PR B) by ymnao · Pull Request #5 · ymnao/scripta Conversation
Owner
概要Stage 0b の続きとして、旧 scripta(Tauri 版・参照専用)から 60 ファイルのユニットテスト を scripta-next に復元する。Stage 1(fs 本物実装)に着手する前にテスト基盤を整え、安全性クリティカルな fs 実装をテスト無しで進めない方針。 関連 Issueなし(HANDOFF.md の PR B スコープ) 移行 Stage
変更内容1. テスト基盤の構築
2. テスト復元(60 ファイル)
3. 主要な書き換えポイント
4. シャッフル順テストの安定化複数シードで実行した際にフレークするテスト群を順次解消:
5. 既知の skip 対応
動作確認ローカルで以下すべて pass:
スクリーンショットなし(テスト追加のみ) 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions- jsdom / @testing-library/{react,jest-dom,user-event} を devDeps に追加
- vitest.config.ts を新設(jsdom 環境 + setupFiles + e2e/out 除外)
- src/test-setup.ts を新設(CodeMirror Range polyfill + matchMedia stub + window.api デフォルトモック注入)
- src/__test-utils__/api-mock.ts を新設(46 メソッド分の window.api モック生成ヘルパー)
- src/components/editor/live-preview/test-helper.ts を旧 scripta から流用
- package.json の scripts に test:watch を追加
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- decoration 18 / common 4 / editor 4 / filetree 1 / layout 1 / slide 2 / hooks 2 / lib 12 / stores 7 = 51 ファイルを旧 scripta から drop-in コピー - math.test.ts のみ scripta-next 側の hybrid 化(StateField + ViewPlugin)に 追従して `buildDecorations(view)` → `buildMathDecorations(view.state, view.hasFocus)` に書き換え。viewport 制限を前提とした 2 ケースは新仕様で意図が成立しないため it.skip + コメントで TODO 化(新仕様カバレッジは後続 PR で追加予定) - package.json scripts.test から --passWithNoTests を削除(テスト 0 件で fail させる) `pnpm test` 結果: 51 files / 957 passed + 2 skipped Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> - commands.test.ts: vi.mock("@tauri-apps/api/core") を撤去し、test-setup.ts が注入する
window.api 経由で各関数の retry 挙動をテスト。新 commands.ts では
scanUnresolvedWikilinks も withRetry 配下なので 2 ケース追加(旧 7 関数 → 新 8 関数)
- store.test.ts: vi.mock("@tauri-apps/plugin-store") + mockStore を撤去し、
window.api.settingsGet/Set/Delete/Save に張り替え。migration テスト
(legacy theme → themePreference)も新 API で同等の assertion を維持
- export.test.ts: vi.mock("@tauri-apps/plugin-dialog") を撤去し、
showSaveDialog を vi.mock("./commands") の mock object に統合。本文 30+ ケースは
mockedSave 変数名そのままで無変更
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- useFileWatcher.test.ts: vi.mock("@tauri-apps/api/event") 撤去、commands.ts の
onFsChange を mock し callback を保持。emit ヘルパーは payload を剥がした直接渡しへ
- useGitSync.test.ts: vi.mock("@tauri-apps/api/event") 撤去、commands mock に
onConflictResolved を追加(useGitSync 本体が commands.ts 経由になっているため)
- useUpdateCheck.test.ts: vi.mock("@tauri-apps/api/app") 撤去、commands mock に
getAppVersion を追加。本文の mockedGetVersion 変数名は流用
- ConflictWindow.test.tsx: vi.mock("@tauri-apps/api/event"/"window") 撤去、commands mock に
emitConflictResolved/closeWindow を追加。emit の引数文字列確認は無引数 API のため
toHaveBeenCalled() に簡素化
- images.test.ts: convertFileSrc を @tauri-apps/api/core から ../../../lib/commands に切替
`pnpm test` 結果: 59 files / 1139 passed + 2 skipped
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
新 AppLayout は Tauri 直接依存をすべて捨てているため、書き換え後のモックは
5 モジュールに縮減(commands / store / useGitSync / Sidebar / MarkdownEditor)。
- 削除: vi.mock("@tauri-apps/api/app"/"plugin-dialog"/"webviewWindow"/"event"/"window")
- 追加: commands mock に getAppVersion/openDirectoryPicker/openConflictWindow/closeWindow/
onFsChange/onMenuEvent/onWindowCloseRequested を集約
- closeHandler の挙動検証を新セマンティクスに変更:
旧: closeHandler({ preventDefault }) + expect(preventDefault).toHaveBeenCalled() +
expect(mockDestroy).toHaveBeenCalled()/.not.toHaveBeenCalled()
新: throw しなければ ack=true → main destroy / throw すれば ack=false → close 中断
→ try/catch で closeHandlerThrew を捕捉し、toBe(false)/toBe(true) で検証
- conflict resolver window のオープン検証は MockWebviewWindowConstructor から
openConflictWindow as Mock に置換
- emitFsChange ヘルパーを `cb({ payload: events })` → `cb(events)` に変更
`pnpm test` 結果: 60 files / 1179 passed + 2 skipped
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
シャッフル実行(pnpm vitest run --sequence.shuffle --sequence.seed=2 など)で
再現する 3 件のフレークを解消。
- AppLayout: 前テストが残した toast / mock 履歴をリーク防止のため
beforeEach 冒頭で useToastStore を空に + mockedReadFile/WriteFile/FileExists を
mockReset 経由で設定(Once キューも含めて完全 clear)
- StatusBar: navigator.clipboard を Object.assign で代入していたが、
read-only な navigator では TypeError になる環境がある。
Object.defineProperty(..., { configurable: true, value: ... }) に変更
- useGitSync: mockedGit* mocks を mockReset 経由で設定し、前テストの
mockResolvedValueOnce キュー残留を排除。doPull failure の async chain
完了を確実に待つため advanceTimersByTimeAsync(0) → (100) に拡張
(100ms ≪ autoCommit/Pull/Push のデフォルト 10 分なので interval は無発火)
検証: --sequence.seed=1/2/7/17/42/99/200 で全 60 files / 1179 passed + 2 skipped
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
decoration テスト群は createTestState で得た state に対し syntaxTree(state) を 直接呼ぶ。CodeMirror は lazy parse で、shuffle 順では state 作成時点の構文木が スタブ/部分木のまま残り mermaid/horizontal-rules/headings/strikethrough/ code-block-copy 等で件数不足になる事象が報告された。 createMockView 側ではすでに ensureSyntaxTree(state, state.doc.length, 5000) を 呼んでいたが、createTestState を直接使うテスト(mermaid.test.ts:34 等)には 保証がなかった。createTestState 内で同じ ensureSyntaxTree を呼ぶことで全 テストパスで構文木を確実に構築する(既に呼んでいる箇所は cache が効くので 追加コストは無視できる)。 検証: pnpm vitest run --sequence.shuffle --sequence.seed=1/2/3/7/17/42/99/200/500 で全 60 files / 1179 passed + 2 skipped(フレークなし) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> ensureSyntaxTree(state, length, 5000) は ms ベースの timeout で、shuffle 並列実行で CPU 競合が起きると 5 秒以内に parse が完了せず部分的なスタブを 返す事象が報告された(tables.test.ts:43 で Table ノード未検出、 lists.test.ts:155 で list widget 0 件など)。 `syntaxTreeAvailable` で完了確認しつつループする方式に変更。markdown の 小さな doc なら数ループで完了する。最大 50 回で打ち切り(無限ループ防止)。 検証: pnpm vitest run --sequence.shuffle --sequence.seed=1/2/3/7/17/42/99/200/500/999 で全 60 files / 1179 passed + 2 skipped(フレークなし) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> - test-setup.ts: afterEach で vi.useRealTimers() を必ず呼び、fake timers が 次テストに漏れて userEvent などが hung する事象を防ぐ (EmojiInputDialog の検索クリアテストが 5000ms timeout する症状を解消) - MermaidEditorDialog.test.tsx: mockRenderMermaid のデフォルトを Promise を 返す形に揃える。setTimeout(..., 300) で発火する renderMermaid の戻り値が undefined だと .then で TypeError になる事象を防ぐ - test-helper.ts (createTestState): syntaxTreeAvailable 完了確認の poll に 60 秒 timeout × 100 回ループへ拡張。CPU 競合下でも構文木が確実に完成する (buildDecorations(view) が空を返す lists/headings flake を解消) 検証: pnpm vitest run --sequence.shuffle --sequence.seed=1/2/3/7/17/42/99/200/500/999 で全 60 files / 1179 passed + 2 skipped(フレークなし) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> 1. MermaidEditorDialog.test.tsx
コンポーネントは ../../lib/mermaid から { isTauriProtocol, promoteMermaidStyles,
renderMermaid } の 3 つを import するが、mock が renderMermaid のみで
isTauriProtocol と promoteMermaidStyles が undefined になっていた。
shuffle 順では未処理例外として顕在化し巻き添えで onCancel assertion も落ちていた。
3 つすべて mock に追加。
2. test-helper.ts (createTestState)
`ensureSyntaxTree(state, upto, timeout)` の timeout は ms ベースで CPU 競合下で
parse work loop が time-budget を使い切って部分木のまま return null するケースが
残っていた(lists / mermaid / headings の buildDecorations 空配列)。
timeout = Number.POSITIVE_INFINITY で work loop が time-out で抜けないようにし、
markdown parser の有限 work で必ず完了するようにした。loop 上限は 10 回(保険)。
注: test-setup.ts の afterEach(() => vi.useRealTimers()) はフレーク解消に必要だが、
fake timers を使う今後のテストとの相互作用に注意(今回直接の問題はなし)。
検証: pnpm vitest run --sequence.shuffle --sequence.seed=1/2/3/7/17/42/99/200/500/999
で全 60 files / 1179 passed + 2 skipped(フレークなし)
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
これまでの修正で `ensureSyntaxTree(state, length, Infinity)` で parse は完了
していたが、`syntaxTree(state)` が返す `field.tree` は LanguageState 構築時の
スナップショットで、parse context の tree とは別物だった。`parse.work()` で
context.tree が前進しても field.tree は古いまま → buildDecorations 内の
`syntaxTree(state)` が部分木を返し、各種装飾が空配列になっていた。
CodeMirror の `forceParsing(view, ...)` は `view.dispatch({})` で no-op
transaction を発火し、LanguageState.apply (`this.tree != this.context.tree`
のとき new LanguageState を作って context.tree を field.tree に取り直す)
経由で同期している。テスト側でも view が無いため state.update({}).state で
同等の同期を行う。
ついでに createMockView 内の冗長な ensureSyntaxTree 呼び出しを削除(state は
createTestState で完全 parse 済みなので不要)。
検証: pnpm vitest run --sequence.shuffle で seed
1/2/3/7/17/42/99/200/500/999/1000/1234/9999 の 13 シードすべて
60 files / 1179 passed + 2 skipped(フレークなし)
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
userEvent v14 のデフォルト動作はキー入力ごとに internal な setTimeout で
delay を入れる。shuffle 並列実行で CPU 競合が起きると userEvent.type/clear が
5000ms timeout する事象が seed=1 で報告されていた(「検索をクリアすると
カテゴリ表示に戻る」テスト)。
userEvent.setup({ delay: null }) で internal setTimeout を無効化し、各キー
入力を同期処理にする。renderDialog から user instance を返し、各テストで
await user.type/click/clear を使う形へ書き換え。
検証: pnpm vitest run --sequence.shuffle で seed
1/2/3/7/17/42/99/200/500/999/1234/9999 の 12 シードすべて
60 files / 1179 passed + 2 skipped(フレークなし)
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1. test-setup.ts: requestAnimationFrame を同期実行に置換 jsdom の rAF は setTimeout(cb, ~16ms) で polyfill されるが、CPU 競合下で callback が遅延し、rAF を介した state 更新を待つ waitFor が timeout する。 EmojiInputDialog では useEffect 内で `requestAnimationFrame(() => setAllCategoriesReady(true))` していて、rAF 遅延でグリッド表示テスト (L57「全カテゴリの絵文字が一覧に表示される」など)が単体実行でも timeout する事象が報告されていた。同期実行で確実に flush する。 2. MarkdownEditor.test.tsx: useSettingsStore mock に getState/subscribe を追加 既存 mock は selector 関数形式のみで `useSettingsStore.getState()` / `subscribe()` が undefined だった。live-preview/mermaid.ts:281 が直接 `useSettingsStore.getState()` を呼ぶため、shuffle 順で実行されると `useSettingsStore.getState is not a function` でクラッシュしていた。 zustand store が公開する getState/setState/subscribe を Object.assign で 付与し、両方の使い方をカバーする。 検証: pnpm vitest run --sequence.shuffle で seed 1/2/3/5/7/17/42/99/200/500/999/1234/9999 の 13 シードすべて 60 files / 1179 passed + 2 skipped(フレークなし) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> 前 commit (f0d0fd2) で test-setup.ts に追加した global rAF 同期化が CodeMirror の EditorView.requestMeasure() の前提(非同期フレーム境界)を 壊し、delayedAndroidKey 周りで MarkdownEditor / SlideView がクラッシュ していた。global 上書きを撤回し、EmojiInputDialog テスト内で vi.spyOn を 使って局所化する(CodeMirror を使わないテストでのみ rAF が同期になる)。 検証: pnpm vitest run --sequence.shuffle で seed 1/2/3/4/5/7/17/42/99/200/500/999/1234/9999 の 14 シードすべて 60 files / 1179 passed + 2 skipped(フレークなし) 個別: EmojiInputDialog / MarkdownEditor / SlideView 各単体実行も pass Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> EmojiInputDialog は emoji-data.ts (2914 行) の全絵文字を jsdom で render するため、CPU 競合や環境差で default 5000ms timeout に間に合わないテストが ある(カテゴリ表示・検索・ハイライト等で waitFor がタイムアウトする事象が ユーザー環境で報告されていた)。 userEvent delay や rAF 同期化などの構造的修正は前 commit までに入れ済みで、 残るのは「ユーザー環境では計算リソース不足で 5s に収まらないだけ」のため、 testTimeout を 15s に拡大して余裕を確保する。通常は 1〜3s で完了するため 正常系のテスト時間には影響しない(hang する bug があれば 15s で fail する)。 検証: pnpm vitest run(単体) + pnpm vitest run --sequence.shuffle で seed 1/2/3 の 60 files / 1179 passed + 2 skipped、format/lint/typecheck 全 pass Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> 前 commit (ed5be57) で vitest.config.ts に入れた global testTimeout: 15_000 は 全テストの猶予を一律で広げる副作用があり、別の場所のハング検出感度を下げる。 原因が emoji-data の全件 render のみに限定されているため、 src/components/common/EmojiInputDialog.test.tsx 内で `vi.setConfig({ testTimeout: 15_000 })` で局所化する。これにより他のテストは default 5s の hang 検出を維持する。 検証: EmojiInputDialog 単体 / MarkdownEditor 単体 / 全体 shuffle seed=1 で 全 60 files / 1179 passed + 2 skipped、format/lint/typecheck 全 pass Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overview旧 scripta(Tauri 版)由来のユニットテスト群を scripta-next に復元し、Stage 1(fs 本物実装)に入る前に Vitest + jsdom 前提のテスト基盤( Changes:
Reviewed changesCopilot reviewed 65 out of 66 changed files in this pull request and generated 2 comments. Show a summary per file
Files not reviewed (1)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. PR #5 の copilot レビュー指摘 2 件に対応: - `expect(content).toBeDefined()` は querySelector が null を返しても通って しまうため、`not.toBeNull()` に変更。DOM 不在を検知できるようにする - 「区切り行だけのスライドは hr として表示する」テストが content の存在 確認しかしていなかったため、`querySelector(\"hr\")` で実際に <hr> が 描画されることを検証する形に強化 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewCopilot reviewed 65 out of 66 changed files in this pull request and generated 2 comments. Files not reviewed (1)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. PR #5 の copilot レビュー指摘 2 件に対応: - src/test-setup.ts: window.matchMedia stub の Object.defineProperty に configurable: true を追加。別のテストやライブラリが matchMedia を再定義 しても TypeError にならないようにする - src/components/common/ExportDialog.test.tsx: コメントの「navigator.platform」を 「navigator.userAgent」に修正(実装と整合) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewCopilot reviewed 65 out of 66 changed files in this pull request and generated 2 comments. Files not reviewed (1)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. PR #5 の copilot レビュー指摘 2 件に対応: - StatusBar.test.tsx: navigator.clipboard を上書きする 2 テストを describe(\"clipboard interactions\") にまとめ、beforeEach で original を 退避、afterEach で必ず復元する形に変更。同一 worker 内の他テストへ clipboard が漏れて shuffle 実行でフレーク要因になるのを防ぐ - ExportDialog.test.tsx: vi.hoisted で navigator.userAgent を書き換える際、 元の値を vi.hoisted の戻り値で保存して afterAll で復元する形に変更。 module load 時に userAgent を参照する他テストへの影響を排除 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewCopilot reviewed 65 out of 66 changed files in this pull request and generated no new comments. Files not reviewed (1)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
15 tasks
ymnao
added a commit
that referenced
this pull request
/code-review で検出した 7 件全てに対応。最重要は self-counting 解消 (scripts/check-tauri-residue.sh → scripts/check-legacy-residue.sh)。 Fix #1: self-counting で Phase 5 green 化が原理的に不可能だった問題: - scripts/check-tauri-residue.sh → check-legacy-residue.sh にリネーム - ci.yml job tauri-residue → legacy-residue にリネーム - package.json check:tauri-residue → check:legacy-residue にリネーム - ci.yml コメントから "Tauri" / "WKWebView" verbatim を排除 - 結果: 88 行 (うち 4 行 self-reference) → 84 行 baseline と一致 Fix #2: pnpm verify が CI と divergence していた問題: - verify chain に typecheck:e2e + build を追加 - check:legacy-residue は意図 fail のため verify には含めない (CLAUDE.md で「補助」として別行案内) Fix #3: PATHS の coverage gap: - pnpm-workspace.yaml (CLAUDE.md 上 canonical config) 追加 - vite.config.e2e.ts 追加 - tsconfig.json (root) 追加 - docs/tauri-purge-inventory.md §2.1 にも追従 Fix #4: WebKit 扱いの inventory との非整合: - script ヘッダで WebKit 除外の意図を明記 (-webkit- prefix FP 回避) - inventory §2.1 / §2.5 / §2.6 で CI ガードとの差分を明記 (ime.ts:4 等 WebKit 系コメントは CI 非対象 → Phase 3 で手動チェック) Fix #5: git grep exit ≥2 (pathspec error / 非 git repo 等) を silently success として扱っていた問題: - if RESULT=$(...) を捨て、明示的に EXIT=$? を捕捉 - case 0 / 1 / *) で 3 分岐 (match / no-match / error) - error 時は stderr 出力 + exit 2 Fix #6: continue-on-error は workflow 成否にのみ作用し job の check-run は failure のまま残るため、branch protection の required status checks に追加すると merge blocking される: - workflow コメントに caveat を追記 - 「Phase 5 完了まで required 化しない」運用を明示 Fix #7: :(exclude)scripts/check-tauri-residue.sh の dead code 化: - 新ファイル名 :(exclude)scripts/check-legacy-residue.sh に更新 - 「PATHS に scripts/ を含めないため現状 no-op、defensive 配置」コメント 追記 検証: - bash scripts/check-legacy-residue.sh → 84 行検出 (PR 直前と一致) - pnpm verify (format / lint / typecheck / typecheck:e2e / test / test:e2e / build) 全 pass Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ymnao
added a commit
that referenced
this pull request
* chore: Tauri 残骸検出 CI ガードを追加 (#82 Phase 1 PR-2) Issue #82 サブタスク D。Phase 2-5 の削除・置換進捗を質的に追跡する CI ガードを設置する。 変更: - scripts/check-tauri-residue.sh: 13 種の FORBIDDEN keyword (tauri / wkwebview / __TAURI / webviewWindow / @tauri-apps / src-tauri / tauri:// / tauri-plugin / data-tauri- / convertFileSrc / WebviewWindow / appWindow / tauri.conf) を git grep で検出。1 hit でも exit 1。対象スコープは docs/tauri-purge-inventory.md §2.1 と同期。-webkit- prefix CSS の false positive は keyword に WebKit を含めないことで除外 - package.json: check:tauri-residue script + verify script を追加 (verify = format && lint && typecheck && test && test:e2e の chain を codify。check:tauri-residue は Phase 5 完了時に verify へ合流予定) - .github/workflows/ci.yml: tauri-residue job を追加。Phase 1 時点 では既存残骸 84 行が検出され意図 fail するため continue-on-error: true で merge を blocking しない運用。Phase 5 完了 PR で除去 - CLAUDE.md: 「コミット前の検証」を pnpm verify に集約 ローカル実行: 84 行検出で exit 1 (期待動作)。inventory §2.2 の 集計 (B 14 行 + 残り A/C/D) と整合。 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * chore: PR #103 code-review 7 件反映 (CI ガード設計欠陥修正) /code-review で検出した 7 件全てに対応。最重要は self-counting 解消 (scripts/check-tauri-residue.sh → scripts/check-legacy-residue.sh)。 Fix #1: self-counting で Phase 5 green 化が原理的に不可能だった問題: - scripts/check-tauri-residue.sh → check-legacy-residue.sh にリネーム - ci.yml job tauri-residue → legacy-residue にリネーム - package.json check:tauri-residue → check:legacy-residue にリネーム - ci.yml コメントから "Tauri" / "WKWebView" verbatim を排除 - 結果: 88 行 (うち 4 行 self-reference) → 84 行 baseline と一致 Fix #2: pnpm verify が CI と divergence していた問題: - verify chain に typecheck:e2e + build を追加 - check:legacy-residue は意図 fail のため verify には含めない (CLAUDE.md で「補助」として別行案内) Fix #3: PATHS の coverage gap: - pnpm-workspace.yaml (CLAUDE.md 上 canonical config) 追加 - vite.config.e2e.ts 追加 - tsconfig.json (root) 追加 - docs/tauri-purge-inventory.md §2.1 にも追従 Fix #4: WebKit 扱いの inventory との非整合: - script ヘッダで WebKit 除外の意図を明記 (-webkit- prefix FP 回避) - inventory §2.1 / §2.5 / §2.6 で CI ガードとの差分を明記 (ime.ts:4 等 WebKit 系コメントは CI 非対象 → Phase 3 で手動チェック) Fix #5: git grep exit ≥2 (pathspec error / 非 git repo 等) を silently success として扱っていた問題: - if RESULT=$(...) を捨て、明示的に EXIT=$? を捕捉 - case 0 / 1 / *) で 3 分岐 (match / no-match / error) - error 時は stderr 出力 + exit 2 Fix #6: continue-on-error は workflow 成否にのみ作用し job の check-run は failure のまま残るため、branch protection の required status checks に追加すると merge blocking される: - workflow コメントに caveat を追記 - 「Phase 5 完了まで required 化しない」運用を明示 Fix #7: :(exclude)scripts/check-tauri-residue.sh の dead code 化: - 新ファイル名 :(exclude)scripts/check-legacy-residue.sh に更新 - 「PATHS に scripts/ を含めないため現状 no-op、defensive 配置」コメント 追記 検証: - bash scripts/check-legacy-residue.sh → 84 行検出 (PR 直前と一致) - pnpm verify (format / lint / typecheck / typecheck:e2e / test / test:e2e / build) 全 pass Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced
chore: Electron security checklist 補完 (permission handler / fs:read size limit / pdf debug env)
#204
Closed
This was referenced
ymnao
added a commit
that referenced
this pull request
- スライド発表モード (F5) の行に、macOS では Fn+F5 が必要な旨を小さな 補助テキストで表示 - ShortcutGroup 型に optional な note フィールドを追加し、IS_MAC の 場合のみ注記を出す - Fable ロードマップ #5 (発表モード) の派生 UX 改善
3 of 4 tasks
ymnao
added a commit
that referenced
this pull request
* feat: FileTree に WAI-ARIA tree キーボード操作を追加 - root ul に role="tree"、button に role="treeitem" を付与 - roving tabindex で Tab 遷移を tree 全体で 1 stop に - ↑↓ で visible item 移動、→ で folder 展開・展開済みなら第一子へ、 ← で folder 畳み・else 親へ、Enter/Space で activate、Home/End で先頭/末尾 - 選択パスと focus を同期、rename/create InlineInput 中は key handler を早期 return - FileTree.test.tsx にキーボード操作 8 ケース追加 Fable 広範レビュー (session 123, PR #388) High #5 対応。 * refactor: FileTree keydown handler の /simplify 指摘対応 - focusedPath の 2 段 useEffect を 1 段 + effectiveFocusedPath 導出に整理 - currentBtn を closest<HTMLButtonElement> で型付けし 4 箇所の cast 削除 - data-depth の "?? 0" fallback 3 箇所削除 (常に present) - unhandled key を querySelectorAll 前に早期 return * fix: FileTree roving tabindex の fallback 保証と aria-selected 冗長解消 - code-reviewer Critical: focusedPath が visible entry に一致しないと どの treeitem も tabIndex=0 にならず Tab で tree に入れなくなる問題を 修正 (workspace 切替 / 外部削除 / nested selectedPath でトリガ)。 render 後に tabbable の存在を DOM で検査し、無ければ先頭 entry に fallback - code-reviewer Warning: aria-selected={isSelected || undefined} に変更し 未選択 item への "not selected" 冗長読み上げを回避 - fallback 不変条件を検証する test 1 件追加 skip 判断: - selectedPath 上書き warning: 意図的挙動 (外部選択に追随) - Cmd+Enter modifier: 既存挙動非退化 (before PR も同じ) - onFocus + focusIdx の重複 setState: React 18 同値 bailout で無害 - ArrowRight 展開後 auto-focus 子: 非同期待ち必要、scope 外 - typeahead search: scope 外 * fix: CI lint 失敗の解消 (ul/li → div、useExhaustiveDependencies) - FileTree の tree 構造を ul/li から div ベースに変更 - noNoninteractiveElementToInteractiveRole (role="tree" on ul) 対応 - rootUlRef 型を HTMLDivElement へ、keydown handler 型も同期 - test 側の querySelector("ul") を [role="tree"] に置き換え - FileTreeItem の子コンテナ role="group" にも同ルールが当たるが fieldset は tree pattern の a11y と両立不能なため biome-ignore で許可 (SlideView.tsx:271 の separator role と同じ扱い) - 空 folder メッセージの <li> を <div> に変更 - useExhaustiveDependencies: fallback useEffect の deps を body で 実際に参照するよう再構成 (focusedPath check + entries.length guard) - refreshKey は root fallback に不要なため deps から除外 * style: FileTree.test.tsx の biome format 適用 sed 置換で "\"" escape 記法が残っていた箇所を biome 標準の single-quote 形式へ (biome format 差分のみ、挙動変更なし)
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |