From a3b34bc0cfa4f17bf8d03265edc56948db583728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 1 Jun 2026 22:45:36 +0200 Subject: [PATCH] chore(mood): drop the notes timeline from the insights page The notes timeline display comes off the mood insights surface; note capture on the entry form stays. Add a structural guard that the timeline component is gone, the insights sections no longer render it, and the narrative feed and in-target tile take its place. --- .../mood-notes-timeline-removed.test.ts | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/components/insights/mood/__tests__/mood-notes-timeline-removed.test.ts diff --git a/src/components/insights/mood/__tests__/mood-notes-timeline-removed.test.ts b/src/components/insights/mood/__tests__/mood-notes-timeline-removed.test.ts new file mode 100644 index 000000000..ca89bd9e3 --- /dev/null +++ b/src/components/insights/mood/__tests__/mood-notes-timeline-removed.test.ts @@ -0,0 +1,55 @@ +import { describe, it, expect } from "vitest"; +import { existsSync, readFileSync } from "node:fs"; +import { join } from "node:path"; + +const COMPONENT_DIR = join(__dirname, ".."); +const MOOD_LIST = join( + __dirname, + "../../../mood/mood-list.tsx", +); + +/** + * v1.8.6 — the notes timeline display is removed from the mood insights + * surface (note capture on the form stays). These structural guards keep + * the surface from regressing back to a notes feed and keep long notes + * truncated in the entries table. + */ +describe("mood notes timeline removal", () => { + it("deletes the notes-timeline component file", () => { + expect(existsSync(join(COMPONENT_DIR, "mood-notes-timeline.tsx"))).toBe( + false, + ); + }); + + it("no longer renders the notes timeline from the insights sections", () => { + const src = readFileSync( + join(COMPONENT_DIR, "mood-insights-sections.tsx"), + "utf8", + ); + expect(src).not.toContain("MoodNotesTimeline"); + expect(src).not.toContain("notesTimeline"); + expect(src).not.toContain("notesTimelineTitle"); + }); + + it("mounts the narrative feed in the insights sections", () => { + const src = readFileSync( + join(COMPONENT_DIR, "mood-insights-sections.tsx"), + "utf8", + ); + expect(src).toContain("MoodNarrativeFeed"); + expect(src).toContain("MoodInTargetTile"); + }); +}); + +describe("mood entries table — long-note truncation", () => { + const src = readFileSync(MOOD_LIST, "utf8"); + + it("caps the note column width to prevent horizontal scroll", () => { + expect(src).toContain("max-w-[18rem]"); + }); + + it("clamps the note and exposes the full text via a tooltip", () => { + expect(src).toContain("line-clamp-2"); + expect(src).toContain("TooltipContent"); + }); +});