Files
clean-architecture-frontend…/tests/unit
DongHyeonkaandClaude Opus 5.5 de954d2ebf fix(browser-files): stop binding file pickers to the options object (R-2.4)
EnhancedFilePicker and the download adapter captured showOpenFilePicker
and showSaveFilePicker with `.bind(options)`. A Window operation throws
TypeError("Illegal invocation") when `this` is not the Window, so passing
`window.showOpenFilePicker` / `window.showSaveFilePicker` as-is failed on
every call.

Both are now captured with `.bind(undefined)`. They are still captured at
construction, and Web IDL maps an undefined receiver to the global object,
so the native functions can be injected directly.

Verified: "calls an injected window picker without rebinding its
receiver" and "calls an injected window save picker without rebinding its
receiver" use a fake picker that throws "Illegal invocation" unless `this`
is undefined or globalThis. Both failed before the fix (ok:false) and pass
now. check:architecture, check:types:app, check:types:test, lint,
test:component pass. test:unit passes except removal-fixture, which needs
generated artifacts/release files that a fresh worktree lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:15:58 +09:00
..