feat: prepare the next visit from the server's notable window

The block under a planned visit read the day index and up to twelve days
to find what changed, so a dose change on a quiet day could fall out of
the picked days. It now reads GET /api/day/notable for the stretch from
the last visit to today: every change the server names, every notable
reading.

Add a guard that walks every chart, chart mount and calendar heatmap and
fails when one drawn in days lacks the day doors and is not on the
reasoned NOT_HERE list. Give the dose-strength curve, the efficacy chart,
the mood dimensions, the intraday pulse header and the environment note
the same doors.
This commit is contained in:
Marc-André Bombeck committed 2026-10-08 15:30:12 +02:00
1 parent 866e871102
commit c41ec02e92
24 files changed
+1048 -385

No files matched your search

+13 -1
View File
@@ -20,6 +20,11 @@ import { useQuery } from "@tanstack/react-query";
import { CloudSun } from "lucide-react";
import { TagChip } from "@/components/ui/tag-chip";
import {
DAY_LINK_SLOT,
DayLink,
withDayLinkSlot,
} from "@/components/day/day-link";
import { useAuth } from "@/hooks/use-auth";
import { apiGet } from "@/lib/api/api-fetch";
import {
@@ -91,7 +96,14 @@ export function EnvironmentChip() {
>
<CloudSun className="text-muted-foreground size-4" aria-hidden />
<span className="text-muted-foreground text-xs">
{t("environment.chip.day", { date })}
{/* v1.42 — the date opens the day it names, the one thing every
date in the app does. */}
{withDayLinkSlot(
t("environment.chip.day", { date: DAY_LINK_SLOT }),
<DayLink date={day.date} size="xs">
{date}
</DayLink>,
)}
</span>
{flags.map((flag) => (
<TagChip key={flag.kind} data-flag={flag.kind}>