Skip to content

Major update of AI coach#65

Merged
saksham2001 merged 6 commits into
mainfrom
feature/coach-transparency-context
Jul 9, 2026
Merged

Major update of AI coach#65
saksham2001 merged 6 commits into
mainfrom
feature/coach-transparency-context

Conversation

@saksham2001

@saksham2001 saksham2001 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Features

  • Per-message tool-call traces in chat — expandable disclosure + live step-chain while generating
  • Workouts logged from chat render the real workout card, tappable to workout detail
  • Token & cost tracking per message/conversation (all providers; exact billed cost on OpenRouter) with ⓘ usage sheet in chat header
  • Opt-in location + weather coach context (WeatherKit, city-level only, cached for background use) across chat, summary cards, and notifications
  • Notification/summary variety: rotating coaching angles + prompt changes block
  • Weather-aware check-ins that call out extreme conditions with a practical tip
  • Compact context mode for the on-device Apple model (trimmed packet, short prompt, 4-turn history)
  • Follow-up questions capped at 2 — single compact row on Today/Sleep cards, full-width wrapping rows in chat

Bug fixes

  • Sleep summaries no longer generate from partial nights — gated on a full sync completing after the sleep session ends (with regeneration if late data grows the night); morning check-in waits for post-wake sync with an auto-retry
  • Logging a workout for "today" without a start time failed any time before ~12:30pm (noon default rejected as ends-in-future): start now clamps back so the session ends at the current time
  • On-device model truncated history mid-sentence — now drops whole oldest turns
  • Weather fetch retried on every coach touchpoint after failure — added a 5-min cooldown
  • Reduced gratuitous safety/data-quality note cards (null-by-default prompt rules; removed hardcoded notes from fallback responses)

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 📟 New / improved wearable support (BLE driver layer)
  • 🤖 Coach / LLM change (tools, prompts, orchestration)
  • 🎨 UI / DesignSystem change
  • 🧹 Refactor / chore (no behavior change)
  • 📝 Docs only
  • ⚠️ Breaking change (existing data, settings, or APIs change)

How was this tested?

Tested on iPhone 16 Pro with Colmi R11

  • Added / updated unit tests (PulseLoopTests)
  • Ran the test suite locally (⌘U in Xcode)
  • Tested on a physical device with a real ring — model:
  • Tested with demo data (-seedDemo YES, no hardware)
  • N/A (docs / non-code change)

Privacy & data

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

Screenshots / recordings

Checklist

  • My code follows the project's style (SwiftLint passes).
  • I ran the tests and they pass.
  • I updated docs / README where relevant.
  • I read the Contributing guide.

…ency (cost, tool calls), optional weather and location for coach
@saksham2001 saksham2001 changed the title major rehaul of AI coach: UI changes to chat and cards, more transpar… Major update of AI coach Jul 9, 2026
@saksham2001
saksham2001 merged commit 4a60cfe into main Jul 9, 2026
4 checks passed
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.

1 participant