mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-24 10:10:05 -06:00
* Web: Link Media Locate… links the chosen file to the selected missing clip (#111) Link Media ▸ Locate…, `media.attachProxies` and `media.reconnectFullRes` all need the chosen file's path back synchronously so they can call the engine with `item` + `path`. The existing `pick_files` hook imports every chosen file as a new project item, so on the web build (where the browser picker is asynchronous and the hook returned `Vec::new()`) the command ran without a path and the file silently landed as a new project item instead of being relinked. On native the same hook worked because rfd returns paths synchronously. Add a separate `pick_file_for_relink` hook that returns the chosen file's virtual path synchronously. Native hosts open an rfd dialog; the web host registers the file in `/files/<name>` via a pending slot and runs `media.relink` itself when the picker resolves. The three call sites prefer the new hook and fall back to `pick_files` when the host has not installed it (so the import flow used by every other dialog stays unchanged). Fixes #111 Co-Authored-By: ninso112 <ninso112@pm.me> * Co-ship: Luna161 ack'd and reviewed fix/111-link-media-locate Reviewed the pick_file_for_relink hook routing, the take_files relink path, and the regression test. Looks correct end to end; ready for upstream review. Co-Authored-By: ninso112 <ninso112@pm.me> * #111: relink hint names its command; no pending state after a cancelled picker - RelinkHint carries the command (media.relink / attachProxies / reconnectFullRes), so the web host no longer runs media.relink for Attach Proxies and Reconnect Full Resolution. - The web picker hands the hint to its own callback instead of a thread-local slot, so a cancelled picker can't turn the next ordinary import into a relink. - Replace the hook-only unit tests with a UI test that drives Link Media ▸ Locate…. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: ninso112 <ninso112@pm.me> Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>