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.
This commit is contained in:
Marc-André Bombeck committed 2026-06-01 22:51:10 +02:00
1 parent ac51cfdc18
commit a3b34bc0cf
1 file changed
+55
@@ -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");
});
});