feat(journal): add per-user mood journal module (task 86)

Ship journal entries with mood tracking, insights, and Recharts charts.

Adds v1 API endpoints per ADR 0005 and migration 0020_journal_entries.
This commit is contained in:
ginnoir
2026-07-04 19:41:15 -05:00
parent 8e2ddd6b72
commit 04ae809e07
34 changed files with 1889 additions and 6 deletions
+25
View File
@@ -0,0 +1,25 @@
import { expect, test } from "@playwright/test";
test("journal happy path", async ({ page }) => {
const suffix = Date.now().toString();
const title = `E2E Journal ${suffix}`;
await page.goto("/journal");
await expect(page.getByRole("heading", { name: "Journal" })).toBeVisible();
await page.getByRole("link", { name: "New entry" }).click();
await expect(page.getByRole("heading", { name: "New entry" })).toBeVisible();
await page.getByLabel("Title (optional)").fill(title);
await page.getByRole("button", { name: "Happy" }).click();
await page.getByRole("button", { name: "Save entry" }).click();
await expect(page).toHaveURL(/\/journal\/[0-9a-f-]+$/);
await expect(page.getByRole("heading", { name: "Edit entry" })).toBeVisible();
await page.goto("/journal");
await expect(page.getByRole("link", { name: new RegExp(title) })).toBeVisible();
await page.getByRole("link", { name: "Mood tracker" }).click();
await expect(page.getByRole("heading", { name: "Mood tracker" })).toBeVisible();
await expect(page.getByText("Mood over time")).toBeVisible();
});