From 9ad646fa3365e1df7b8f0939989ee19213d54113 Mon Sep 17 00:00:00 2001 From: Jakob Wennberg <149234542+jakobwennberg@users.noreply.github.com> Date: Tue, 12 May 2026 13:25:48 +0200 Subject: [PATCH] fix(inbox): dedupe onboarding card on empty inbox (#446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(inbox): dedupe onboarding card — show in preview pane only When the inbox was empty, the OnboardingCard rendered in both the list column (compact) and the preview pane (full size) at the same time, so the "Så funkar dokumentinkorgen" explainer appeared twice on a fresh inbox. Keep the preview-pane version (primary surface, more room) and let the list column show the standard "Inkorgen är tom" empty state. Co-Authored-By: Claude Opus 4.7 (1M context) * fix(inbox): restore onboarding on mobile empty inbox Greptile P1 on PR #446: on small screens the layout is a master-detail toggle defaulting to list view. With items.length === 0 there's no row to click, so setMobileView('detail') never fires and the user can't reach the preview-pane onboarding. Result: mobile users on a fresh inbox saw only "Inkorgen är tom." with no path forward. Keep the compact list-column card on mobile only (md:hidden) and the quiet empty-state line on desktop, so the preview pane stays the single source of the explainer on md+. Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: Claude Opus 4.7 (1M context) --- .../general/InvoiceInboxWorkspace.tsx | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/components/extensions/general/InvoiceInboxWorkspace.tsx b/components/extensions/general/InvoiceInboxWorkspace.tsx index 2964f9b5..630fece2 100644 --- a/components/extensions/general/InvoiceInboxWorkspace.tsx +++ b/components/extensions/general/InvoiceInboxWorkspace.tsx @@ -661,17 +661,31 @@ export default function InvoiceInboxWorkspace(_props: WorkspaceComponentProps) { )} {items.length === 0 ? ( + // On desktop the preview pane is always visible alongside this + // column, so showing the onboarding card here would duplicate it. + // On mobile the layout is a master-detail toggle and the user is + // stuck on the list view until they pick a row — without a card + // here they'd have no way to reach the explainer at all. So: + // compact card on mobile only, quiet empty state on desktop. showOnboarding ? ( - fileInputRef.current?.click()} - onDismiss={handleDismissOnboarding} - isActivating={isRotating} - compact - /> + <> +
+ fileInputRef.current?.click()} + onDismiss={handleDismissOnboarding} + isActivating={isRotating} + compact + /> +
+
+ + Inkorgen är tom. +
+ ) : (