Skip to content

[0.2.0] Interaction quality and direct-manipulation foundation #139

Description

@mberrys

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:

  1. Interaction latency and frame instrumentation.
  2. Transient InteractionState decoupled from persistent PDF state.
  3. Cached/progressive page rendering for pan and zoom.
  4. Overlay rendering for selections, guides, and preflight markers.
  5. Strict async/UI-thread boundaries for preflight, OCR, AI, and file I/O.
  6. Spatial-index hit testing and precise drag/zoom semantics.
  7. Automated interaction-performance regression tests.

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();
}
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions