Add frozen TikZRefinery demo baseline and build pipeline
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
# Whole-element dragging, cancellation and saving — October 21, 2026
|
||||
|
||||
Vincent authorized selection, live whole-element dragging, one minimal source
|
||||
update on release, cancellation, save/reopen and the separated-box contact
|
||||
comparison. Existing uncommitted work is preserved; no commit or push.
|
||||
|
||||
## Observed execution
|
||||
|
||||
- The existing Qt 6.12.0 / MinGW 13.1.0 Debug build succeeded. All four CTest
|
||||
entries passed: `core_foundations`, `rectangle_display`, `segment_display`,
|
||||
and `whole_element_drag`.
|
||||
- The new test delivers press/move/release events to a real `QGraphicsView`
|
||||
viewport. The scene selects one item and emits gestures with scene positions,
|
||||
element ID and revision. Preview changes item position without changing source,
|
||||
dirty state, revision or `documentChanged` count. Release produces one batch,
|
||||
advances the revision once and emits one document change.
|
||||
- Right-box translation by (-100,0) scene units produces exactly the bytes of
|
||||
`boxes-touching.tex`: stationary left box unchanged, right corners (1,0)..(2,1)
|
||||
cm, equal one-centimetre dimensions, centerlines meeting at x=1cm.
|
||||
- Line and target-arrow translations by (50,-50) scene units produce exactly the
|
||||
`line-translated.tex` and `arrow-translated.tex` reference bytes. Separate
|
||||
pointer tests move backward/double arrows, preserving direction and the other
|
||||
elements. The bounding path and unrelated source stay unchanged.
|
||||
- Escape, focus loss and saving during a preview restore authoritative geometry;
|
||||
the later release does not commit a cancelled gesture. Click-only selection
|
||||
is a no-op. Stale revisions, endpoint gestures and out-of-extent movement
|
||||
are refused without source mutation.
|
||||
- Guarded file saves preserve the expected bytes and clear dirty state. Reopen
|
||||
parses the saved bytes cleanly. An externally modified destination is not
|
||||
overwritten; the editor keeps its unsaved changes. The actual window's source
|
||||
pane, modified state, enabled Save action and successful Save are checked.
|
||||
- Repeating the box contact gesture after a 2x view transform and panning gives
|
||||
the same source displacement. This is a bounded mapper/gesture check, not
|
||||
completion of future zoom/pan controls or a supported zoom-range test.
|
||||
- Release displacement precision is 0.000001cm. Decimal string addition applies
|
||||
one common offset without rounding away original fractional digits. A test
|
||||
with 18 fractional digits, UTF-8 and CRLF verifies exact translated values
|
||||
and preserved unrelated bytes. Unchanged axes retain their original spelling.
|
||||
- The three actual saved/reopened outputs were copied to the evidence folder
|
||||
and independently compiled with shared TinyTeX. Fixed 7×5cm comparison pages
|
||||
at 254dpi yield 700×500 rasters. With the existing grayscale <128 dark-pixel
|
||||
threshold and one-pixel counterpart allowance, all three comparisons had
|
||||
zero unmatched pixels in either direction, without fitted shifts or tight
|
||||
crops. The comparison images and edited-window screenshot were visually
|
||||
reviewed. The threshold remains a prototype criterion.
|
||||
- The native app was launched with a separate editable copy at
|
||||
`code/build/demo/boxes-drag-demo.tex`. That file is retained for Vincent's
|
||||
inspection and any edits; reference corpus files were not used as save targets.
|
||||
- Both report v1.53 editions completed the shared TinyTeX build sequence,
|
||||
including bibliography and index generation. Final logs had no errors,
|
||||
missing files, unresolved citations/references, or box warnings. All rendered
|
||||
pages were visually reviewed, with larger checks of changed content, and
|
||||
internal link destinations were validated. Final PDFs contain 146 pages
|
||||
(developer edition) and 101 pages (submission edition).
|
||||
|
||||
## Reproduction
|
||||
|
||||
Use the build/CTest commands in `code/README.md`. With Qt and MinGW DLLs on PATH,
|
||||
from the repository root:
|
||||
|
||||
```powershell
|
||||
New-Item -ItemType Directory -Force work/whole-element-drag | Out-Null
|
||||
$env:QT_QPA_PLATFORM = 'offscreen'
|
||||
& ./code/build/tikzrefinery_drag_tests.exe work/whole-element-drag
|
||||
& 'C:/Users/vince/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/python.exe' code/tests/CompareRectangles.py --work work/whole-element-drag --evidence code/tests/evidence/drag-2026-10-21 --pdflatex 'C:/Users/vince/Documents/Projects/Tools/LaTeX/TinyTeX/bin/windows/pdflatex.exe' --pdftoppm 'C:/Users/vince/.cache/codex-runtimes/codex-primary-runtime/dependencies/native/poppler/Library/bin/pdftoppm.exe' --fixtures boxes-touching line-translated arrow-translated --output-stem drag-comparison --source-directory work/whole-element-drag
|
||||
```
|
||||
|
||||
Remove the offscreen environment setting before a visible launch. Test files
|
||||
use isolated temporary directories inside `code/build/test-work/` and clean up
|
||||
automatically. Retained `drag-2026-10-21/` evidence contains the actual saved
|
||||
TeX sources, comparison JSON/two PNGs and the edited-window PNG.
|
||||
|
||||
## Limits
|
||||
|
||||
The checks exercise Qt viewport events, not OS-level pointer injection. No
|
||||
Vincent acceptance, timing result, full product-case completion, or requirement
|
||||
status change is inferred. Endpoint editing, undo/redo, zoom/pan controls,
|
||||
broader syntax and integrated LaTeX/PDF preview remain unimplemented. Dragging
|
||||
is single-element translation; moves outside the declared comparison extent
|
||||
are rejected. Selection clears after a commit/reparse; IDs remain scoped to
|
||||
the current document revision. The earlier external-write race after baseline
|
||||
comparison remains a documented limit of the existing save implementation.
|
||||
Reference in New Issue
Block a user