Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(ui): coach summary owns the top card and no longer duplicates on Today - #42

Merged
saksham2001 merged 4 commits into
saksham2001:mainfrom
rgvxsthi:fix/coach-card-placement
Jul 8, 2026
Merged

saksham2001 merged 4 commits into
saksham2001:mainfrom
rgvxsthi:fix/coach-card-placement

Conversation

@rgvxsthi

@rgvxsthi rgvxsthi commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

On the Today tab the coach summary rendered twice: the top HeroInsightCardView
and a bottom CoachMessageCard both derive from TodayInsights.deriveHero, so
whenever the coach summary fell back to the hero text (coach off, or the summary
call failed) both cards showed the same "Steady build" content.

  • Today: the coach now owns the single top card (tap → chat) when enabled;
    the deterministic hero fills that slot only when the coach is off. The
    duplicate bottom card is removed.
  • Sleep: the coach card moves to the top, in line with Today.

Related issues

N/A

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • 🎨 UI / DesignSystem change

How was this tested?

  • Ran the test suite locally (244 tests, 0 failures)
  • Tested with demo data (no hardware) — sideloaded build: Today shows one coach card (no duplicate); Sleep coach card renders at the top
  • Tested on a physical device with a real ring

Privacy & data

  • This change does not send health data off-device without explicit user action.
  • No secrets, API keys, or personal data are committed.

Checklist

  • My code follows the project's style (SwiftLint passes — no new violations).
  • I ran the tests and they pass.

…Today

On the Today tab the coach summary rendered twice — the top HeroInsightCardView
and a bottom CoachMessageCard both derive from TodayInsights.deriveHero, so
whenever the coach summary fell back to the hero text (coach off, or the summary
call failed) both cards showed the same content.

- Today: the coach now owns the single top card (tap → chat) when enabled; the
  deterministic hero fills that slot only when the coach is off. The duplicate
  bottom card is removed.
- Sleep: the coach card moves to the top, in line with Today.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@rgvxsthi
rgvxsthi requested a review from saksham2001 as a code owner July 4, 2026 15:29
@saksham2001
saksham2001 merged commit 9633fe3 into saksham2001:main Jul 8, 2026
2 checks passed
@rgvxsthi
rgvxsthi deleted the fix/coach-card-placement branch July 16, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants