id: rb-ui-overhaul feature: 8-ui-overhaul branch: feat/8-ui-overhaul status: approved created: 2026-09-10 depends_on: [7-i18n]

PRD — UI overhaul

Goal

The app uses the screen it is on. It splits into two columns when there is width, it has a light theme beside the dark one, and the answer is never below the fold.

Why

This phase was scheduled last so the whole screen could be judged at once. It now can be, and it does not hold up. Measured on the live build at 844×390, with a result on screen:

Content column 480 px of 844
Empty gutter 364 px, 43 % of the screen
Page height 778 px against a 390 px viewport
Answer position 553 px down, two swipes past the button that produced it

Turning the phone sideways makes the app narrower, not wider. The 480 px cap that makes portrait comfortable is the same cap that ruins landscape: no pixel of the extra width can be used, so the extra height is spent instead.

Landscape is not a nicety here. The app is used crouched next to a running engine, which is the position in which a phone is held sideways, and the result waveform drew 132 marks across roughly 360 px — one every 2.7 px, which renders as a solid fence. Those marks exist so a person can catch a doubled or halved beat, and at portrait width they cannot. Width is what makes the evidence readable.

The research, the seven reference apps and the three layouts considered are in inspiration.md. Layout A, split columns, was chosen on 2026-09-10 and drawn at eleven screen sizes in the canvas under canvas/.

User stories

  1. As a rider crouched over an engine with the phone sideways, I read the number without scrolling.
  2. As a rider on a cheap 360×640 phone, everything still fits without scrolling.
  3. As a rider working in daylight, the app is readable in a light theme; at night it is dark without my asking.
  4. As an Urdu reader, the layout reads right to left, while the waveform and the numbers still read left to right.
  5. As a rider who doubts the reading, I can see the individual marks well enough to count them.
  6. As a rider who just wants the number, the screen after Calculate leads with the number rather than with the controls that produced it.

Scope

In

Out

Acceptance criteria

  1. At each of 360×640, 390×844, 430×932, 820×1180 and all four rotations, with a 10 s window loaded and a result shown, nothing scrolls and nothing is clipped.
  2. At 844×390 the RPM number is fully visible without scrolling, at the moment the result arrives.
  3. The layout splits at 600 px wide and stacks at 599 px, verified at both.
  4. At 844×390 the waveform canvas is at least 500 px wide, so a 10 s window at 13 pulses a second puts the marks at least 3.4 px apart, up from 2.7 today.
  5. Every colour in both themes comes from the index.css token set. Muted text on the background meets 4.5:1 in both, and the record dot and the error red are legible on the light ground.
  6. An OS reporting no colour-scheme preference gets the dark theme, and a stored override in settings beats the OS in both directions and survives a reload.
  7. With Urdu selected the columns mirror, and the digits, the time readouts and the waveform still run left to right.
  8. LONG_CLIP_S is gone. The overview strip appears when the clip is longer than the measured canvas width divided by 12 px per second, which reproduces 30 s at a 360 px canvas.
  9. The language picker and the theme override are both in the settings surface and neither appears in the measure-an-engine flow. 9a. Calculate on a clip longer than the detail range snaps the detail view to the analysed window, and dragging a crop handle outward restores a wider view without a second control.
  10. In portrait the detail waveform has 8 px clear on each side.
  11. npm test, npm run lint and npm run build pass, and a Playwright pass exercises upload, crop drag, play and Calculate at the eight sizes in criterion 1, in both themes.

Non-goals and constraints

Decided

Open questions