Fixed in https://github.com/badbundle/vault-app/pull/634 (merged as b20e8886).
The setting: a new Show Next Code toggle in the Codes section, under Tap a Code To. It's off by default, and the Codes footer explains it.
What it shows: when it's on, a time-based code shows "Next 654 321" in small text just above its timer bar, on feed cards and on the code's page.
- It appears for the last 10 seconds of a period. For a period too short for that, it's the last third, so 5 s of a 15 s code.
- At the end of the period, the next code becomes the current one.
Layout: the label sits in the space that was already above the bar, so the card doesn't move, and TOTP and HOTP code sizes stay matched (#600).
When it's hidden: anything that hides the current code hides the next one too. That covers locked, private, expired or errored codes, and editing.
Copying: tapping during that window still copies the current code.
Out of scope: HOTP, AutoFill and widgets never show it.
Accessibility: VoiceOver reads it as "Next code, 654, 321".
Tests:
- Unit tests for when it shows, including at the period edges.
- The RFC 6238 value across a period edge.
- The view model hiding it and still copying the current code.
- Default and persistence.
- Snapshots of cards (light, dark, larger text, editing, setting off), TOTP beside HOTP at 6 and 8 digits, the detail page and Settings.