Skip to content

The preview instrumentation is print — convert it, but keep the shape #111

Description

@liversedge

From PinPointStudio's preview handover, 28 August 2026, §4.3.

What is committed, and why

LivePreview and AppModel carry print("[preview] …") calls — committed deliberately, by them, because this application has no logging framework and print on a device console is what made nine defects findable at all. Reading it took about ninety seconds and should have been the first thing anyone did.

Sources/Platform/Capture/LivePreview.swift:174   print("[preview] sent=\(segmentsSent) tapped=\(framesTapped)")
Sources/Platform/Capture/LivePreview.swift:182   print("[preview] REFUSED after \(framesTapped) frame(s): \(text)")

The ask, which is about shape and not about print

Convert it to whatever this application adopts — but keep the shape:

  • Per-stage counters, not one boolean. framesTapped, segmentsSent, lastError are three numbers whose first zero names the break: tapped 0 means the camera is not feeding, tapped>0 with sent 0 means the producer is refusing, sent>0 with a black tile means it is the wire or the host.
  • A named reason, verbatim, on every refusal. "It did not work" is what cost the two days.

⚠ Every preview refusal now names itself. Do not lose that in the conversion.

Where it belongs

This is E10's territory — #48 (E10.1, one file a maintainer can diagnose from) and #50 (E10.3, diagnostic mode). ⚠ Do not strip the prints before their replacement exists — the next hardware session still needs them.

Exit criterion

The preview path logs through the adopted framework, the three counters survive into the diagnostic bundle, and a refusal's reason appears there verbatim.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer: platformSources/Platform — the only place platform types liverelease: v1PRD §10.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions