Update Timer screen metrics to show C1-C4 duration#7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4788eb779
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <Text style={styles.metricLabel}>Totality Duration</Text> | ||
| <Text style={styles.metricValue}> | ||
| {formatDuration(timer.result.durationSeconds)} |
There was a problem hiding this comment.
Keep C2-C3 duration label accurate for annular eclipses
durationSeconds is derived from c2→c3 for both total and annular events, so labeling it as Totality Duration is incorrect whenever kindAtLocation === "annular". In those cases the UI reports annularity time with a totality label, which is a user-facing accuracy issue; use a neutral label (e.g., central/phase duration) or switch the label by eclipse type.
Useful? React with 👍 / 👎.
Motivation
Magnitudevalue with a full-eventC1-C4 Duration(elapsed time from first to last contact).Central DurationtoTotality Durationfor better user understanding.Description
Magnitudedisplay and addedC1-C4 Durationrendering inapps/mobile/src/screens/TimerScreen.tsx.parseUtcTimestampandformatC1ToC4Durationhelpers to compute elapsed time fromc1Utctoc4Utcwith safe--fallbacks when timestamps are missing or invalid.Central DurationtoTotality Durationwhile continuing to display the existingdurationSecondsvalue.1.1.16inapps/mobile/package.jsonand added a1.1.16entry toCHANGELOG.mddocumenting these changes.Testing
pnpm -C apps/mobile typecheckand it completed successfully.pnpm -C apps/mobile test(Vitest) and all tests passed (5test files,16tests total).Codex Task