feat: widget has two tap targets — fitness + add food
All checks were successful
Security Checks / dependency-audit (push) Successful in 13s
Security Checks / secret-scanning (push) Successful in 3s
Security Checks / dockerfile-lint (push) Successful in 4s

Widget background tap → platform://fitness → opens Fitness tab
Widget + button tap → platform://add-food → opens Fitness + food assistant

Small widget: + button in bottom-right corner (emerald green)
Medium widget: + button in bottom-right corner
Lock screen widgets: single tap → fitness (no room for + button)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-04 11:45:08 -05:00
parent 7cfe3eeed5
commit a5c95c2e5f
2 changed files with 45 additions and 22 deletions

View File

@@ -121,9 +121,15 @@ struct MainTabView: View {
AssistantSheetView(onFoodAdded: foodAdded)
}
.onOpenURL { url in
if url.scheme == "platform" && url.host == "add-food" {
selectedTab = 1 // Fitness tab
guard url.scheme == "platform" else { return }
switch url.host {
case "fitness":
selectedTab = 1
case "add-food":
selectedTab = 1
showAssistant = true
default:
break
}
}
.task {