# Training Atlas — one reading instrument

The selected reading, its date range and the curve now form one navy instrument. The lime signal and existing health navigation remain recognizable at first sight.

## Brief and decision

A reader arrives to answer: “What happened on this night, relative to the surrounding weeks?” The baseline phone view spends the first 443px on the application header, health heading, dates, selected reading and period controls before reaching the curve. The first candidate grouped the date controls with the reading but kept both headers. The final phone view gives the existing health header ownership of Back and health actions; Today remains in the bottom navigation.

At 390px, the chosen night and range sit beside each other and the source sits beneath them. At 320px, a native period selector shares the reading row, preserving the 44px interaction height while fitting the complete plot into the first screen. Desktop retains the existing sidebar and presents a larger 260px plot.

The 320px plot is 180px tall, compared with the baseline’s 220px. This is a deliberate short-window composition: the complete curve and its axis fit above the bottom tabs. The 390px plot grows from 220px to 240px.

## Observed result

| Measurement | Before | After |
| --- | ---: | ---: |
| 390px curve top | 443.19px | 324.98px |
| 320px curve top | 456.78px | 283.63px |
| 320px reading card fully inside viewport | No | Yes |
| Desktop curve height | 220px | 260px |

The same selected reading is 70.9ms on 2026-11-16, with the same 28-day window ending 2026-12-04. The original metric calculations and selection state are preserved. Night-HRV measurement detail now routes to `night_hrv`, so the selected70.9ms reading opens its actual70.92ms source record.

## Behavior verification

The maintained `health-trend-selection.browser.py` regression passed nine metric/viewport combinations (HRV, resting heart rate, recovery × desktop, phone, narrow) and three extra range cases. It exercised pointer selection, drag, keyboard Home/End/Escape, selected-day links, direct reload, browser Back/Forward, the contextual app Back and keyboard return, missing readings and history length. The test uses the new native period selector at 320px.

The result is in `verification/health-trend-selection-results.json`. Build passed with `npm run build`.

From the isolated Atlas current directory:

```sh
ATLAS_TEST_URL=http://127.0.0.1:39872 \
ATLAS_TEST_DEV_SECRET=atlas-v07-isolated-fixture \
ATLAS_TEST_OUTPUT=/home/nvidia/ping/productive-ui/.artifacts/product-refinements-v07/atlas/verification \
CHROMIUM_EXECUTABLE=/usr/bin/google-chrome \
python3 tests/health-trend-selection.browser.py
```

## Fixture and reference mechanism

Copy `seed.mts` into the isolated Atlas parent directory beside `baseline/` and `current/`. After starting both local servers, run `node --experimental-transform-types seed.mts` there. It creates Alex using the synthetic fixture secret in `services.json` and seeds the original 359-record, 30-day wellness fixture. The replay fixture date is also saved in `verification/recovery-journey-fixtures.json`.

The reference mechanism considered was [Oura’s Trends](https://support.ouraring.com/hc/en-us/articles/360055983614-Using-Trends): keep time scale and historical observations near the trend. Atlas keeps its own navy/lime visual language, source labeling and selected-day deep links.

## Matched evidence

The screenshots render the actual application, with the same original synthetic case data, route, browser clock, locale and viewport before and after. No screenshot was reconstructed or edited. The capture clock is 2026-12-04T12:00:00Z; locale is zh-TW and timezone is Asia/Taipei.

| View key | Viewport | Before | After |
| --- | --- | --- | --- |
| desktop | 1440 × 1000 | before-desktop.png | after-desktop.png |
| phone | 390 × 844 | before-phone.png | after-phone.png |
| narrow | 320 × 568 | before-narrow.png | after-narrow.png |

`comparison.json` contains the explicit-selector workspace measurements, full interface audit findings and browser errors. The three final views have zero reported interface findings and zero page errors. The target threshold used for the audit is 24px and the minimum text threshold is 12px. The workspace geometry and sampled hit tests are retained as measurements, without converting them into a design score.

`candidate-a-desktop.png` and `candidate-a-phone.png` preserve the first implemented candidate. Final captures include the later refinements and regressions described here.

## Source and replay

`source.json` records the original repository revision, preexisting working-tree changes, and exact changed-file list. `change.patch` is a normal unified source patch from the captured baseline to this refinement. Apply it to a separate copy of that baseline. Existing production repositories, databases and services were left running.

The current isolated source is `/home/nvidia/ping/productive-ui/.artifacts/product-refinements-v07/atlas/current`; the matched baseline is its `baseline` sibling. `services.json` records the exact working directory, command arguments, environment and loopback URL for both previews. The six existing previews remain available for independent review.

To reconstruct sources in a fresh directory:

1. Export the revision in `source.json` from the original repository with `git archive REVISION`, and extract it into a new `baseline` directory.
2. For Kanso, apply `baseline-working-tree.patch` to that baseline and copy the contents of `baseline-extra-source/` into it. These files preserve the user’s existing development work at the start of this study.
3. Copy `baseline` to a sibling `current`, and apply `change.patch` inside `current` using `patch -p1 -i /absolute/path/to/change.patch`.
4. Install the repository’s locked dependencies in each isolated source tree. Build using the commands below. Keep all database and export paths inside the new isolated directory.
5. Launch both commands in `services.json`, substituting the new isolated paths. Use the same listed ports for the supplied capture script. Seed the original synthetic data as described above.

From the Productive UI repository, capture the already-running matched previews with:

```sh
node scripts/verify-product-refinements.mjs atlas
```

The command writes only the new `v07` evidence. The earlier product case screenshots, patches and evaluation files remain separate.

## Independent-review refinement

The linked sleep and measurement destinations now share the single contextual header. A selected night appears ahead of optional date-range editing; the date control expands the existing period tools. The independent reviewer reproduced and retested the original wrong-metric destination. The final regression also opens the actual reading, expands its date control and returns with keyboard, browser navigation and reload. [Replay output](verification/final-reading-replay.txt).

### Final contextual-header repair

The independent narrow-screen follow-up found the metric selector squeezed to31.83 px. The contextual record header now keeps Add and the existing More entry; coach and device controls remain reachable inside that menu. Sleep uses the same header action row, reclaiming its separate entry row. At320 px the complete Night HRV label is visible and the sleep reading begins around y149.

The maintained browser replay now checks the actual selected label width, the relocated coach/device entries, Escape focus return, and same-row sleep action alongside the 9 metric/viewport and 3 range journeys. The final production build and all 12 journeys passed. [Independent follow-up](../../../../reviews/v07/products-review.md).

The final keyboard retest opens the relocated device and coach dialogs with Enter and returns focus to the visible More summary on Escape. The date disclosure also closes from its input and restores its own summary. The same paths are included in the maintained regression.
