id: rb-result-view feature: 5-result-view branch: feat/5-result-view status: draft created: 2026-09-10 depends_on: [4-analysis]

PRD — Result view

Goal

Show the answer, and show enough of the working to be believed.

Why

Phase 4 produces the number and prints it as a line of small text under a button. That was deliberate, enough to check against the test suite and no more. What the user needs is different: one figure they can read while crouching next to a running engine, and a picture that lets them judge whether the app heard what they heard.

The picture is not decoration. The method fails by a factor of two, and a marked waveform makes that visible at a glance: markers on every second combustion, or two markers per combustion, are obvious to a human and invisible in a number. It is the cheapest confidence check the app can offer, and the reason pulseTimesS was produced in phase 4 rather than left to this phase.

User stories

  1. As a user standing over an engine, I read the RPM at arm's length without putting my face near the phone.
  2. As a user who is not sure the app got it right, I look at the marks on the waveform and see whether they land on the beats I can hear.
  3. As a user whose reading looks wrong, I move the crop and try again without losing my place.
  4. As a user whose recording was unreadable, I see why, with the crop still there to adjust.

Scope

In

Out

Acceptance criteria

  1. Each of the seven fixtures, analysed at its default window, shows a number matching the test suite and marks whose count is within 5 % of pulsesPerS * windowLength.
  2. The marks line up with the envelope peaks, not with an arbitrary grid: on a synthetic clip of a known rate the mark times are within 10 ms of the pulses.
  3. At 360 px wide the number and the marked waveform are both visible without scrolling, with a 10 s window loaded.
  4. Moving the crop window clears the number and the marks together.
  5. An unreadable clip shows the failure message where the number would be, and leaves the crop, the range fields and Calculate usable.
  6. A result corrected by the expected range says so.
  7. The number is legible in both colour schemes and does not reflow when it changes from three digits to four.
  8. npm test, npm run lint and npm run build pass.

Non-goals and constraints

Open questions