mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
Merge remote-tracking branch 'origin/release/v1.42.0' into v142/t1-server
# Conflicts: # docs/api/openapi.yaml # src/lib/ai/coach/stream-events.ts # src/lib/ai/coach/types.ts
This commit is contained in:
commit
dbd9618d44
64 files changed
+4710
-245
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { CoachDayChips } from "@/components/day/coach-day-chips";
|
||||
import { memo } from "react";
|
||||
import Link from "next/link";
|
||||
import { Bot, Info, RotateCcw, Sparkles, User } from "lucide-react";
|
||||
@@ -751,6 +752,11 @@ function ChatBubbleImpl({
|
||||
section="displayed"
|
||||
/>
|
||||
)}
|
||||
{/* v1.42 — the days the turn's tools read, each opening its day.
|
||||
From the tool calls, never from the prose. */}
|
||||
{!inProgress && !errorCode ? (
|
||||
<CoachDayChips steps={steps ?? metricSource?.steps ?? []} />
|
||||
) : null}
|
||||
{/* v1.41 — what the answer assumed instead of asking, and what the
|
||||
Coach kept from this turn: one quiet line each. */}
|
||||
{settled && (metricSource?.assumptions?.length ?? 0) > 0 ? (
|
||||
|
||||
@@ -491,6 +491,7 @@ export function HealthKitMetricPage({
|
||||
valueOffset={resolvedOffset}
|
||||
onVisibleStats={onVisibleStats}
|
||||
showDataTable
|
||||
dayLinks
|
||||
/>
|
||||
{bothMeasures ? (
|
||||
<HealthChartDynamic
|
||||
@@ -513,6 +514,7 @@ export function HealthKitMetricPage({
|
||||
// two charts writing the one stats slot would replace each other's
|
||||
// window on every render without end.
|
||||
showDataTable
|
||||
dayLinks
|
||||
/>
|
||||
) : null}
|
||||
{targetSummarySlug ? (
|
||||
|
||||
@@ -5,6 +5,7 @@ import Link from "next/link";
|
||||
import { ArrowRight, CalendarDays, Moon, Smile } from "lucide-react";
|
||||
|
||||
import { ChartSkeleton } from "@/components/charts/chart-skeleton";
|
||||
import { DayLink } from "@/components/day/day-link";
|
||||
import { SectionHeading } from "@/components/ui/section-heading";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { QueryErrorRow } from "@/components/ui/query-error-row";
|
||||
@@ -90,8 +91,13 @@ export function WorkoutDetailDayContext({
|
||||
className="px-4 md:px-6"
|
||||
title={t("insights.workouts.detail.thatDayTitle")}
|
||||
action={
|
||||
<span className="text-muted-foreground text-xs">
|
||||
{fmt.dateWithWeekdaySmart(new Date(workout.startedAt))}
|
||||
// v1.42 — the date opens the whole day around the session: what
|
||||
// ran through it and everything else that happened.
|
||||
<span className="text-muted-foreground flex flex-wrap items-center justify-end gap-x-3 gap-y-1 text-xs">
|
||||
<span>{fmt.dateWithWeekdaySmart(new Date(workout.startedAt))}</span>
|
||||
<DayLink date={workout.dayKey} size="xs">
|
||||
{t("day.viewWholeDay")}
|
||||
</DayLink>
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { DayLinkAt } from "@/components/day/day-link";
|
||||
import Link from "next/link";
|
||||
import { HeartPulse, Loader2, Map as MapIcon } from "lucide-react";
|
||||
|
||||
@@ -98,13 +99,15 @@ export function WorkoutList({
|
||||
sportLabel === sportLabelKey ? workout.sportType : sportLabel;
|
||||
|
||||
return (
|
||||
<li key={workout.id}>
|
||||
<Link
|
||||
href={`/insights/workouts/${encodeURIComponent(workout.id)}`}
|
||||
// v1.42 — the row opens the workout and its date opens the day:
|
||||
// two targets, so the row is a stretched link (the sport name's
|
||||
// link covers the row) and the date sits above it.
|
||||
<li key={workout.id} className="relative">
|
||||
<div
|
||||
data-slot="workout-list-row"
|
||||
className={cn(
|
||||
"flex items-center gap-3 px-3 py-3 text-sm transition-colors",
|
||||
"hover:bg-accent focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none",
|
||||
"hover:bg-accent has-[a[data-slot=workout-list-link]:focus-visible]:ring-ring/50 has-[a[data-slot=workout-list-link]:focus-visible]:ring-2",
|
||||
)}
|
||||
>
|
||||
<span
|
||||
@@ -115,7 +118,13 @@ export function WorkoutList({
|
||||
</span>
|
||||
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
|
||||
<span className="flex items-center gap-1.5 truncate font-medium">
|
||||
{sportName}
|
||||
<Link
|
||||
href={`/insights/workouts/${encodeURIComponent(workout.id)}`}
|
||||
data-slot="workout-list-link"
|
||||
className="truncate after:absolute after:inset-0 after:content-[''] focus-visible:outline-none"
|
||||
>
|
||||
{sportName}
|
||||
</Link>
|
||||
{/* #67 — discreet glyphs flag which sessions open rich
|
||||
(map / HR curve). Muted so they never compete with
|
||||
the sport name. */}
|
||||
@@ -135,7 +144,9 @@ export function WorkoutList({
|
||||
) : null}
|
||||
</span>
|
||||
<span className="text-muted-foreground truncate text-xs">
|
||||
{formatDate(workout.startedAt, locale, timeFormat)}
|
||||
<DayLinkAt at={workout.startedAt} className="z-10">
|
||||
{formatDate(workout.startedAt, locale, timeFormat)}
|
||||
</DayLinkAt>
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex flex-col items-end gap-0.5 text-xs">
|
||||
@@ -160,7 +171,7 @@ export function WorkoutList({
|
||||
) : null}
|
||||
</span>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in new issue
Block a user