mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
style(insights): prettier sweep on C1 + C2 wire-up files
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8a5b6de27e
commit
c63cddc6dd
3 files changed
+10
-9
No files matched your search
@@ -217,9 +217,9 @@ test.describe("insights advisor card on /insights (C1)", () => {
|
||||
|
||||
// Hero + advisor card both render. The hero is from B1b; the
|
||||
// advisor card is the C1 deliverable.
|
||||
await expect(
|
||||
page.locator('[data-slot="insights-page-hero"]'),
|
||||
).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.locator('[data-slot="insights-page-hero"]')).toBeVisible({
|
||||
timeout: 10_000,
|
||||
});
|
||||
|
||||
// The recommendation card surface from B5c — `data-slot` markers
|
||||
// are pinned in tests, look for the rec text the mock provided.
|
||||
|
||||
+1
-4
@@ -964,10 +964,7 @@ export default function DashboardPage() {
|
||||
order: widgetOrder("mood"),
|
||||
count: moodSummary?.count ?? 0,
|
||||
node: (
|
||||
<MoodChart
|
||||
key="mood-chart"
|
||||
compareBaseline={compareBaseline}
|
||||
/>
|
||||
<MoodChart key="mood-chart" compareBaseline={compareBaseline} />
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -63,7 +63,9 @@ export interface UseInsightsAdvisorResult {
|
||||
* Read-only consumer for the advisor payload. Use this on surfaces that
|
||||
* just want to render the cached insight (e.g. dashboard preview).
|
||||
*/
|
||||
export function useInsightsAdvisorQuery(enabled: boolean): UseInsightsAdvisorResult {
|
||||
export function useInsightsAdvisorQuery(
|
||||
enabled: boolean,
|
||||
): UseInsightsAdvisorResult {
|
||||
const queryClient = useQueryClient();
|
||||
const query = useQuery({
|
||||
queryKey: queryKeys.insightsAdvisor(),
|
||||
@@ -80,7 +82,9 @@ export function useInsightsAdvisorQuery(enabled: boolean): UseInsightsAdvisorRes
|
||||
if (next) {
|
||||
queryClient.setQueryData(queryKeys.insightsAdvisor(), next);
|
||||
} else {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.insightsAdvisor() });
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: queryKeys.insightsAdvisor(),
|
||||
});
|
||||
}
|
||||
// Per-status caches are evicted server-side on regenerate; refresh
|
||||
// their query subtree so the per-section text below the advisor card
|
||||
|
||||
Reference in new issue
Block a user