From 8a8b41f35eb4a36c17098816f36ff0d7110535e1 Mon Sep 17 00:00:00 2001 From: Eliezer Steinbock <3090527+elie222@users.noreply.github.com> Date: Sat, 8 Nov 2025 18:37:45 +0200 Subject: [PATCH 1/3] Imrpove mobile --- .../assistant/AIChatButton.tsx | 7 +- .../assistant/AvailableActionsPanel.tsx | 2 +- .../[emailAccountId]/assistant/Rules.tsx | 100 +++++++++--------- .../assistant/RulesPromptNew.tsx | 4 +- .../onboarding/OnboardingCategories.tsx | 10 +- .../onboarding/OnboardingWrapper.tsx | 2 +- .../onboarding/StepCustomRules.tsx | 2 +- .../[emailAccountId]/onboarding/StepIntro.tsx | 8 +- apps/web/components/NavBottom.tsx | 12 +-- apps/web/components/PageHeader.tsx | 8 +- apps/web/components/SidebarRight.tsx | 8 +- version.txt | 2 +- 12 files changed, 85 insertions(+), 80 deletions(-) diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx b/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx index e17c8827e0..1a01c5bfef 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx +++ b/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx @@ -5,13 +5,16 @@ import { useSidebar } from "@/components/ui/sidebar"; import { MessageCircleIcon } from "lucide-react"; export function AIChatButton() { - const { setOpen } = useSidebar(); + const { setOpen, setOpenMobile, isMobile } = useSidebar(); return ( @@ -190,7 +190,7 @@ function RulesPromptForm({ diff --git a/apps/web/components/SidebarRight.tsx b/apps/web/components/SidebarRight.tsx index 2e45c8c033..a3ecae20c6 100644 --- a/apps/web/components/SidebarRight.tsx +++ b/apps/web/components/SidebarRight.tsx @@ -11,14 +11,14 @@ export function SidebarRight({ name: string; className?: string; }) { - const { state } = useSidebar(); - const isOpen = state.includes(name); + const { state, openMobile, isMobile } = useSidebar(); + const isOpen = isMobile ? openMobile.includes(name) : state.includes(name); return (
Date: Sat, 8 Nov 2025 19:04:20 +0200 Subject: [PATCH 2/3] fix --- .../app/(app)/[emailAccountId]/assistant/AIChatButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx b/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx index 1a01c5bfef..7ae5f195f6 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx +++ b/apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx @@ -12,8 +12,10 @@ export function AIChatButton() { size="sm" variant="outline" onClick={() => { - const setter = isMobile ? setOpenMobile : setOpen; - setter((arr) => [...arr, "chat-sidebar"]); + setOpen((arr) => [...arr, "chat-sidebar"]); + if (isMobile) { + setOpenMobile((arr) => [...arr, "chat-sidebar"]); + } }} > From d468051dc8c952b2b3571d92350aac03a91fd171 Mon Sep 17 00:00:00 2001 From: Eliezer Steinbock <3090527+elie222@users.noreply.github.com> Date: Sat, 8 Nov 2025 19:04:36 +0200 Subject: [PATCH 3/3] use new layout --- .../app/(app)/[emailAccountId]/compose/page.tsx | 14 -------------- apps/web/app/(app)/[emailAccountId]/usage/page.tsx | 12 +++++++----- apps/web/app/(app)/admin/page.tsx | 11 ++++++----- apps/web/app/(app)/license/page.tsx | 11 ++++++----- 4 files changed, 19 insertions(+), 29 deletions(-) delete mode 100644 apps/web/app/(app)/[emailAccountId]/compose/page.tsx diff --git a/apps/web/app/(app)/[emailAccountId]/compose/page.tsx b/apps/web/app/(app)/[emailAccountId]/compose/page.tsx deleted file mode 100644 index b9f0377cf7..0000000000 --- a/apps/web/app/(app)/[emailAccountId]/compose/page.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { ComposeEmailFormLazy } from "@/app/(app)/[emailAccountId]/compose/ComposeEmailFormLazy"; -import { TopSection } from "@/components/TopSection"; - -export default function ComposePage() { - return ( - <> - - -
- -
- - ); -} diff --git a/apps/web/app/(app)/[emailAccountId]/usage/page.tsx b/apps/web/app/(app)/[emailAccountId]/usage/page.tsx index 9ddcefcdf4..ab87c8cebb 100644 --- a/apps/web/app/(app)/[emailAccountId]/usage/page.tsx +++ b/apps/web/app/(app)/[emailAccountId]/usage/page.tsx @@ -1,5 +1,4 @@ import { getUsage } from "@/utils/redis/usage"; -import { TopSection } from "@/components/TopSection"; import { Usage } from "@/app/(app)/[emailAccountId]/usage/usage"; import { auth } from "@/utils/auth"; import { @@ -9,6 +8,8 @@ import { import { checkUserOwnsEmailAccount } from "@/utils/email-account"; import { notFound } from "next/navigation"; import prisma from "@/utils/prisma"; +import { PageWrapper } from "@/components/PageWrapper"; +import { PageHeader } from "@/components/PageHeader"; export default async function UsagePage(props: { params: Promise<{ emailAccountId: string }>; @@ -53,17 +54,18 @@ export default async function UsagePage(props: { const isOwnAccount = emailAccount.user.id === userId; return ( -
- + -
+
-
+ ); } diff --git a/apps/web/app/(app)/admin/page.tsx b/apps/web/app/(app)/admin/page.tsx index edef2aa29c..ded2d36ab5 100644 --- a/apps/web/app/(app)/admin/page.tsx +++ b/apps/web/app/(app)/admin/page.tsx @@ -1,6 +1,5 @@ import { AdminUpgradeUserForm } from "@/app/(app)/admin/AdminUpgradeUserForm"; import { AdminUserControls } from "@/app/(app)/admin/AdminUserControls"; -import { TopSection } from "@/components/TopSection"; import { auth } from "@/utils/auth"; import { ErrorPage } from "@/components/ErrorPage"; import { isAdmin } from "@/utils/admin"; @@ -12,6 +11,8 @@ import { RegisterSSOModal } from "@/app/(app)/admin/RegisterSSOModal"; import { AdminHashEmail } from "@/app/(app)/admin/AdminHashEmail"; import { GmailUrlConverter } from "@/app/(app)/admin/GmailUrlConverter"; import { DebugLabels } from "@/app/(app)/admin/DebugLabels"; +import { PageWrapper } from "@/components/PageWrapper"; +import { PageHeader } from "@/components/PageHeader"; // NOTE: Turn on Fluid Compute on Vercel to allow for 800 seconds max duration export const maxDuration = 800; @@ -29,10 +30,10 @@ export default async function AdminPage() { } return ( -
- + + -
+
@@ -45,6 +46,6 @@ export default async function AdminPage() {
-
+ ); } diff --git a/apps/web/app/(app)/license/page.tsx b/apps/web/app/(app)/license/page.tsx index cacb9ebb18..7eb58d280b 100644 --- a/apps/web/app/(app)/license/page.tsx +++ b/apps/web/app/(app)/license/page.tsx @@ -5,12 +5,13 @@ import { useAction } from "next-safe-action/hooks"; import { type SubmitHandler, useForm } from "react-hook-form"; import { Button } from "@/components/Button"; import { Input } from "@/components/Input"; -import { TopSection } from "@/components/TopSection"; import { activateLicenseKeyAction } from "@/utils/actions/premium"; import { AlertBasic } from "@/components/Alert"; import { usePremium } from "@/components/PremiumAlert"; import { toastError, toastSuccess } from "@/components/Toast"; import type { ActivateLicenseKeyOptions } from "@/utils/actions/premium.validation"; +import { PageWrapper } from "@/components/PageWrapper"; +import { PageHeader } from "@/components/PageHeader"; export default function LicensePage(props: { searchParams: Promise<{ "license-key"?: string }>; @@ -21,10 +22,10 @@ export default function LicensePage(props: { const { premium } = usePremium(); return ( -
- + + -
+
{premium?.lemonLicenseKey && (
-
+
); }