From 4213389ea8fe3ad42cab1a15cdf60f0a3f8dd125 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 26 May 2026 01:29:57 +0000 Subject: [PATCH 1/2] fix: restore PageLayout header visibility and add mobile actions slot The title/actions header div had `hidden` with no `md:block` override, making it permanently invisible at all breakpoints. This caused action buttons (e.g. Add Category, Reset to Defaults) to never render, silently breaking any mobile sheet triggers tied to those actions. - Add `md:block` to restore desktop header visibility - Add a `md:hidden` actions bar below the nav for mobile so page-level actions are accessible on narrow viewports https://claude.ai/code/session_01CQMMD3NwoJywWphB2woG6M --- src/components/PageLayout.tsx | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/PageLayout.tsx b/src/components/PageLayout.tsx index d29d8a7..2c7ae4f 100644 --- a/src/components/PageLayout.tsx +++ b/src/components/PageLayout.tsx @@ -24,18 +24,25 @@ export const PageLayout = ({
{title !== undefined && ( -
-
-

- {icon} - {title} -

- {actions &&
{actions}
} + <> +
+
+

+ {icon} + {title} +

+ {actions &&
{actions}
} +
+ {description && ( +

{description}

+ )}
- {description && ( -

{description}

+ {actions && ( +
+ {actions} +
)} -
+ )} {children}
From 4f72d2346a37855d9ecb582830d8d8b6b74e12fc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 26 May 2026 01:33:34 +0000 Subject: [PATCH 2/2] test: update PageLayout actions assertion for dual-slot rendering Actions now render in both the desktop header and the mobile strip, so getByRole throws on multiple matches. Switch to getAllByRole and assert at least one button is present. https://claude.ai/code/session_01CQMMD3NwoJywWphB2woG6M --- src/components/PageLayout.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PageLayout.test.tsx b/src/components/PageLayout.test.tsx index a19bd68..e882ec4 100644 --- a/src/components/PageLayout.test.tsx +++ b/src/components/PageLayout.test.tsx @@ -34,7 +34,9 @@ describe("PageLayout", () => {

x

); - expect(screen.getByRole("button", { name: "Add" })).toBeInTheDocument(); + // Actions render in both the desktop header and the mobile strip + const buttons = screen.getAllByRole("button", { name: "Add" }); + expect(buttons.length).toBeGreaterThan(0); }); it("renders description when title is provided", () => {