From b602294f1dda96840fc891f0773f07399f3b0088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Wed, 29 Jul 2026 09:19:24 +0200 Subject: [PATCH] Hide the command menu button while the mobile side panel is open (#23471) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On mobile the side panel covers the page, but the page header stays mounted underneath. Its command menu button (`⌘K`, the `⋮` icon) sits at the same coordinates as the panel's own close button, so the two icons render on top of each other. Measured on a 390x844 viewport with the AI chat open: - `Command Menu` button at `x=346, y=8, 32x32` - `Close side panel` button at `x=358, y=14, 24x24` `SidePanelToggleButton` already hid itself for the command menu and search pages, but the AI chat pages (`AskAI`, `ViewPreviousAiChats`) are not in `COMMAND_MENU_SIDE_PANEL_PAGES`, so the button stayed and overlapped. ## Change Hide the button on mobile whenever the side panel is open, rather than enumerating pages — the header is not reachable behind a full-screen panel either way. Layout customization mode is the exception and keeps it: `alignWithSidePanelTopBar` deliberately repositions the button into the side panel top bar there, so that path is preserved. Desktop is unaffected. ## Testing Three cases added to `SidePanelToggleButton.test.tsx` (hidden on mobile with the panel open, kept on mobile in layout customization mode, kept on desktop with the AI chat open); the `useIsMobile` mock is now switchable per test. All 10 tests pass. Verified in the browser at 390x844: with the AI chat open only `Close side panel` remains in the top bar, and the button reappears once the panel is closed. --- _Generated by [Claude Code](https://claude.ai/code/session_018gcsCQbuTMsyFWv874p25Q)_ Review in cubic --- .gitignore | 7 ++ packages/twenty-front/index.html | 7 +- .../__stories__/Calendar.stories.tsx | 2 + .../TimelineActivities.stories.tsx | 2 + .../EventCardCalendarEvent.stories.tsx | 2 + .../__stories__/EventCardMessage.stories.tsx | 2 + .../ai/components/AiChatEditorSection.tsx | 15 ++-- .../ai/components/AiChatEmptyState.tsx | 6 +- .../internal/AiChatEditorFocusEffect.tsx | 14 ++-- .../RelationManyToOneFieldInput.stories.tsx | 2 + .../RelationOneToManyFieldInput.stories.tsx | 2 + ...UpdateMultipleRecordsContainer.stories.tsx | 2 + ...ccountsCalendarChannelsGeneral.stories.tsx | 2 + .../side-panel/components/SidePanelRouter.tsx | 1 + .../components/SidePanelToggleButton.tsx | 6 +- .../__tests__/SidePanelToggleButton.test.tsx | 69 ++++++++++++++++++- .../useOpenCalendarEventInSidePanel.test.tsx | 5 ++ .../WorkflowStepFilterBuilder.stories.tsx | 2 + .../WorkflowStepFilterColumn.stories.tsx | 2 + .../WorkflowStepFilterValueInput.stories.tsx | 2 + 20 files changed, 129 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 09f569ab22..3ae017644b 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,10 @@ screenshots/ # local graphify knowledge-graph output (never commit) **/graphify-out/ + +# Local scratch scripts +/.verify*.mjs +/.shot*.mjs +/.diag*.mjs +/.compare*.mjs +/.narrow*.mjs diff --git a/packages/twenty-front/index.html b/packages/twenty-front/index.html index 62e26bafb8..15f9554611 100644 --- a/packages/twenty-front/index.html +++ b/packages/twenty-front/index.html @@ -37,7 +37,10 @@ - +