refactor(layout): promote AI capture above timeline on desktop

Give the composer full-width desktop space before the event timeline so capture stays prominent and the toolbar can keep its intended two-column composition. Add source-level regression tests to lock the new page hierarchy in place.
This commit is contained in:
2026-04-22 11:34:37 -04:00
parent 88265678db
commit 7df8419368
3 changed files with 55 additions and 42 deletions

View File

@@ -6,13 +6,22 @@ describe("home page hierarchy", () => {
const source = readFileSync("src/app/page.tsx", "utf8");
expect(source).toContain("useIsMobile");
expect(source).toContain("grid-cols-[minmax(0,0.75fr)_minmax(0,1.25fr)]");
expect(source).toContain('const mainContentClasses = "space-y-4"');
expect(source).toContain('const timelineContentClasses = "space-y-4"');
expect(source).toContain('"items-center justify-between"');
expect(source).toContain("desktopUtilityActionsClasses");
expect(source).toContain("AI capture");
expect(source).toContain("Event timeline");
});
test("desktop layout promotes AI capture to a full-width top row before the timeline grid", () => {
const source = readFileSync("src/app/page.tsx", "utf8");
expect(source).toContain("<section className={appSectionSurfaceClasses}>");
expect(source).toContain("<section className={timelineContentClasses}>");
expect(source).not.toContain("grid-cols-[minmax(0,0.75fr)_minmax(0,1.25fr)]");
});
test("manual create is routed through a More menu instead of a primary mobile action", () => {
const source = readFileSync("src/app/page.tsx", "utf8");