Zoom: compose the box as a real 2x layer above the background (Unit: zoom layer + magnification proof)

Right-click now creates a transient ZoomSceneElement at z-index 1 whose pixels are a
genuine 2x magnified sample of the backdrop (live capture under art), composited into
stream/recording like any layer while the output crop stays the tier. All shapes are
centered on the click and clamped to frame; healed on load/scene-create, never persisted,
hidden from the layers list + element template (IsZoomLayer). BuildCompositorOptions is
now internal = always tier crop (test seam). ZoomFrameBuilder is a pure static sampler
(box/2 window centered on the box center, single-slot cache) proven by a banded-backdrop
test; LayerReorderPersistenceTests drag resolves rows by item since the collapsed zoom
row shifts container indices. Also books TASK 51 (webcam background Remove + Blur) and
syncs memory docs (HANDOFF, MyMistakes, indexes). Full suite: 405 passed, 0 warnings.
This commit is contained in:
2026-10-07 23:39:54 -07:00
parent 966e718f1e
commit 4b3d82ff0f
17 changed files with 734 additions and 210 deletions
+32
View File
@@ -1494,3 +1494,35 @@ box magnifies the already-composited preview.
Release the retained visual when the box hides (`VisualBrush.Visual = null`) or the long-lived
source visual stays pinned for the app lifetime.
## 2026-10-08 — Editing a file that carries ANOTHER work unit's uncommitted changes
LeftPanel.xaml was dirty with unrelated "pinned chat" work; the zoom build needed one DataTrigger
inserted into its ItemContainerStyle. Committing `git add Controls/LeftPanel.xaml` would have swept
the OTHER work unit's hunks into my commit — a scope-lock violation. The clean recipe:
```
git stash push -m my-wunit-isolate -- Controls/LeftPanel.xaml # park the OTHER work unit
# edit + build + test + commit my hunk (file is now only-mine vs HEAD)
git stash pop # restore the other work unit
```
Rules that make it safe: stash the WHOLE file (a per-hunk stash is a conflict factory), verify the
playback diff only touches regions I did not edit (`git show 'stash@{0}' -- <file>` before popping),
and check the other unit is preserved after the pop. Non-overlapping hunks pop cleanly; if a future
stash pop conflicts, resolve with the OTHER work unit winning.
## 2026-10-08 — The zoom window formula: source = box/2 centered on the BOX CENTER
First cut of `ZoomFrameBuilder` sampled the box's LEFT HALF (`mx = zx + (ox+.5)/2`), a silent
half-frame mis-focus — the preview's VisualBrush Viewbox is `(X+W/4, Y+H/4, W/2, H/2)`, i.e. the
half-width window centered on the box center. The output sampler must mirror it exactly:
```
mx = zx + W/4 + (ox + 0.5)/2 // ox over [0,W)
```
A one-constant difference (`W/4` vs nothing) is invisible in a real scene but fatal to a banded
gradient test — which is exactly why the magnification proof exists: 4 vertical bands, a box whose
1x region straddles two of them, assert ALL output pixels are the center-band color. If you change
the preview window, change `ZoomFrameBuilder` in the same edit or the preview lies about the output.