Implement the Apple Watch TOTP interface #57

Closed
opened 2026-08-09 20:00:47 +00:00 by hugo · 2 comments
Owner

Goal

Implement the focused Apple Watch interface for quickly reading shared TOTP codes.

Scope

  • Replace the placeholder Watch screen with a concise list of shared TOTP entries and a detail view optimized for short wrist interactions.
  • Show the selected code in large digits with issuer/account context and a clear remaining-time indicator, using view-ready Rust results.
  • Support empty, syncing, stale, locked, unavailable, and error states without exposing secret parameters.
  • Refresh display timing efficiently while visible; passive timer updates must not manufacture new domain state in Swift.
  • Work offline from the secure local snapshot and reconcile when a newer iPhone snapshot arrives.
  • Keep the companion limited to TOTP viewing: no repository browsing, password viewing/editing, Git, key import, application-token entry, or command surface.

Acceptance criteria

  • A shared entry can be found and its current code read quickly with large text on supported Watch sizes.
  • The UI remains usable with the Digital Crown, Dynamic Type, VoiceOver, Always-On/privacy behavior, lock, and wrist-down lifecycle.
  • Empty/sync/error states explain the next action without requiring the iPhone to be reachable for normal code display.
  • Swift renders Rust-provided labels, codes, and timing only; it does not calculate TOTP.
## Goal Implement the focused Apple Watch interface for quickly reading shared TOTP codes. ## Scope - Replace the placeholder Watch screen with a concise list of shared TOTP entries and a detail view optimized for short wrist interactions. - Show the selected code in large digits with issuer/account context and a clear remaining-time indicator, using view-ready Rust results. - Support empty, syncing, stale, locked, unavailable, and error states without exposing secret parameters. - Refresh display timing efficiently while visible; passive timer updates must not manufacture new domain state in Swift. - Work offline from the secure local snapshot and reconcile when a newer iPhone snapshot arrives. - Keep the companion limited to TOTP viewing: no repository browsing, password viewing/editing, Git, key import, application-token entry, or command surface. ## Acceptance criteria - A shared entry can be found and its current code read quickly with large text on supported Watch sizes. - The UI remains usable with the Digital Crown, Dynamic Type, VoiceOver, Always-On/privacy behavior, lock, and wrist-down lifecycle. - Empty/sync/error states explain the next action without requiring the iPhone to be reachable for normal code display. - Swift renders Rust-provided labels, codes, and timing only; it does not calculate TOTP.
hugo added this to the 04 - iPhone and Apple Watch apps milestone 2026-08-09 20:00:47 +00:00
hugo added the enhancement label 2026-08-09 20:00:47 +00:00
hugo added the untested label 2026-08-16 12:38:28 +00:00
Author
Owner

Implemented in e54d91a. Replaced the placeholder with a native SwiftUI TOTP list and large-code detail screen using Rust-provided states, labels, codes, periods, and remaining time. Rust now owns ready/empty/syncing/stale/locked/unavailable/error presentation, while native List/ScrollView navigation supplies Digital Crown scrolling, semantic fonts support Dynamic Type, and privacySensitive masks codes for system privacy/Always-On behavior. Offline saved snapshots remain usable and newer contexts reconcile through the existing receiver. Verified with focused Watch state/lifecycle tests, regenerated UniFFI bindings, a successful ARM64 Watch simulator compile/link, and all required Rust formatting/check/Clippy/workspace-test gates. Marked untested because Apple Watch deployment and interactive Watch testing were explicitly skipped.

Implemented in e54d91a. Replaced the placeholder with a native SwiftUI TOTP list and large-code detail screen using Rust-provided states, labels, codes, periods, and remaining time. Rust now owns ready/empty/syncing/stale/locked/unavailable/error presentation, while native List/ScrollView navigation supplies Digital Crown scrolling, semantic fonts support Dynamic Type, and privacySensitive masks codes for system privacy/Always-On behavior. Offline saved snapshots remain usable and newer contexts reconcile through the existing receiver. Verified with focused Watch state/lifecycle tests, regenerated UniFFI bindings, a successful ARM64 Watch simulator compile/link, and all required Rust formatting/check/Clippy/workspace-test gates. Marked untested because Apple Watch deployment and interactive Watch testing were explicitly skipped.
hugo closed this issue 2026-08-16 12:38:43 +00:00
hugo reopened this issue 2026-08-16 12:57:44 +00:00
Author
Owner

Completed the Apple Watch TOTP interface in commits e54d91a and b50e47a. The Watch consumes Rust-provided selected-entry records only, keeps the snapshot in the Watch Keychain for offline use, presents a names-only list, and shows the selected entry on a detail screen with a larger privacy-sensitive code and a draining remaining-validity bar. Verified on the paired iPhone 17 Pro / IronStorage Watch simulators with normally signed builds: one iPhone-selected entry was the only Watch list item; tapping it opened the large-code detail; the seconds and bar advanced; the Rust-provided code changed at rollover; and the entry survived stopping the iPhone app plus terminating/relaunching the Watch app. Required checks passed: cargo fmt --all -- --check; RUSTFLAGS=-D warnings cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; xcodegen generate; signed ARM64 iPhone/Watch simulator build. Physical Apple Watch testing remains intentionally skipped, so the untested label is retained.

Completed the Apple Watch TOTP interface in commits e54d91a and b50e47a. The Watch consumes Rust-provided selected-entry records only, keeps the snapshot in the Watch Keychain for offline use, presents a names-only list, and shows the selected entry on a detail screen with a larger privacy-sensitive code and a draining remaining-validity bar. Verified on the paired iPhone 17 Pro / IronStorage Watch simulators with normally signed builds: one iPhone-selected entry was the only Watch list item; tapping it opened the large-code detail; the seconds and bar advanced; the Rust-provided code changed at rollover; and the entry survived stopping the iPhone app plus terminating/relaunching the Watch app. Required checks passed: cargo fmt --all -- --check; RUSTFLAGS=-D warnings cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; xcodegen generate; signed ARM64 iPhone/Watch simulator build. Physical Apple Watch testing remains intentionally skipped, so the untested label is retained.
hugo closed this issue 2026-08-16 13:20:08 +00:00
Sign in to join this conversation.