F2: ui.screenshot captures the webview without focusing the window
On Windows the webview renders itself into a PNG through WebView2 CapturePreview (scheduled on the main thread via with_webview, 10 s timeout, PNG signature and 64 MiB cap checked). macOS and Linux keep the xcap screen-region capture as a documented fallback, now without focusing. app.focus is the only control method that changes focus. A --control instance opens its window without taking the foreground. An ignored live test samples the foreground window while the app starts and takes five screenshots and fails if Lutra ever owns it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d567f3957d
commit
f49b42836a
12 changed files with 398 additions and 84 deletions
|
|
@ -18,7 +18,7 @@ cargo xtask ci # the full quality gate, run before every commit
|
|||
cargo xtask fixtures # create Symfony and Laravel reference projects in target/fixtures/
|
||||
```
|
||||
|
||||
A `--control PORT` instance keeps its settings, recovery journal and webview data in `<temp>/lutra-control/<port>/`, never in your own data directory; `--data-dir DIR` or `LUTRA_DATA_DIR=DIR` pick another directory. Delete the folder to start fresh.
|
||||
A `--control PORT` instance keeps its settings, recovery journal and webview data in `<temp>/lutra-control/<port>/`, never in your own data directory; `--data-dir DIR` or `LUTRA_DATA_DIR=DIR` pick another directory. Delete the folder to start fresh. Its window opens without taking the foreground, and `ui.screenshot` never focuses it; only `app.focus` does. To check that on Windows, build with `--features bundled-ui` and run `LUTRA_DESKTOP_EXE=<target>/debug/lutra-desktop.exe LUTRA_CONTROL_PORT=<port> cargo test -p lutra-desktop --test screenshot_focus -- --ignored`.
|
||||
|
||||
## Robustness: Lutra never crashes
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ No inline comments. Doc comment blocks above modules, functions, types and field
|
|||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-27 | minor | Unfocused `--control` windows and the screenshot focus check (F2) |
|
||||
| 2026-10-25 | minor | Isolated data directory for `--control` instances (H6) |
|
||||
| 2026-10-14 | minor | Node.js 22.12+ required by the frontend toolchain |
|
||||
| 2026-10-13 | major | Initial draft |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue