From 31ff7b9ac0eba33cd65a9d32ad5fbcbb66e0238b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 17 Jul 2026 16:43:30 +0200 Subject: [PATCH] feat: fullscreen toggle for cooking assistant and recipe chat Both chat panels were locked to a fixed 420px slide-over with no way to get more room for longer conversations. Adds an expand/collapse button in the header that grows the sheet to fill the viewport. v0.38.0 --- CHANGELOG.md | 5 +++++ .../recipe/cooking-assistant-panel.tsx | 22 ++++++++++++++++--- .../components/recipe/recipe-chat-panel.tsx | 22 ++++++++++++++++--- apps/web/lib/changelog.ts | 9 +++++++- apps/web/messages/en.json | 2 ++ apps/web/messages/fr.json | 2 ++ apps/web/package.json | 2 +- package.json | 2 +- 8 files changed, 57 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d57d2..278807e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together. +## 0.38.0 — 2026-07-17 13:00 + +### Added +- The cooking assistant and per-recipe chat can now expand to fullscreen — a new toggle in the chat header. + ## 0.37.0 — 2026-07-17 12:30 ### Fixed diff --git a/apps/web/components/recipe/cooking-assistant-panel.tsx b/apps/web/components/recipe/cooking-assistant-panel.tsx index 2ed6cfe..2ca286b 100644 --- a/apps/web/components/recipe/cooking-assistant-panel.tsx +++ b/apps/web/components/recipe/cooking-assistant-panel.tsx @@ -5,7 +5,7 @@ import { useTranslations } from "next-intl"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"; -import { MessageCircle, Send, Bot, User } from "lucide-react"; +import { MessageCircle, Send, Bot, User, Maximize2, Minimize2 } from "lucide-react"; import ReactMarkdown from "react-markdown"; import { cn } from "@/lib/utils"; import { ChatHistorySearch } from "./chat-history-search"; @@ -20,7 +20,9 @@ type HistoryEntry = { role: "user" | "assistant"; content: string }; export function CookingAssistantPanel() { const t = useTranslations("cookingChat"); + const tCommon = useTranslations("common"); const [open, setOpen] = useState(false); + const [fullscreen, setFullscreen] = useState(false); const [messages, setMessages] = useState([]); const [input, setInput] = useState(""); const [loading, setLoading] = useState(false); @@ -96,8 +98,14 @@ export function CookingAssistantPanel() { - - + { setOpen(v); if (!v) setFullscreen(false); }}> +
@@ -105,6 +113,14 @@ export function CookingAssistantPanel() { {t("title")}
+ setMessages([])} />
diff --git a/apps/web/components/recipe/recipe-chat-panel.tsx b/apps/web/components/recipe/recipe-chat-panel.tsx index 7b4cfcd..0b584e8 100644 --- a/apps/web/components/recipe/recipe-chat-panel.tsx +++ b/apps/web/components/recipe/recipe-chat-panel.tsx @@ -5,7 +5,7 @@ import { useTranslations } from "next-intl"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"; -import { MessageCircle, Send, Bot, User } from "lucide-react"; +import { MessageCircle, Send, Bot, User, Maximize2, Minimize2 } from "lucide-react"; import ReactMarkdown from "react-markdown"; import { cn } from "@/lib/utils"; import { ChatHistorySearch } from "./chat-history-search"; @@ -25,7 +25,9 @@ type Props = { export function RecipeChatPanel({ recipeId, recipeTitle }: Props) { const t = useTranslations("recipeChat"); + const tCommon = useTranslations("common"); const [open, setOpen] = useState(false); + const [fullscreen, setFullscreen] = useState(false); const [messages, setMessages] = useState([]); const [input, setInput] = useState(""); const [loading, setLoading] = useState(false); @@ -98,8 +100,14 @@ export function RecipeChatPanel({ recipeId, recipeTitle }: Props) { - - + { setOpen(v); if (!v) setFullscreen(false); }}> +
@@ -107,6 +115,14 @@ export function RecipeChatPanel({ recipeId, recipeTitle }: Props) { {t("title")}
+ setMessages([])} />
diff --git a/apps/web/lib/changelog.ts b/apps/web/lib/changelog.ts index 8708ffb..8f3fd78 100644 --- a/apps/web/lib/changelog.ts +++ b/apps/web/lib/changelog.ts @@ -1,5 +1,5 @@ // Mirrors CHANGELOG.md at the repo root — update both together. -export const APP_VERSION = "0.37.0"; +export const APP_VERSION = "0.38.0"; export type ChangelogEntry = { version: string; @@ -11,6 +11,13 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + version: "0.38.0", + date: "2026-07-17 13:00", + added: [ + "The cooking assistant and per-recipe chat can now expand to fullscreen — a new toggle in the chat header.", + ], + }, { version: "0.37.0", date: "2026-07-17 12:30", diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index bdaa040..d4c5eea 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -530,6 +530,8 @@ "noRecent": "No public recipes yet." }, "common": { + "expand": "Expand to fullscreen", + "collapse": "Exit fullscreen", "loading": "Loading…", "error": "Something went wrong", "save": "Save", diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index c24a54e..af21cb1 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -530,6 +530,8 @@ "noRecent": "Aucune recette publique pour l'instant." }, "common": { + "expand": "Passer en plein écran", + "collapse": "Quitter le plein écran", "loading": "Chargement…", "error": "Une erreur s'est produite", "save": "Enregistrer", diff --git a/apps/web/package.json b/apps/web/package.json index 910e869..59c3974 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@epicure/web", - "version": "0.37.0", + "version": "0.38.0", "private": true, "scripts": { "dev": "next dev", diff --git a/package.json b/package.json index d3267cb..bd3a6b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epicure", - "version": "0.37.0", + "version": "0.38.0", "private": true, "scripts": { "dev": "pnpm --filter web dev",