Skip to content

test: finish the gh-145 acceptance coverage - #488

Closed
mberrys wants to merge 8 commits into
devfrom
cdx/gh139-interaction-quality-closeout
Closed

test: finish the gh-145 acceptance coverage#488
mberrys wants to merge 8 commits into
devfrom
cdx/gh139-interaction-quality-closeout

Conversation

@mberrys

@mberrys mberrys commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

mberrys and others added 3 commits August 31, 2026 20:23
Completes the test half of issue #145. The implementation landed across
12e9b91 and 711a011; these are the criteria those commits left unproven,
plus the two defects writing them exposed.

Interaction controller:

  - dragContinuesBeyondViewportEdge, with pointer capture held while the
    pointer is outside the viewport and released on the up (AC3);
  - dragSnapsPreviewOnlyAfterThreshold and
    snapMovesPreviewNotCommittedGeometry: a snap is presentation, the
    target the drag steers is untouched, and DragSession::snappedTo
    records the source rather than leaving a commit path to re-derive it;
  - snapSuppressModifierIsSampledPerMove: Alt pressed and released
    mid-gesture starts and stops the snap without restarting the drag,
    which is what AC3 means by sampling modifiers consistently;
  - hitTestToleranceFollowsLiveViewScale (AC5);
  - traceRecordsHitTestCandidatesAndPreciseHits (AC7);
  - staleIndexEntryCannotSurviveIntoACommit (AC6): re-indexing under a
    live drag is not staleness and must not cancel it, while a revision
    change refuses the completion.

Viewport controller: zoomAnchorHoldsWithinSubpixelToleranceAcrossZoomRange
pins the anchor to a declared AnchorTolerancePx of 0.5 -- one rounding of
the integer offset, which is the best the arithmetic can do and what AC4
asks to be stated rather than left implicit -- and
zoomAnchorHoldsOnRotatedPages covers 90/180/270 (AC4, AC8).

Hit-test sources: toleranceExpandedQueryCrossesCellBoundaries is the case
PageSpatialIndex::query(QRectF) exists for, and
toleranceQueryReturnsSpanningItemsOnce pins the de-duplication (AC5, AC8).

EditorHost: pageBoxSnapProviderOffersCornersOfTheHittableBoxes proves the
provider reads the same PageBoxHitTestSource the dispatcher hit-tests, so
a snap target cannot drift from a hit target, and that it offers corners
only.

Two defects these tests found, fixed in 12e9b91:

  - the screen-to-page conversion divided by the zoom alone. The zoom is
    half the page-to-screen scale; the other half is pixelPerMM, so on a
    96 dpi display a 2 px hit tolerance reached closer to 8 px.
    hitTestToleranceFollowsLiveViewScale fails against the old form.
  - the AC7 candidate counts ran through the trace's duration formatter,
    reporting twelve candidates as a p50 of 0.000012 ms.

Run locally against Qt 6.11.1 (mingw): UnitTestsDragSnapper 10,
UnitTestsHitTestSource 16, UnitTestsViewportController 19,
UnitTestsInteractionController 33, UnitTestsEditorHost 8, all passing,
alongside the rest of the interaction module and
scripts/verify-interaction-boundary.py. clang-format is not installed in
this environment, so the format gate is hosted-CI only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mberrys

mberrys commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaaa76a9ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread changes/cdx-0.2.0-p5session7.md Outdated
Comment thread LoupeLibInteraction/sources/preflightservice.cpp Outdated
Comment thread LoupeLibInteraction/sources/viewportcontroller.h
- keep only changes/cdx-gh139-interaction-quality-closeout.md which matches the branch, remove the two extra fragments that made check-change fail
- rewrite the summary in plain language without em dashes or dense AI-style lists
mberrys pushed a commit that referenced this pull request Sep 1, 2026
Six more scenarios covering the direct-manipulation half of issue #146's
list: hover on a dense page, drag with and without snapping, cursor-anchored
zoom, rapid zoom reversal with page switching, and a page whose overlay
exceeds its bounds.

hover-dense asserts the index candidate count rather than latency. A spatial
index that stopped narrowing and a page that simply got heavier look the same
in a frame-time percentile; only the candidate count separates them, which is
the regression issue #145 can actually suffer.

zoom-reversal is the corpus port of
InteractionControllerTest::rapidZoomReversalAndPageSwitchSettleWithinTraceBudget.
The C++ case stays where it is as the unit-level guard.

A manifest entry may now carry blocked_on with a blocked_reason. drag-snap
needs DragSnapper, which is still in PR #488, so nothing can run it yet.
Marking it explicitly is what keeps the report coverage check strict for the
other eight: without it the check would have to be relaxed for the whole
corpus, and a scenario that silently stopped running would become invisible.

Also documents the two lanes, the contract evaluation order, and the trace
stage to phase mapping in INTERACTION_CONTRACT.md, and records Q-05 in the
0.2.0 closeout matrix as partial -- no verified latency measurement exists
for this candidate, and the matrix must not imply one does.

Refs #146, #139.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWGFQCBSNwStAPYUCAZzpN
@mberrys mberrys closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant