diff --git a/CHANGELOG.md b/CHANGELOG.md index 27db679ca..ba9a62bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,38 @@ Under an Upgrading section, the bullets after **Local installs (`sdpm update`).* bucket can be deleted. See [Deploy Guide — Source bucket](docs/en/deploy-cloudshell.md#source-bucket) for how to check the old bucket. +### Changed + +- **The Web UI is laid out anew: a left rail, a home screen that is the chat, and a one-row + deck bar.** Decks, Styles and Templates move to a rail on the left (a top bar on phones), + with Settings as a gear at its foot; the user menu (name, sign out) is a Cloud-only item + below it. The home screen opens on "What are we presenting?" with the chat input in the + middle; under it, dashed Style and Template chips open a gallery of style covers and + template themes, and choosing one puts the same `@style:` / `@template:` token in the + input that `/` does. Once a conversation starts it fills the first screenful, with the deck + list below it, until it creates a deck; the conversation then moves into the chat sheet + beside the deck, its height and width animated rather than swapped. A deck's name, its + steps (brief, art direction, outline, slides) as a progress track, and its tools share one + row above the slides, so the slides get about 870px instead of 660px at 1440px with the + chat open. The `/` picker is the same card gallery as the chips: up to 640px wide + whatever the input's width, opening over the deck beside the chat sheet, with All / + Template / Style / Format buttons (they rewrite `/sty` as `/style sty`) and arrow keys in + all four directions. Text, surfaces and borders get more contrast steps (WCAG AA for + secondary text), on a warm charcoal dark theme and the matching light one. Web UI only + (`deploy_webui.sh`). +- **The chat has one conversation per screen; the New and deck tabs are gone.** The home + screen's conversation stays while you open decks and come back, and only New chat clears + it; a deck's sheet shows that deck's conversation only. The rail's chat button is gone + too: with the sheet closed, Chat at the right of the deck bar opens it again. Web UI only. + +### Fixed + +- **Phones: the chat button no longer opens the side sheet over a deck's preview tab, and + switching to the chat tab keeps the home conversation.** The header button marked the + sheet open while the chat tab was showing, so it slid in, 440px wide, over the preview; + the chat tab used a second chat panel, which dropped the home conversation (and one that + had just created the deck) while it was shown. Web UI only. + ## [0.18.0] - 2026-11-15 Japanese decks read more naturally: a `writing-ja` guide that the orchestrator and composers diff --git a/web-ui/messages/en.json b/web-ui/messages/en.json index 78d7b39b1..cfefe44e2 100644 --- a/web-ui/messages/en.json +++ b/web-ui/messages/en.json @@ -17,8 +17,6 @@ "decks": "Decks", "styles": "Styles", "templates": "Templates", - "openChat": "Open chat", - "closeChat": "Close chat", "userMenu": "User menu", "settings": "Settings", "signOut": "Sign out" @@ -106,7 +104,8 @@ "previewAlt": "Preview of {name}", "internal": "Internal", "private": "Private", - "selectDeck": "Select {name}" + "selectDeck": "Select {name}", + "slideCountShort": "{count, plural, one {# slide} other {# slides}}" }, "deckActions": { "internal": "Internal", @@ -165,7 +164,9 @@ "errorPresent": "Couldn't open the presentation", "errorPdf": "Couldn't open the PDF view", "errorDownloadHtml": "Couldn't download the HTML", - "errorOpenHtml": "Couldn't open the HTML" + "errorOpenHtml": "Couldn't open the HTML", + "openChat": "Open chat", + "chat": "Chat" }, "outline": { "body": "Body", @@ -244,12 +245,12 @@ "formatHtmlDescription": "Present in a browser. Can't be edited in PowerPoint.", "noMatch": "No matches", "loading": "Loading…", - "keyHint": "↑↓ move ↵ insert Esc close", + "keyHint": "↑↓←→ move ↵ insert Esc close", "listLabel": "Template, style and format suggestions", - "previewAlt": "Preview of {name}", "unknownName": "This template or style is unavailable", "removeToken": "Remove {kind} {name}", - "layouts": "{count, plural, one {# layout} other {# layouts}}" + "all": "All", + "kindFilter": "Show" }, "chatInput": { "maxFilesError": "Maximum 5 files can be attached at once.", @@ -266,10 +267,7 @@ "resizePanel": "Resize chat panel", "chat": "Chat", "newChat": "New chat", - "startNewChat": "Start new chat", - "closePanel": "Close chat panel", - "new": "New", - "deck": "Deck" + "closePanel": "Close chat panel" }, "chat": { "errorSaveHistory": "Failed to save chat history", @@ -317,7 +315,11 @@ "steerComments": "{count, plural, one {# comment} other {# comments}}", "backgroundWorking": "Composers are working in the background. You can keep chatting.", "stopping": "Stopping…", - "reconnecting": "Reconnecting to the agent…" + "reconnecting": "Reconnecting to the agent…", + "stageTitle": "What are we presenting?", + "stageSubtitle": "Describe the talk. The agents draft a brief, an art direction and an outline before building the slides.", + "stagePlaceholder": "Who is the audience, what should they take away, and roughly how many slides?\n/ template · style ⌘↵ send", + "stagePlaceholderMobile": "Who is the audience, and what should they take away?" }, "composerNote": { "from": "Composer {group}", @@ -403,7 +405,8 @@ "vibePath": "Fast path", "specPath": "Review path", "vibeSummary": "Start rough. See a first draft sooner.", - "specSummary": "Decide the story before the slides." + "specSummary": "Decide the story before the slides.", + "chipLabel": "Working style: {mode}" }, "htmlFormatPill": { "buildAsHtml": "Build as HTML", @@ -706,5 +709,20 @@ "needsTextHint": "Add a comment or a message to send", "sendFailed": "Couldn't send the change request", "noComment": "No comment" + }, + "choiceChip": { + "style": "Style", + "template": "Template", + "chooseStyle": "Choose a style", + "chooseTemplate": "Choose a template", + "chosen": "{kind}: {name}", + "clearStyle": "Remove the style choice", + "clearTemplate": "Remove the template choice", + "searchStyle": "Search styles…", + "searchTemplate": "Search templates…", + "auto": "Agent picks", + "autoHint": "Chosen to fit the brief", + "loading": "Loading…", + "noMatch": "No matches" } } diff --git a/web-ui/messages/ja.json b/web-ui/messages/ja.json index 8d860a95a..a292f2f43 100644 --- a/web-ui/messages/ja.json +++ b/web-ui/messages/ja.json @@ -17,8 +17,6 @@ "decks": "デッキ", "styles": "スタイル", "templates": "テンプレート", - "openChat": "チャットを開く", - "closeChat": "チャットを閉じる", "userMenu": "ユーザーメニュー", "settings": "設定", "signOut": "サインアウト" @@ -106,7 +104,8 @@ "previewAlt": "{name} のプレビュー", "internal": "社内公開", "private": "非公開", - "selectDeck": "{name} を選択" + "selectDeck": "{name} を選択", + "slideCountShort": "{count} 枚" }, "deckActions": { "internal": "社内公開", @@ -165,7 +164,9 @@ "errorPresent": "発表を開けませんでした", "errorPdf": "PDF 用の画面を開けませんでした", "errorDownloadHtml": "HTML をダウンロードできませんでした", - "errorOpenHtml": "HTML を開けませんでした" + "errorOpenHtml": "HTML を開けませんでした", + "openChat": "チャットを開く", + "chat": "チャット" }, "outline": { "body": "本文", @@ -244,12 +245,12 @@ "formatHtmlDescription": "ブラウザで発表します。PowerPoint では編集できません", "noMatch": "該当なし", "loading": "読み込み中…", - "keyHint": "↑↓ 移動 ↵ 挿入 Esc 閉じる", + "keyHint": "↑↓←→ 移動 ↵ 挿入 Esc 閉じる", "listLabel": "テンプレート / スタイル / 形式の候補", - "previewAlt": "{name} のプレビュー", "unknownName": "このテンプレートまたはスタイルは利用できません", "removeToken": "{kind}「{name}」を削除", - "layouts": "{count} レイアウト" + "all": "すべて", + "kindFilter": "表示する種類" }, "chatInput": { "maxFilesError": "一度に添付できるファイルは 5 つまでです。", @@ -266,10 +267,7 @@ "resizePanel": "チャットパネルの幅を変更", "chat": "チャット", "newChat": "新しいチャット", - "startNewChat": "新しいチャットを開始", - "closePanel": "チャットパネルを閉じる", - "new": "新規", - "deck": "デッキ" + "closePanel": "チャットパネルを閉じる" }, "chat": { "errorSaveHistory": "チャット履歴を保存できませんでした", @@ -317,7 +315,11 @@ "steerComments": "{count, plural, other {コメント # 件}}", "backgroundWorking": "コンポーザーが裏で作業中です。チャットは続けられます。", "stopping": "停止中…", - "reconnecting": "エージェントに再接続中…" + "reconnecting": "エージェントに再接続中…", + "stageTitle": "どんなプレゼンを作りますか?", + "stageSubtitle": "内容を伝えると、エージェントがブリーフ・アートディレクション・アウトラインを固めてからスライドを組みます。", + "stagePlaceholder": "聞き手、持ち帰ってほしいこと、だいたいの枚数を書いてください\n/ でテンプレート・スタイル ⌘↵ で送信", + "stagePlaceholderMobile": "聞き手と、持ち帰ってほしいことを書いてください" }, "composerNote": { "from": "コンポーザー {group}", @@ -403,7 +405,8 @@ "vibePath": "すばやく作成", "specPath": "確認しながら作成", "vibeSummary": "ラフな素材から、まず初稿をすばやく形にします。", - "specSummary": "スライドを作る前に、伝えるストーリーを固めます。" + "specSummary": "スライドを作る前に、伝えるストーリーを固めます。", + "chipLabel": "進め方: {mode}" }, "htmlFormatPill": { "buildAsHtml": "HTML で作成", @@ -706,5 +709,20 @@ "needsTextHint": "コメントかメッセージを書くと送信できます", "sendFailed": "修正依頼を送信できませんでした", "noComment": "コメントなし" + }, + "choiceChip": { + "style": "スタイル", + "template": "テンプレート", + "chooseStyle": "スタイルを選ぶ", + "chooseTemplate": "テンプレートを選ぶ", + "chosen": "{kind}: {name}", + "clearStyle": "スタイルの指定を外す", + "clearTemplate": "テンプレートの指定を外す", + "searchStyle": "スタイルを検索…", + "searchTemplate": "テンプレートを検索…", + "auto": "おまかせ", + "autoHint": "ブリーフに合わせてエージェントが選びます", + "loading": "読み込み中…", + "noMatch": "一致するものがありません" } } diff --git a/web-ui/next.config.ts b/web-ui/next.config.ts index 63a74eb57..8198b1dd6 100644 --- a/web-ui/next.config.ts +++ b/web-ui/next.config.ts @@ -6,6 +6,9 @@ const isLocal = process.env.NEXT_PUBLIC_MODE === "local" const nextConfig: NextConfig = { distDir: "build", + // The dev-only "N" badge sits in a corner, and every corner holds a control (rail, send button). + // Build and runtime errors still open the dev overlay. + devIndicators: false, ...(isLocal ? {} : { output: "export" as const, trailingSlash: true }), } diff --git a/web-ui/src/app/(authenticated)/decks/page.tsx b/web-ui/src/app/(authenticated)/decks/page.tsx index 12d5aca56..5c4e8ffb7 100644 --- a/web-ui/src/app/(authenticated)/decks/page.tsx +++ b/web-ui/src/app/(authenticated)/decks/page.tsx @@ -19,14 +19,14 @@ "use client" -import { useState, useRef, useCallback, useEffect, useMemo } from "react" +import { useState, useRef, useCallback, useEffect, useLayoutEffect, useMemo } from "react" import { useAuth } from "@/hooks/useAuth" import { AppShell } from "@/components/AppShell" import { DeckListView, visibleDecks } from "@/components/deck/DeckListView" import { SlideCarousel } from "@/components/deck/SlideCarousel" import { DeckActions } from "@/components/deck/DeckActions" import { ConfirmDialog } from "@/components/ConfirmDialog" -import { ChatPanelShell } from "@/components/chat/ChatPanelShell" +import { ChatPanelShell, type ChatLayout } from "@/components/chat/ChatPanelShell" import { DeckFormatProvider } from "@/components/chat/DeckFormatContext" import { ChatPanelHandle } from "@/components/chat/ChatPanel" import { updateVisibility } from "@/services/deckService" @@ -93,10 +93,44 @@ export default function DecksPage() { sendMessage: (text: string, options?: { displayContent?: string }) => chatRef.current?.sendMessage(text, options) ?? Promise.resolve(), }), [agentIsLoading]) + // Home screen: a blank chat is the composer at the top (stage); once it has messages the + // conversation fills the first screenful and the deck list follows below it (center). + const [chatLayout, setChatLayout] = useState("sheet") + const pageLayout: ChatLayout = ws.isWorkspace ? "sheet" : chatLayout + const focusComposer = useCallback(() => chatRef.current?.focus(), []) + const openChatSheet = useCallback(() => ws.setChatOpen(true), [ws]) + const mainRef = useRef(null) + const scrollToDecks = useCallback(() => mainRef.current?.scrollIntoView({ behavior: "smooth", block: "start" }), []) + // The page that opens beside the chat as it leaves the centre fades in after the move starts. + const [pageEnter, setPageEnter] = useState(false) + const prevPageLayoutRef = useRef(pageLayout) + useLayoutEffect(() => { + const prev = prevPageLayoutRef.current + prevPageLayoutRef.current = pageLayout + if (prev !== "center" || pageLayout !== "sheet") return + setPageEnter(true) + const timer = setTimeout(() => setPageEnter(false), 1200) + return () => clearTimeout(timer) + }, [pageLayout]) + // Phones show a deck's chat and preview as two tabs; the side sheet never opens there. + const mobileTabs = isMobile && ws.isWorkspace && ws.canChat + // The chat tab's sheet starts below the tab bar. + const tabBarRef = useRef(null) + const [tabBarBottom, setTabBarBottom] = useState(96) + useLayoutEffect(() => { + const el = tabBarRef.current + if (!mobileTabs || !el) return + const measure = () => setTabBarBottom(Math.round(el.getBoundingClientRect().bottom)) + measure() + window.addEventListener("resize", measure) + return () => window.removeEventListener("resize", measure) + }, [mobileTabs]) const swipeRef = useSwipe( () => setActiveTab("preview"), () => setActiveTab("chat"), ) + // The chat tab is the persistent shell over the page, so it takes its own swipe. + const chatSwipeRef = useSwipe(() => setActiveTab("preview"), () => {}) /* ── Comment tool: one state for the preview and the chat ── */ const reviewDeckId = ws.isWorkspace ? (ws.isNew ? (ws.createdDeckId ?? null) : ws.activeDeckId) : null @@ -105,8 +139,8 @@ export default function DecksPage() { () => (deckSlides ?? []).filter((s) => s.previewUrl || s.composeUrl).map((s) => s.slug), [deckSlides], ) - const { setChatOpen, setChatTab } = ws - const openReviewChat = useCallback(() => { setChatOpen(true); setChatTab("deck") }, [setChatOpen, setChatTab]) + const { setChatOpen } = ws + const openReviewChat = useCallback(() => setChatOpen(true), [setChatOpen]) /** Handle inline style selection — insert a `@style:` token into chat input. */ const handleStyleSelect = useCallback((name: string) => { @@ -133,16 +167,25 @@ export default function DecksPage() { ws.setChatOpen((prev) => !prev)} + onNavDecks={pageLayout === "center" ? scrollToDecks : undefined} > -
-
+
+
{ws.isWorkspace ? ( <> {/* Mobile tab bar */} - {ws.canChat && isMobile && ( -
+ {mobileTabs && ( +
- {/* Chat Panel (persistent, desktop) — hidden on mobile workspace chat tab */} - {!(isMobile && ws.isWorkspace && ws.canChat && activeTab === "chat") && ( - + {/* Chat Panel — one instance on every screen (on a phone's deck screen it is the chat tab) */} + ws.setChatOpen(false)} - chatTab={ws.chatTab} - onChatTabChange={ws.setChatTab} + open={mobileTabs ? activeTab === "chat" : ws.chatOpen} + onClose={mobileTabs ? () => setActiveTab("preview") : () => ws.setChatOpen(false)} + phoneTop={mobileTabs ? tabBarBottom : undefined} + swipeRef={mobileTabs ? chatSwipeRef : undefined} chatRef={chatRef} deckId={ws.isWorkspace ? (ws.isNew ? (ws.createdDeckId ?? null) : ws.activeDeckId) : null} - deckName={ws.deck?.name || null} chatSessionId={ws.deck?.chatSessionId} sessionOrigin={ws.deck?.sessionOrigin} onDeckCreated={ws.handleDeckCreated} onPreviewInvalidated={() => ws.setPptxRequested(true)} onWorkflowPhase={setWorkflowPhase} onLoadingChange={setAgentIsLoading} + stageAllowed={!ws.isWorkspace} + onLayoutChange={setChatLayout} + onStageExit={openChatSheet} /> - )}
- {isMobile && !ws.isWorkspace && ( + {isMobile && !ws.isWorkspace && pageLayout === "sheet" && (
{fabOpen && ( <>
setFabOpen(false)} />
@@ -312,7 +312,7 @@ function TemplateCard({ template, onDownload, onDelete, onEditDescription, onRen onBlur={handleDescSubmit} onKeyDown={e => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); handleDescSubmit() } if (e.key === "Escape") { setEditValue(template.description || ""); setEditing(false) } }} rows={2} - className="w-full mt-1 rounded-md bg-foreground/[0.04] border border-brand-teal/30 focus:border-brand-teal/50 px-2 py-1 text-xs text-foreground placeholder:text-foreground/25 resize-none outline-none transition-colors" + className="w-full mt-1 rounded-md bg-foreground/[0.04] border border-brand-teal/30 focus:border-brand-teal/50 px-2 py-1 text-xs text-foreground placeholder:text-foreground-muted resize-none outline-none transition-colors" placeholder={t("descPlaceholder")} /> ) : onEditDescription ? ( @@ -320,7 +320,7 @@ function TemplateCard({ template, onDownload, onDelete, onEditDescription, onRen className="text-xs text-foreground-muted mt-1 line-clamp-2 leading-relaxed cursor-text rounded px-1 -mx-1 hover:bg-foreground/[0.04] transition-colors" onClick={e => { e.stopPropagation(); setEditing(true) }} > - {template.description || {t("addDescription")}} + {template.description || {t("addDescription")}}

) : template.description ? (

{template.description}

@@ -461,8 +461,8 @@ function UploadDialog({ idToken, onClose, onComplete, onError }: { ) : ( <> -

- {t.rich("dropHint", { ext: (chunks) => {chunks} })} +

+ {t.rich("dropHint", { ext: (chunks) => {chunks} })}

)} @@ -482,7 +482,7 @@ function UploadDialog({ idToken, onClose, onComplete, onError }: { {/* Description */}