Problem
Loupe needs an explicit interaction-quality architecture so pointer movement, selection, pan, zoom, and direct manipulation remain responsive even while PDF parsing, rendering, preflight, OCR, AI, and file I/O are active. This is a cross-cutting product-quality initiative, not a duplicate of the closed historical performance records #105 and #115 .
The target is predictable latency and frame pacing:
Interaction
Target
Pointer hover / selection feedback
next rendered frame
Drag / resize preview
display-refresh paced; no document-engine wait
Pan / zoom
continuous; no blocking
Page switch acknowledgement
<50 ms perceived
Expensive analysis
asynchronous and progressively surfaced
Child issues
Scope
The child issues cover:
Interaction latency and frame instrumentation.
Transient InteractionState decoupled from persistent PDF state.
Cached/progressive page rendering for pan and zoom.
Overlay rendering for selections, guides, and preflight markers.
Strict async/UI-thread boundaries for preflight, OCR, AI, and file I/O.
Spatial-index hit testing and precise drag/zoom semantics.
Automated interaction-performance regression tests.
Acceptance criteria
Every child issue has an implementation contract, acceptance criteria, dependencies, and test strategy.
Pointer movement never requires a persistent PDF mutation or synchronous expensive analysis.
Cached page content, transient interaction state, overlays, async jobs, and document commits have explicit revision/ownership boundaries.
Representative traces cover hover, selection, drag, pan, zoom, page switch, and analysis running in the background.
Performance results distinguish verified measurements from infrastructure-blocked or unavailable GPU/desktop runs.
Any implementation that touches existing preflight finding navigation or partial-page rendering remains compatible with Add finding-to-canvas navigation and page/object overlays in the Editor #89 and [Deferred] Generalize partial-page render after second consumer #54 ; neither closed historical issue [Deferred epic] Performance infrastructure — measure first #105 nor [P2] Performance validation: zoom + automation diagnostic tests #115 is reopened or duplicated.
Dependencies
Pseudocode
```cpp
void Canvas::onPointerMove(Point screenPoint) {
interaction.pointer = screenPoint;
interaction.hovered = spatialIndex.hitTest(viewport.toDocument(screenPoint));
if (interaction.drag.active)
interaction.preview = dragController.preview(screenPoint);
frameScheduler.request();
}
void Canvas::onPointerUp(Point screenPoint) {
if (interaction.drag.active)
documentQueue.submit(makeSemanticOperation(interaction.drag, screenPoint));
interaction.drag.reset();
}
```
Problem
Loupe needs an explicit interaction-quality architecture so pointer movement, selection, pan, zoom, and direct manipulation remain responsive even while PDF parsing, rendering, preflight, OCR, AI, and file I/O are active. This is a cross-cutting product-quality initiative, not a duplicate of the closed historical performance records #105 and #115.
The target is predictable latency and frame pacing:
Child issues
Scope
The child issues cover:
Acceptance criteria
Dependencies
Pseudocode
```cpp
void Canvas::onPointerMove(Point screenPoint) {
interaction.pointer = screenPoint;
interaction.hovered = spatialIndex.hitTest(viewport.toDocument(screenPoint));
if (interaction.drag.active)
interaction.preview = dragController.preview(screenPoint);
frameScheduler.request();
}
void Canvas::onPointerUp(Point screenPoint) {
if (interaction.drag.active)
documentQueue.submit(makeSemanticOperation(interaction.drag, screenPoint));
interaction.drag.reset();
}
```