Auto-crop QA Validation Runner screenshots to the active window
Table of Contents
This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
What
The QA Validation Runner's Screenshot button (used throughout the
manual-chapter screenshot workflow) currently saves a full-desktop
PNG. The screenshot capture recipe's crop step then requires
manually reading pixel bounds off the raw image and writing a
one-off Python/Pillow crop invocation per screenshot — every single
capture, no reuse across them since each dialog sits at different
coordinates. Have the runner (or a small compass-side helper it
shells out to) query the window manager for the target/active
window's geometry (e.g. via xdotool getactivewindow
getwindowgeometry or wmctrl -l -G on Linux) and crop to that
automatically before saving, eliminating the manual bounds-reading
step entirely.
Why
This recipe is the standard path for authoring every future manual chapter (dozens of entities still lack one), and the crop step is pure boilerplate that differs only in the numbers, not the logic — exactly the kind of repeated manual work that should be automated once and reused, rather than re-derived by eye each time. It doesn't block chapter authoring today (the manual crop works fine), but it is friction that compounds across every remaining chapter.
References
- How do I capture screenshots for a manual chapter? — step 4, the manual crop this would replace.
- QA Validation Runner: in-app test tracking for the multi-worktree fleet — owns the Screenshot button this would extend.
See also
- How do I document an entity? — the wider entity-documentation recipe this crop step is part of.