Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(ui): give every control panel page the same 1024px content column (#2228)

clarkmaanc670702d8172
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index 43e5e6c3c..2726fd16e 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -2,6 +2,8 @@ import React, { Suspense, useState, useEffect, useRef, useCallback } from "react
import { useTranslation } from "react-i18next";
import { useShallow } from "zustand/react/shallow";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
+import { cn } from "./lib/utils";
import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "./ui/BidiInterpolatedText";
import { Download, RefreshCw, Loader2, AlertTriangle, Zap } from "./icons";
import UpgradePrompt from "./UpgradePrompt";
@@ -1063,7 +1065,7 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
/>
<div className="scrollbar-hidden flex-1 overflow-y-auto">
{updateRequiredByOrg && (
- <div className="max-w-3xl mx-auto w-full mb-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 mb-3")}>
<div className="rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/50 p-3">
<div className="flex items-start gap-3">
<div className="shrink-0 w-8 h-8 rounded-md bg-amber-100 dark:bg-amber-900/50 flex items-center justify-center">
@@ -1088,7 +1090,7 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
)}
<RequiredModelsBanner />
{usage?.isPastDue && activeView === "home" && (
- <div className="max-w-3xl mx-auto w-full mb-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 mb-3")}>
<div className="rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/50 p-3">
<div className="flex items-start gap-3">
<div className="shrink-0 w-8 h-8 rounded-md bg-amber-100 dark:bg-amber-900/50 flex items-center justify-center">
@@ -1122,7 +1124,7 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
{(gpuAccelAvailable.transcription || gpuAccelAvailable.intelligence) &&
activeView === "home" &&
!gpuBannerDismissed && (
- <div className="max-w-3xl mx-auto w-full mb-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 mb-3")}>
<div className="rounded-lg border border-primary/20 dark:border-primary/15 bg-primary/5 p-3">
<div className="flex items-start gap-3">
<div className="shrink-0 w-8 h-8 rounded-md bg-primary/10 dark:bg-primary/15 flex items-center justify-center">
diff --git a/src/components/DictionaryView.tsx b/src/components/DictionaryView.tsx
index a186b9b7f..8a3f6945b 100644
--- a/src/components/DictionaryView.tsx
+++ b/src/components/DictionaryView.tsx
@@ -4,6 +4,8 @@ import { BookOpen, CornerDownLeft, Download, Pencil, Plus, Sparkles, Upload, X }
import { Input } from "./ui/input";
import { Textarea } from "./ui/textarea";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
+import { cn } from "./lib/utils";
import { ConfirmDialog } from "./ui/dialog";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "./ui/tabs";
import { useToast } from "./ui/useToast";
@@ -147,7 +149,7 @@ export default function DictionaryView() {
variant="destructive"
/>
- <div className="px-5 pt-4">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 pt-4")}>
<TabsList className="h-7 p-0.5 rounded-[7px]">
<TabsTrigger value="dictionary" className="h-6 px-2.5 text-xs rounded-[5px]">
{t("dictionary.tabDictionary")}
@@ -159,7 +161,7 @@ export default function DictionaryView() {
</div>
<TabsContent value="dictionary" className="flex-1 min-h-0 mt-0 overflow-y-auto">
- <div className="px-5 py-4 flex flex-col gap-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-4 flex flex-col gap-3")}>
{/* ─── Add word ─── */}
<div>
<div className="relative">
diff --git a/src/components/HistoryView.tsx b/src/components/HistoryView.tsx
index f445f5ef2..dff047e01 100644
--- a/src/components/HistoryView.tsx
+++ b/src/components/HistoryView.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { cn } from "./lib/utils";
import { useUiLocale } from "../hooks/useUiLocale";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
import { Loader2, Sparkles, X, Mic, Trash2, Archive } from "./icons";
import TranscriptionItem from "./ui/TranscriptionItem";
import EmptyStateCard from "./ui/EmptyStateCard";
@@ -95,145 +96,143 @@ export default function HistoryView({
);
return (
- <div className="px-4 pt-4 pb-6">
- <div className="mx-auto max-w-5xl">
- {!useCleanupModel && !aiCTADismissed && (
- <div className="mb-3 relative rounded-lg border border-primary/20 bg-primary/5 dark:bg-primary/10 p-3">
- <button
- onClick={() => {
- localStorage.setItem("aiCTADismissed", "true");
- setAiCTADismissed(true);
- }}
- aria-label={t("common.close")}
- className="absolute top-2 end-2 p-1 rounded-sm text-muted-foreground hover:text-foreground hover:bg-black/5 dark:hover:bg-white/5 transition-colors"
- >
- <X size={14} />
- </button>
- <div className="flex items-start gap-3 pe-6">
- <div className="shrink-0 w-8 h-8 rounded-md bg-primary/10 dark:bg-primary/20 flex items-center justify-center">
- <Sparkles size={16} className="text-primary" />
- </div>
- <div className="flex-1 min-w-0">
- <p className="text-xs font-medium text-foreground mb-0.5">
- {t("controlPanel.aiCta.title")}
- </p>
- <p className="text-xs text-muted-foreground mb-2">
- {t("controlPanel.aiCta.description")}
- </p>
- <Button
- variant="default"
- size="sm"
- className="h-7 text-xs"
- onClick={() => onOpenSettings("intelligence")}
- >
- {t("controlPanel.aiCta.enable")}
- </Button>
- </div>
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 pt-4 pb-6")}>
+ {!useCleanupModel && !aiCTADismissed && (
+ <div className="mb-3 relative rounded-lg border border-primary/20 bg-primary/5 dark:bg-primary/10 p-3">
+ <button
+ onClick={() => {
+ localStorage.setItem("aiCTADismissed", "true");
+ setAiCTADismissed(true);
+ }}
+ aria-label={t("common.close")}
+ className="absolute top-2 end-2 p-1 rounded-sm text-muted-foreground hover:text-foreground hover:bg-black/5 dark:hover:bg-white/5 transition-colors"
+ >
+ <X size={14} />
+ </button>
+ <div className="flex items-start gap-3 pe-6">
+ <div className="shrink-0 w-8 h-8 rounded-md bg-primary/10 dark:bg-primary/20 flex items-center justify-center">
+ <Sparkles size={16} className="text-primary" />
+ </div>
+ <div className="flex-1 min-w-0">
+ <p className="text-xs font-medium text-foreground mb-0.5">
+ {t("controlPanel.aiCta.title")}
+ </p>
+ <p className="text-xs text-muted-foreground mb-2">
+ {t("controlPanel.aiCta.description")}
+ </p>
+ <Button
+ variant="default"
+ size="sm"
+ className="h-7 text-xs"
+ onClick={() => onOpenSettings("intelligence")}
+ >
+ {t("controlPanel.aiCta.enable")}
+ </Button>
</div>
</div>
- )}
+ </div>
+ )}
- <div className="flex gap-8">
- <div className="min-w-0 flex-1">
- {!dataRetentionEnabled && (
- <div className="mb-3 rounded-lg border border-amber-500/30 bg-amber-500/5 dark:bg-amber-500/10 px-3.5 py-2.5 flex items-center gap-2.5">
- <span className="text-amber-600 dark:text-amber-400 shrink-0 text-sm">⊘</span>
- <p className="text-xs text-amber-700 dark:text-amber-300/90 leading-relaxed">
- {t("controlPanel.history.dataRetentionDisabled")}
- </p>
+ <div className="flex gap-8">
+ <div className="min-w-0 flex-1">
+ {!dataRetentionEnabled && (
+ <div className="mb-3 rounded-lg border border-amber-500/30 bg-amber-500/5 dark:bg-amber-500/10 px-3.5 py-2.5 flex items-center gap-2.5">
+ <span className="text-amber-600 dark:text-amber-400 shrink-0 text-sm">⊘</span>
+ <p className="text-xs text-amber-700 dark:text-amber-300/90 leading-relaxed">
+ {t("controlPanel.history.dataRetentionDisabled")}
+ </p>
+ </div>
+ )}
+ {isLoading && history.length === 0 ? (
+ <div className="rounded-2xl border border-border/70 bg-card/50 dark:border-white/10 dark:bg-surface-2/60">
+ <div className="flex items-center justify-center gap-2 py-10">
+ <Loader2 size={14} className="animate-spin text-primary" />
+ <span className="text-sm text-muted-foreground">{t("controlPanel.loading")}</span>
</div>
- )}
- {isLoading && history.length === 0 ? (
- <div className="rounded-2xl border border-border/70 bg-card/50 dark:border-white/10 dark:bg-surface-2/60">
- <div className="flex items-center justify-center gap-2 py-10">
- <Loader2 size={14} className="animate-spin text-primary" />
- <span className="text-sm text-muted-foreground">{t("controlPanel.loading")}</span>
+ </div>
+ ) : history.length === 0 ? (
+ <>
+ <p className="pt-2 pb-2.5 text-sm text-muted-foreground">
+ {t("controlPanel.history.sectionTitle")}
+ </p>
+ <EmptyStateCard
+ icon={Mic}
+ title={t("controlPanel.history.empty")}
+ description={t("controlPanel.history.emptyDescription")}
+ >
+ {/* Ghost rows preview the list this card becomes. */}
+ <div aria-hidden="true" className="mb-1 w-56 space-y-2">
+ {EMPTY_PREVIEW_WIDTHS.map((width) => (
+ <span
+ key={width}
+ className={cn(
+ "block h-2 rounded-full bg-foreground/6 dark:bg-white/8",
+ width
+ )}
+ />
+ ))}
</div>
- </div>
- ) : history.length === 0 ? (
- <>
- <p className="pt-2 pb-2.5 text-sm text-muted-foreground">
- {t("controlPanel.history.sectionTitle")}
- </p>
- <EmptyStateCard
- icon={Mic}
- title={t("controlPanel.history.empty")}
- description={t("controlPanel.history.emptyDescription")}
- >
- {/* Ghost rows preview the list this card becomes. */}
- <div aria-hidden="true" className="mb-1 w-56 space-y-2">
- {EMPTY_PREVIEW_WIDTHS.map((width) => (
- <span
- key={width}
- className={cn(
- "block h-2 rounded-full bg-foreground/6 dark:bg-white/8",
- width
- )}
- />
+ <span className="inline-flex h-[30px] items-center gap-1.5 rounded-full bg-surface-3 px-3 text-xs font-medium text-foreground/70 dark:bg-surface-3">
+ {t("controlPanel.history.press")}
+ <span dir="ltr" className="inline-flex items-center gap-1">
+ {parseHotkeyList(hotkey).map((hk, index) => (
+ <Fragment key={hk}>
+ {index > 0 && <span className="text-foreground/45">/</span>}
+ <kbd className="rounded-md bg-background px-1.5 py-px font-sans text-[11px] font-medium text-foreground/80 shadow-sm dark:bg-surface-2">
+ {formatHotkeyLabel(hk)}
+ </kbd>
+ </Fragment>
))}
- </div>
- <span className="inline-flex h-[30px] items-center gap-1.5 rounded-full bg-surface-3 px-3 text-xs font-medium text-foreground/70 dark:bg-surface-3">
- {t("controlPanel.history.press")}
- <span dir="ltr" className="inline-flex items-center gap-1">
- {parseHotkeyList(hotkey).map((hk, index) => (
- <Fragment key={hk}>
- {index > 0 && <span className="text-foreground/45">/</span>}
- <kbd className="rounded-md bg-background px-1.5 py-px font-sans text-[11px] font-medium text-foreground/80 shadow-sm dark:bg-surface-2">
- {formatHotkeyLabel(hk)}
- </kbd>
- </Fragment>
- ))}
- </span>
- {t("controlPanel.history.toStart")}
</span>
- </EmptyStateCard>
- </>
- ) : (
- <div className="group">
- {groupedHistory.map((group, index) => (
- <div key={group.label} className={index > 0 ? "mt-6" : ""}>
- <div className="sticky -top-1 z-10 -mx-4 px-4 pt-2 pb-2.5 bg-background flex items-center justify-between">
- <span className="text-sm text-muted-foreground">{group.label}</span>
- {index === 0 && (
- <div className="flex items-center gap-1.5 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity duration-200">
- {discardedToggle}
- <button
- onClick={clearAllTranscriptions}
- className="flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-muted-foreground/70 hover:!text-destructive hover:!bg-destructive/8 dark:hover:!bg-destructive/10 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/30 transition-all duration-200"
- >
- <Trash2 size={11} />
- <span>{t("controlPanel.history.clearAll")}</span>
- </button>
- </div>
- )}
- </div>
- <div className="relative z-0 overflow-clip rounded-2xl border border-border/70 bg-card/50 divide-y divide-border/60 dark:border-white/10 dark:bg-surface-2/60">
- {group.items.map((item) => (
- <TranscriptionItem
- key={item.id}
- item={item}
- onCopy={copyToClipboard}
- onDelete={deleteTranscription}
- onShowAudioInFolder={onShowAudioInFolder}
- onRetryTranscription={onRetryTranscription}
- onOpenSettings={() => onOpenSettings("transcription")}
- />
- ))}
- </div>
+ {t("controlPanel.history.toStart")}
+ </span>
+ </EmptyStateCard>
+ </>
+ ) : (
+ <div className="group">
+ {groupedHistory.map((group, index) => (
+ <div key={group.label} className={index > 0 ? "mt-6" : ""}>
+ <div className="sticky -top-1 z-10 -mx-6 px-6 pt-2 pb-2.5 bg-background flex items-center justify-between">
+ <span className="text-sm text-muted-foreground">{group.label}</span>
+ {index === 0 && (
+ <div className="flex items-center gap-1.5 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity duration-200">
+ {discardedToggle}
+ <button
+ onClick={clearAllTranscriptions}
+ className="flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-muted-foreground/70 hover:!text-destructive hover:!bg-destructive/8 dark:hover:!bg-destructive/10 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/30 transition-all duration-200"
+ >
+ <Trash2 size={11} />
+ <span>{t("controlPanel.history.clearAll")}</span>
+ </button>
+ </div>
+ )}
</div>
- ))}
- </div>
- )}
- </div>
+ <div className="relative z-0 overflow-clip rounded-2xl border border-border/70 bg-card/50 divide-y divide-border/60 dark:border-white/10 dark:bg-surface-2/60">
+ {group.items.map((item) => (
+ <TranscriptionItem
+ key={item.id}
+ item={item}
+ onCopy={copyToClipboard}
+ onDelete={deleteTranscription}
+ onShowAudioInFolder={onShowAudioInFolder}
+ onRetryTranscription={onRetryTranscription}
+ onOpenSettings={() => onOpenSettings("transcription")}
+ />
+ ))}
+ </div>
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
- <div className="hidden w-80 shrink-0 md:block">
- <UpcomingMeetings
- events={events}
- isLoading={eventsLoading}
- isConnected={isConnected}
- onConnectCalendar={onOpenIntegrations}
- />
- </div>
+ <div className="hidden w-80 shrink-0 md:block">
+ <UpcomingMeetings
+ events={events}
+ isLoading={eventsLoading}
+ isConnected={isConnected}
+ onConnectCalendar={onOpenIntegrations}
+ />
</div>
</div>
</div>
diff --git a/src/components/InsightsView.tsx b/src/components/InsightsView.tsx
index bcef45621..6cdedd7b7 100644
--- a/src/components/InsightsView.tsx
+++ b/src/components/InsightsView.tsx
@@ -18,6 +18,7 @@ import { usePolicyStore } from "../stores/policyStore";
import type { AnalyticsDailyBucket, AnalyticsSummary } from "../types/electron";
import { cn } from "./lib/utils";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
import { Tooltip } from "./ui/tooltip";
@@ -432,7 +433,7 @@ export default function InsightsView({ onSignIn }: InsightsViewProps) {
: t("insights.onDevice");
return (
- <div className="mx-auto flex min-h-full w-full max-w-5xl flex-col px-6 py-6">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "flex min-h-full flex-col px-6 py-6")}>
<Tabs value={activeTab} onValueChange={setActiveTab} className="flex flex-1 flex-col">
<div className="flex min-h-8 items-center justify-between gap-4">
<TabsList className="h-7 p-0.5 rounded-[7px]">
diff --git a/src/components/IntegrationsView.tsx b/src/components/IntegrationsView.tsx
index 8d46113dd..fd573fa24 100644
--- a/src/components/IntegrationsView.tsx
+++ b/src/components/IntegrationsView.tsx
@@ -2,6 +2,8 @@ import { useState, useEffect, useCallback } from "react";
import { useTranslation } from "react-i18next";
import { CalendarDays, Code2, Info, Loader2, Mail, Plus, Unlink } from "./icons";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
+import { cn } from "./lib/utils";
import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "./ui/BidiInterpolatedText";
import { Badge } from "./ui/badge";
import { SettingsPanel, SettingsPanelRow, SettingsRow } from "./ui/SettingsSection";
@@ -357,7 +359,7 @@ export default function IntegrationsView({ isPaid, onUpgrade }: IntegrationsView
}, [isMac, setAppleCalendarConnected]);
return (
- <div className="max-w-lg mx-auto w-full px-6 py-6 space-y-5">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-6 space-y-5")}>
<p className="text-xs text-muted-foreground/70">{t("integrations.description")}</p>
<div>
diff --git a/src/components/RequiredModelsBanner.tsx b/src/components/RequiredModelsBanner.tsx
index 2232241ba..05b157c44 100644
--- a/src/components/RequiredModelsBanner.tsx
+++ b/src/components/RequiredModelsBanner.tsx
@@ -2,6 +2,8 @@ import { useCallback, useMemo, useState } from "react";
import { AlertTriangle } from "./icons";
import { useTranslation } from "react-i18next";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
+import { cn } from "./lib/utils";
import { DownloadProgressBar } from "./ui/DownloadProgressBar";
import { useModelDownload } from "../hooks/useModelDownload";
import { useRequiredLocalModels } from "../hooks/useRequiredLocalModels";
@@ -58,7 +60,7 @@ export function RequiredModelsBanner() {
: null;
return (
- <div className="max-w-3xl mx-auto w-full mb-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 mb-3")}>
<div className="rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/50 p-3">
<div className="flex items-start gap-3">
<div className="shrink-0 w-8 h-8 rounded-md bg-amber-100 dark:bg-amber-900/50 flex items-center justify-center">
diff --git a/src/components/SnippetsView.tsx b/src/components/SnippetsView.tsx
index a1ad16bc3..8b641e46b 100644
--- a/src/components/SnippetsView.tsx
+++ b/src/components/SnippetsView.tsx
@@ -10,6 +10,8 @@ import {
DialogFooter,
} from "./ui/dialog";
import { Button } from "./ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
+import { cn } from "./lib/utils";
import { Input } from "./ui/input";
import { Label } from "./ui/label";
import { Textarea } from "./ui/textarea";
@@ -165,7 +167,7 @@ export default function SnippetsView() {
const canCreate = !!trimmedTrigger && !!expansion.trim() && !duplicate;
return (
- <div className="px-5 py-4 flex flex-col gap-3">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-4 flex flex-col gap-3")}>
<EditSnippetDialog
snippet={editing}
onOpenChange={(open) => {
diff --git a/src/components/chat/ChatMessages.tsx b/src/components/chat/ChatMessages.tsx
index 72b0e9fed..c3ce2273a 100644
--- a/src/components/chat/ChatMessages.tsx
+++ b/src/components/chat/ChatMessages.tsx
@@ -7,9 +7,16 @@ interface ChatMessagesProps {
messages: Message[];
emptyState?: React.ReactNode;
onOpenNote?: (noteId: number) => void;
+ /** Extra classes for the message column (e.g. a page-width cap); the scroll container stays full width. */
+ contentClassName?: string;
}
-export function ChatMessages({ messages, emptyState, onOpenNote }: ChatMessagesProps) {
+export function ChatMessages({
+ messages,
+ emptyState,
+ onOpenNote,
+ contentClassName,
+}: ChatMessagesProps) {
// Follow the stream only while the user is at the bottom; scrolling up to
// re-read must not be yanked back down by the next token.
const {
@@ -34,7 +41,7 @@ export function ChatMessages({ messages, emptyState, onOpenNote }: ChatMessagesP
{messages.length === 0 ? (
(emptyState ?? null)
) : (
- <div className="flex flex-col gap-1.5">
+ <div className={cn("flex flex-col gap-1.5", contentClassName)}>
{messages
.filter((msg) => msg.role !== "tool")
.map((msg) => (
diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsx
index b35acff5c..b3e31b465 100644
--- a/src/components/chat/ChatView.tsx
+++ b/src/components/chat/ChatView.tsx
@@ -9,6 +9,7 @@ import { ChatEmptyIllustration } from "./ChatEmptyIllustration";
import ConversationList from "./ConversationList";
import EmptyChatState from "./EmptyChatState";
import { ConfirmDialog } from "../ui/dialog";
+import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
import { useDialogs } from "../../hooks/useDialogs";
import { getCachedPlatform } from "../../utils/platform";
@@ -163,15 +164,22 @@ export default function ChatView() {
<div className="flex-1 min-w-80 flex flex-col">
{hasActiveChat ? (
<>
- <ChatMessages messages={persistence.messages} emptyState={<NewChatEmptyState />} />
- <ChatInput
- agentState={streaming.agentState}
- partialTranscript=""
- onTextSubmit={handleTextSubmit}
- onCancel={streaming.cancelStream}
- autoFocus={isNewChat}
- voiceDraft
+ <ChatMessages
+ messages={persistence.messages}
+ emptyState={<NewChatEmptyState />}
+ contentClassName={PAGE_CONTENT_WIDTH_CLASS}
/>
+ <div className="px-3 pb-3 pt-1">
+ <ChatInput
+ className={PAGE_CONTENT_WIDTH_CLASS}
+ agentState={streaming.agentState}
+ partialTranscript=""
+ onTextSubmit={handleTextSubmit}
+ onCancel={streaming.cancelStream}
+ autoFocus={isNewChat}
+ voiceDraft
+ />
+ </div>
</>
) : (
<EmptyChatState />
diff --git a/src/components/notes/MeetingTranscriptChat.tsx b/src/components/notes/MeetingTranscriptChat.tsx
index 3879a7ce7..92e7b9a13 100644
--- a/src/components/notes/MeetingTranscriptChat.tsx
+++ b/src/components/notes/MeetingTranscriptChat.tsx
@@ -744,6 +744,7 @@ interface MeetingTranscriptChatProps {
onDismissSuggestion?: (speakerId: string) => void;
onAttachSpeakerEmail?: (profileId: number, email: string | null) => void;
onToggleSelect?: (segmentId: string) => void;
+ contentClassName?: string;
}
export function MeetingTranscriptChat({
@@ -768,6 +769,7 @@ export function MeetingTranscriptChat({
onDismissSuggestion,
onAttachSpeakerEmail,
onToggleSelect,
+ contentClassName,
}: MeetingTranscriptChatProps) {
const { t } = useTranslation();
const hasContent = segments.length > 0 || Boolean(micPartial) || Boolean(systemPartial);
@@ -884,78 +886,82 @@ export function MeetingTranscriptChat({
<div className="h-full flex flex-col">
{consentNotice}
{(isRecording || isDiarizing) && (
- <div className="shrink-0 flex flex-wrap items-center gap-x-3 gap-y-1 mx-4 mb-1.5 px-3 py-1.5 rounded-lg border border-border/70 bg-surface-2/40 text-xs text-foreground">
- <div className="flex items-center gap-1.5 min-w-0">
- {isDiarizing ? (
- <Loader2 size={12} className="animate-spin text-muted-foreground shrink-0" />
- ) : (
- <Sparkles
- size={12}
- className={cn(
- "shrink-0",
- sessionDiarizationEnabled ? "text-primary" : "text-muted-foreground"
- )}
- />
- )}
- <span className="truncate">
- {isDiarizing
- ? t("notes.speaker.pill.finalizing")
- : sessionDiarizationEnabled
- ? t("notes.speaker.pill.identifying")
- : t("notes.speaker.pill.notLabeled")}
- </span>
- {showAssumedHint && (
- <span className="text-muted-foreground truncate">
- {t("notes.speaker.pill.assumedHint")}
+ <div className={cn("shrink-0 px-4 mb-1.5", contentClassName)}>
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1.5 rounded-lg border border-border/70 bg-surface-2/40 text-xs text-foreground">
+ <div className="flex items-center gap-1.5 min-w-0">
+ {isDiarizing ? (
+ <Loader2 size={12} className="animate-spin text-muted-foreground shrink-0" />
+ ) : (
+ <Sparkles
+ size={12}
+ className={cn(
+ "shrink-0",
+ sessionDiarizationEnabled ? "text-primary" : "text-muted-foreground"
+ )}
+ />
+ )}
+ <span className="truncate">
+ {isDiarizing
+ ? t("notes.speaker.pill.finalizing")
+ : sessionDiarizationEnabled
+ ? t("notes.speaker.pill.identifying")
+ : t("notes.speaker.pill.notLabeled")}
</span>
- )}
- </div>
- <div className="flex-1" />
- {!isDiarizing && sessionDiarizationEnabled && (
- <div className="flex items-center gap-1.5">
- <span className="text-muted-foreground">{t("notes.speaker.pill.speakersLabel")}</span>
- <div className="flex items-center gap-0.5 rounded-md border border-border bg-surface-2/60">
- <button
- onClick={() => onSetSessionExpectedCount?.(sessionExpectedCount - 1)}
- disabled={sessionExpectedCount <= 1}
- className="px-1.5 py-0.5 rounded-s-md hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:opacity-30 disabled:pointer-events-none transition-colors"
- aria-label={t("notes.speaker.pill.decAria")}
- >
- −
- </button>
- <span className="px-1.5 tabular-nums" aria-live="polite">
- {sessionExpectedCount === 1
- ? t("notes.speaker.pill.justYou")
- : sessionExpectedCount}
+ {showAssumedHint && (
+ <span className="text-muted-foreground truncate">
+ {t("notes.speaker.pill.assumedHint")}
+ </span>
+ )}
+ </div>
+ <div className="flex-1" />
+ {!isDiarizing && sessionDiarizationEnabled && (
+ <div className="flex items-center gap-1.5">
+ <span className="text-muted-foreground">
+ {t("notes.speaker.pill.speakersLabel")}
</span>
+ <div className="flex items-center gap-0.5 rounded-md border border-border bg-surface-2/60">
+ <button
+ onClick={() => onSetSessionExpectedCount?.(sessionExpectedCount - 1)}
+ disabled={sessionExpectedCount <= 1}
+ className="px-1.5 py-0.5 rounded-s-md hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:opacity-30 disabled:pointer-events-none transition-colors"
+ aria-label={t("notes.speaker.pill.decAria")}
+ >
+ −
+ </button>
+ <span className="px-1.5 tabular-nums" aria-live="polite">
+ {sessionExpectedCount === 1
+ ? t("notes.speaker.pill.justYou")
+ : sessionExpectedCount}
+ </span>
+ <button
+ onClick={() => onSetSessionExpectedCount?.(sessionExpectedCount + 1)}
+ disabled={sessionExpectedCount >= MAX_SPEAKER_COUNT}
+ className="px-1.5 py-0.5 rounded-e-md hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:opacity-30 disabled:pointer-events-none transition-colors"
+ aria-label={t("notes.speaker.pill.incAria")}
+ >
+ +
+ </button>
+ </div>
+ </div>
+ )}
+ {!isDiarizing && (
+ <div className="flex items-center gap-1.5">
<button
- onClick={() => onSetSessionExpectedCount?.(sessionExpectedCount + 1)}
- disabled={sessionExpectedCount >= MAX_SPEAKER_COUNT}
- className="px-1.5 py-0.5 rounded-e-md hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:opacity-30 disabled:pointer-events-none transition-colors"
- aria-label={t("notes.speaker.pill.incAria")}
+ onClick={() => onSetSessionDiarizationEnabled?.(!sessionDiarizationEnabled)}
+ className="text-muted-foreground hover:text-foreground transition-colors focus-visible:outline-none focus-visible:underline"
+ aria-label={t("notes.speaker.pill.toggleAria")}
>
- +
+ {t("notes.speaker.pill.labelToggle")}
</button>
+ <div className="scale-75 -my-1">
+ <Toggle
+ checked={sessionDiarizationEnabled}
+ onChange={(next) => onSetSessionDiarizationEnabled?.(next)}
+ />
+ </div>
</div>
- </div>
- )}
- {!isDiarizing && (
- <div className="flex items-center gap-1.5">
- <button
- onClick={() => onSetSessionDiarizationEnabled?.(!sessionDiarizationEnabled)}
- className="text-muted-foreground hover:text-foreground transition-colors focus-visible:outline-none focus-visible:underline"
- aria-label={t("notes.speaker.pill.toggleAria")}
- >
- {t("notes.speaker.pill.labelToggle")}
- </button>
- <div className="scale-75 -my-1">
- <Toggle
- checked={sessionDiarizationEnabled}
- onChange={(next) => onSetSessionDiarizationEnabled?.(next)}
- />
- </div>
- </div>
- )}
+ )}
+ </div>
</div>
)}
<div
@@ -965,9 +971,9 @@ export function MeetingTranscriptChat({
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
- className="flex-1 min-h-0 overflow-y-auto px-4 pt-2 agent-chat-scroll pb-[var(--floating-inset,96px)]"
+ className="flex-1 min-h-0 overflow-y-auto pt-2 agent-chat-scroll pb-[var(--floating-inset,96px)]"
>
- <div>
+ <div className={cn("px-4", contentClassName)}>
<div style={{ height: totalSize, width: "100%", position: "relative" }}>
{virtualizer.getVirtualItems().map((virtualItem) => {
const i = virtualItem.index;
diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsx
index 4cdff660f..02122dd30 100644
--- a/src/components/notes/NoteEditor.tsx
+++ b/src/components/notes/NoteEditor.tsx
@@ -54,6 +54,7 @@ import {
DropdownMenuSeparator,
} from "../ui/dropdown-menu";
import { cn } from "../lib/utils";
+import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
import {
SPLIT_BUTTON_DIVIDER_CLASS,
SPLIT_BUTTON_GROUP_CLASS,
@@ -831,7 +832,7 @@ export default function NoteEditor({
return (
<div className="flex h-full min-h-0">
<div className="flex-1 min-w-0 flex flex-col">
- <div className="px-5 pt-5 pb-0">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-5 pt-5 pb-0")}>
<div
dir="auto"
ref={titleRef}
@@ -1109,37 +1110,39 @@ export default function NoteEditor({
{conflict && (
<div
className={cn(
- "flex items-center gap-2 px-5 h-8 mt-2 shrink-0",
+ "h-8 mt-2 shrink-0",
"bg-amber-400/5 dark:bg-amber-400/[0.07]",
"border-y border-amber-400/15 dark:border-amber-400/20",
"animate-in slide-in-from-top-2 duration-300"
)}
>
- <span className="w-1 h-1 rounded-full bg-amber-400/60 shrink-0" />
- <p className="text-[11px] text-foreground/50 flex-1 truncate">
- {t("notes.spaces.conflictBanner")}
- {conflictEditorName && (
- <span className="text-foreground/45">
- {" "}
- {t("notes.spaces.editedBy", {
- name: conflictEditorName,
- time: formatRelativeTime(conflict.updated_at, t, locale),
- })}
- </span>
- )}
- </p>
- <button
- onClick={handleConflictRefresh}
- className="text-[11px] font-medium text-foreground/50 hover:text-foreground/70 transition-colors shrink-0 px-1 -mx-1 rounded outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
- >
- {t("notes.spaces.conflictRefresh")}
- </button>
- <button
- onClick={handleConflictKeep}
- className="text-[11px] font-medium text-foreground/45 hover:text-foreground/55 transition-colors shrink-0 px-1 -mx-1 rounded outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
- >
- {t("notes.spaces.conflictKeep")}
- </button>
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "flex h-full items-center gap-2 px-5")}>
+ <span className="w-1 h-1 rounded-full bg-amber-400/60 shrink-0" />
+ <p className="text-[11px] text-foreground/50 flex-1 truncate">
+ {t("notes.spaces.conflictBanner")}
+ {conflictEditorName && (
+ <span className="text-foreground/45">
+ {" "}
+ {t("notes.spaces.editedBy", {
+ name: conflictEditorName,
+ time: formatRelativeTime(conflict.updated_at, t, locale),
+ })}
+ </span>
+ )}
+ </p>
+ <button
+ onClick={handleConflictRefresh}
+ className="text-[11px] font-medium text-foreground/50 hover:text-foreground/70 transition-colors shrink-0 px-1 -mx-1 rounded outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
+ >
+ {t("notes.spaces.conflictRefresh")}
+ </button>
+ <button
+ onClick={handleConflictKeep}
+ className="text-[11px] font-medium text-foreground/45 hover:text-foreground/55 transition-colors shrink-0 px-1 -mx-1 rounded outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
+ >
+ {t("notes.spaces.conflictKeep")}
+ </button>
+ </div>
</div>
)}
@@ -1148,6 +1151,7 @@ export default function NoteEditor({
{viewMode === "transcript" && (hasChatSegments || isRecording) ? (
isRecording ? (
<LiveMeetingTranscriptChat
+ contentClassName={PAGE_CONTENT_WIDTH_CLASS}
speakerMappings={speakerMappings}
speakerProfiles={speakerProfiles}
participants={parsedParticipants}
@@ -1164,6 +1168,7 @@ export default function NoteEditor({
/>
) : (
<MeetingTranscriptChat
+ contentClassName={PAGE_CONTENT_WIDTH_CLASS}
segments={displaySegments}
speakerMappings={speakerMappings}
speakerProfiles={knownSpeakers}
@@ -1189,7 +1194,7 @@ export default function NoteEditor({
icon={Mic}
title={t("notes.editor.transcriptEmptyTitle")}
description={t("notes.editor.transcriptEmptyDescription")}
- className="mt-2"
+ className={cn(PAGE_CONTENT_WIDTH_CLASS, "mt-2")}
>
{canEditNote && recordingAllowed && (
<Button size="sm" onClick={onStartRecording} disabled={isProcessing}>
diff --git a/src/components/notes/UploadAudioView.tsx b/src/components/notes/UploadAudioView.tsx
index 4c8c251af..a1dec6fdd 100644
--- a/src/components/notes/UploadAudioView.tsx
+++ b/src/components/notes/UploadAudioView.tsx
@@ -13,6 +13,7 @@ import {
} from "../icons";
import { useShallow } from "zustand/react/shallow";
import { Button } from "../ui/button";
+import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
import { cn } from "../lib/utils";
import {
Select,
@@ -960,305 +961,301 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
};
return (
- <div className="flex flex-col items-center h-full overflow-y-auto px-6">
+ <div className="flex flex-col items-center h-full overflow-y-auto">
<div
- className="w-full max-w-md shrink-0 my-auto"
+ className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 shrink-0 my-auto")}
style={{ animation: "float-up 0.4s ease-out" }}
>
- <div className="max-w-[320px] mx-auto">
- {state === "idle" && providerReady === false && (
- <NoProviderView t={t} onOpenSettings={() => onOpenSettings?.("uploadTranscription")} />
- )}
+ {state === "idle" && providerReady === false && (
+ <NoProviderView t={t} onOpenSettings={() => onOpenSettings?.("uploadTranscription")} />
+ )}
- {state === "idle" && providerReady !== false && (
- <>
- <IdleView
- t={t}
- getActiveModelLabel={getActiveModelLabel}
- handleDrop={handleDrop}
- handleBrowse={handleBrowse}
- isDragOver={isDragOver}
- setIsDragOver={setIsDragOver}
- onOpenSettings={onOpenSettings}
- />
+ {state === "idle" && providerReady !== false && (
+ <>
+ <IdleView
+ t={t}
+ getActiveModelLabel={getActiveModelLabel}
+ handleDrop={handleDrop}
+ handleBrowse={handleBrowse}
+ isDragOver={isDragOver}
+ setIsDragOver={setIsDragOver}
+ onOpenSettings={onOpenSettings}
+ />
- <div className="flex items-center gap-3 my-3">
- <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
- <span className="text-[10px] text-foreground/45 uppercase tracking-wider">
- {t("notes.upload.orDivider")}
- </span>
- <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
- </div>
+ <div className="flex items-center gap-3 my-3">
+ <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
+ <span className="text-[10px] text-foreground/45 uppercase tracking-wider">
+ {t("notes.upload.orDivider")}
+ </span>
+ <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
+ </div>
- {urlExpanded ? (
- <div>
- <textarea
- dir="ltr"
- value={urlInput}
- onChange={(e) => setUrlInput(e.target.value)}
- placeholder={t("notes.upload.pasteUrls")}
- rows={4}
- className={cn(uploadFieldClass, "w-full px-3 py-2 resize-none")}
- autoFocus
- />
- <div className="flex items-center gap-2 mt-2 justify-end">
- <Button
- variant="ghost"
- size="sm"
- onClick={() => {
- setUrlExpanded(false);
- setUrlInput("");
- }}
- className="h-7 text-xs text-foreground/45"
- >
- {t("notes.upload.cancel")}
- </Button>
- <Button
- variant="default"
- size="sm"
- onClick={handleBatchUrlSubmit}
- disabled={!urlInput.trim()}
- className="h-7 text-xs"
- >
- {t("notes.upload.addToQueue")}
- </Button>
- </div>
- </div>
- ) : (
- <div dir="ltr" className="relative">
- {isYouTubeUrl(urlInput) ? (
- <svg
- viewBox="0 0 28 20"
- className="absolute left-2.5 top-1/2 -translate-y-1/2 w-[18px] h-[13px] z-10 pointer-events-none"
- >
- <rect width="28" height="20" rx="4" fill="#FF0000" />
- <polygon points="11,4 11,16 21,10" fill="white" />
- </svg>
- ) : uploadFileUrlPattern.test(urlInput) ? (
- <FileAudio
- size={13}
- className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
- />
- ) : (
- <Link2
- size={13}
- className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
- />
- )}
- <input
- dir="ltr"
- type="url"
- value={urlInput}
- onChange={(e) => setUrlInput(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === "Enter") {
- e.preventDefault();
- handleUrlSubmit();
- }
- }}
- onFocus={() => {
- if (urlInput.includes("\n")) setUrlExpanded(true);
- }}
- onPaste={(e) => {
- const pasted = e.clipboardData.getData("text");
- if (pasted.includes("\n")) {
- e.preventDefault();
- setUrlInput(pasted);
- setUrlExpanded(true);
- }
+ {urlExpanded ? (
+ <div>
+ <textarea
+ dir="ltr"
+ value={urlInput}
+ onChange={(e) => setUrlInput(e.target.value)}
+ placeholder={t("notes.upload.pasteUrls")}
+ rows={4}
+ className={cn(uploadFieldClass, "w-full px-3 py-2 resize-none")}
+ autoFocus
+ />
+ <div className="flex items-center gap-2 mt-2 justify-end">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => {
+ setUrlExpanded(false);
+ setUrlInput("");
}}
- placeholder={t("notes.upload.urlPlaceholder")}
- className={cn(uploadFieldClass, "w-full h-8 pl-8 pr-9")}
- />
- <button
- onClick={handleUrlSubmit}
+ className="h-7 text-xs text-foreground/45"
+ >
+ {t("notes.upload.cancel")}
+ </Button>
+ <Button
+ variant="default"
+ size="sm"
+ onClick={handleBatchUrlSubmit}
disabled={!urlInput.trim()}
- aria-label={t("notes.upload.urlSubmit")}
- className={cn(
- "absolute right-px top-px bottom-px w-7 rounded-r-[7px] flex items-center justify-center transition-colors",
- "border-l border-foreground/6 dark:border-white/10",
- urlInput.trim()
- ? "text-foreground/45 hover:text-foreground/60 hover:bg-foreground/[0.03] dark:hover:bg-white/[0.03]"
- : "text-foreground/45"
- )}
+ className="h-7 text-xs"
>
- <ChevronRight size={14} />
- </button>
+ {t("notes.upload.addToQueue")}
+ </Button>
</div>
- )}
- </>
- )}
-
- {skippedNotice && (
- <p className="text-[10px] text-amber-500/60 mt-2 text-center">{skippedNotice}</p>
- )}
-
- {batch.hasQueue && (
- <div className="mt-3">
- <BatchQueueView
- queue={batch.queue}
- byokMaxFileSizeMb={byokMaxFileSizeMb}
- completedCount={batch.completedCount}
- failedCount={batch.failedCount}
- totalCount={batch.totalCount}
- isProcessing={batch.isProcessing}
- onRemoveItem={batch.removeItem}
- onCancelAll={batch.cancelAll}
- onClearQueue={() => {
- setSkippedNotice(null);
- batch.clearQueue();
- }}
- onOpenNote={(noteId) =>
- onNoteCreated?.(noteId, batchFolderId ? Number(batchFolderId) : null)
- }
- />
-
- {!batch.isProcessing && batch.queue.some((i) => i.status === "queued") && (
- <div className="mt-3 space-y-2">
- {folders.length > 0 && (
- <FolderSelect
- t={t}
- folders={folders}
- value={batchFolderId}
- onChange={setBatchFolderId}
- />
+ </div>
+ ) : (
+ <div dir="ltr" className="relative">
+ {isYouTubeUrl(urlInput) ? (
+ <svg
+ viewBox="0 0 28 20"
+ className="absolute left-2.5 top-1/2 -translate-y-1/2 w-[18px] h-[13px] z-10 pointer-events-none"
+ >
+ <rect width="28" height="20" rx="4" fill="#FF0000" />
+ <polygon points="11,4 11,16 21,10" fill="white" />
+ </svg>
+ ) : uploadFileUrlPattern.test(urlInput) ? (
+ <FileAudio
+ size={13}
+ className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
+ />
+ ) : (
+ <Link2
+ size={13}
+ className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
+ />
+ )}
+ <input
+ dir="ltr"
+ type="url"
+ value={urlInput}
+ onChange={(e) => setUrlInput(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ handleUrlSubmit();
+ }
+ }}
+ onFocus={() => {
+ if (urlInput.includes("\n")) setUrlExpanded(true);
+ }}
+ onPaste={(e) => {
+ const pasted = e.clipboardData.getData("text");
+ if (pasted.includes("\n")) {
+ e.preventDefault();
+ setUrlInput(pasted);
+ setUrlExpanded(true);
+ }
+ }}
+ placeholder={t("notes.upload.urlPlaceholder")}
+ className={cn(uploadFieldClass, "w-full h-8 pl-8 pr-9")}
+ />
+ <button
+ onClick={handleUrlSubmit}
+ disabled={!urlInput.trim()}
+ aria-label={t("notes.upload.urlSubmit")}
+ className={cn(
+ "absolute right-px top-px bottom-px w-7 rounded-r-[7px] flex items-center justify-center transition-colors",
+ "border-l border-foreground/6 dark:border-white/10",
+ urlInput.trim()
+ ? "text-foreground/45 hover:text-foreground/60 hover:bg-foreground/[0.03] dark:hover:bg-white/[0.03]"
+ : "text-foreground/45"
)}
- <div className="flex justify-center">
- <Button
- variant="default"
- size="sm"
- onClick={startBatchProcessing}
- disabled={
- !uploadAllowedByPolicy ||
- state === "downloading" ||
- state === "transcribing"
- }
- className="h-8 text-xs px-5"
- >
- {t("notes.upload.transcribe")}
- </Button>
- </div>
- </div>
- )}
- </div>
- )}
+ >
+ <ChevronRight size={14} />
+ </button>
+ </div>
+ )}
+ </>
+ )}
- {state === "selected" && file && (
- <SelectedView
- t={t}
- file={file}
- getActiveModelLabel={getActiveModelLabel}
- reset={reset}
- handleTranscribe={handleTranscribe}
- transcribeDisabled={batch.isProcessing || !uploadAllowedByPolicy}
- requiresUpgrade={!!requiresUpgrade}
- fileTooLarge={fileTooLarge}
- isLargeFile={isLargeFile}
- isOpenWhisprCloud={isOpenWhisprCloud}
- byokTooLarge={byokTooLarge}
+ {skippedNotice && (
+ <p className="text-[10px] text-amber-500/60 mt-2 text-center">{skippedNotice}</p>
+ )}
+
+ {batch.hasQueue && (
+ <div className="mt-3">
+ <BatchQueueView
+ queue={batch.queue}
byokMaxFileSizeMb={byokMaxFileSizeMb}
- requiresAccount={requiresAccount}
- isProUser={!!isProUser}
- onUpgrade={() => usage?.openCheckout()}
- onCreateAccount={handleCreateAccount}
- onSwitchToCloud={switchToCloud}
- onOpenSettings={onOpenSettings}
+ completedCount={batch.completedCount}
+ failedCount={batch.failedCount}
+ totalCount={batch.totalCount}
+ isProcessing={batch.isProcessing}
+ onRemoveItem={batch.removeItem}
+ onCancelAll={batch.cancelAll}
+ onClearQueue={() => {
+ setSkippedNotice(null);
+ batch.clearQueue();
+ }}
+ onOpenNote={(noteId) =>
+ onNoteCreated?.(noteId, batchFolderId ? Number(batchFolderId) : null)
+ }
/>
- )}
- {state === "downloading" && downloadProgress && (
- <div
- className="flex flex-col items-center"
- style={{ animation: "float-up 0.3s ease-out" }}
- >
- <div className="flex items-end justify-center gap-[3px] h-10 mb-5">
- {[0, 1, 2, 3, 4, 5, 6].map((i) => (
- <div
- key={i}
- className="w-[3px] rounded-full bg-primary/40 dark:bg-primary/50 origin-bottom"
- style={{
- height: "100%",
- animation: `waveform-bar ${0.8 + i * 0.12}s ease-in-out infinite`,
- animationDelay: `${i * 0.08}s`,
- }}
+ {!batch.isProcessing && batch.queue.some((i) => i.status === "queued") && (
+ <div className="mt-3 space-y-2">
+ {folders.length > 0 && (
+ <FolderSelect
+ t={t}
+ folders={folders}
+ value={batchFolderId}
+ onChange={setBatchFolderId}
/>
- ))}
+ )}
+ <div className="flex justify-center">
+ <Button
+ variant="default"
+ size="sm"
+ onClick={startBatchProcessing}
+ disabled={
+ !uploadAllowedByPolicy || state === "downloading" || state === "transcribing"
+ }
+ className="h-8 text-xs px-5"
+ >
+ {t("notes.upload.transcribe")}
+ </Button>
+ </div>
</div>
+ )}
+ </div>
+ )}
+
+ {state === "selected" && file && (
+ <SelectedView
+ t={t}
+ file={file}
+ getActiveModelLabel={getActiveModelLabel}
+ reset={reset}
+ handleTranscribe={handleTranscribe}
+ transcribeDisabled={batch.isProcessing || !uploadAllowedByPolicy}
+ requiresUpgrade={!!requiresUpgrade}
+ fileTooLarge={fileTooLarge}
+ isLargeFile={isLargeFile}
+ isOpenWhisprCloud={isOpenWhisprCloud}
+ byokTooLarge={byokTooLarge}
+ byokMaxFileSizeMb={byokMaxFileSizeMb}
+ requiresAccount={requiresAccount}
+ isProUser={!!isProUser}
+ onUpgrade={() => usage?.openCheckout()}
+ onCreateAccount={handleCreateAccount}
+ onSwitchToCloud={switchToCloud}
+ onOpenSettings={onOpenSettings}
+ />
+ )}
- <div className="w-full max-w-[200px] h-[3px] rounded-full bg-foreground/5 dark:bg-white/5 overflow-hidden mb-3">
+ {state === "downloading" && downloadProgress && (
+ <div
+ className="flex flex-col items-center"
+ style={{ animation: "float-up 0.3s ease-out" }}
+ >
+ <div className="flex items-end justify-center gap-[3px] h-10 mb-5">
+ {[0, 1, 2, 3, 4, 5, 6].map((i) => (
<div
- className={cn(
- "h-full rounded-full bg-primary/50 transition-[width] duration-500 ease-out",
- // Percent 0 = size unknown (no content-length): pulse instead
- // of sitting on an empty bar.
- (downloadProgress.stage !== "downloading" || !downloadProgress.percent) &&
- "animate-pulse"
- )}
+ key={i}
+ className="w-[3px] rounded-full bg-primary/40 dark:bg-primary/50 origin-bottom"
style={{
- width:
- downloadProgress.stage === "downloading" && downloadProgress.percent
- ? `${Math.min(downloadProgress.percent, 100)}%`
- : "100%",
+ height: "100%",
+ animation: `waveform-bar ${0.8 + i * 0.12}s ease-in-out infinite`,
+ animationDelay: `${i * 0.08}s`,
}}
/>
- </div>
+ ))}
+ </div>
- <p className="text-xs text-foreground/50 font-medium">
- {downloadProgress.stage === "resolving"
- ? t("notes.upload.urlResolving")
- : t("notes.upload.urlDownloading")}
- </p>
+ <div className="w-full max-w-[200px] h-[3px] rounded-full bg-foreground/5 dark:bg-white/5 overflow-hidden mb-3">
+ <div
+ className={cn(
+ "h-full rounded-full bg-primary/50 transition-[width] duration-500 ease-out",
+ // Percent 0 = size unknown (no content-length): pulse instead
+ // of sitting on an empty bar.
+ (downloadProgress.stage !== "downloading" || !downloadProgress.percent) &&
+ "animate-pulse"
+ )}
+ style={{
+ width:
+ downloadProgress.stage === "downloading" && downloadProgress.percent
+ ? `${Math.min(downloadProgress.percent, 100)}%`
+ : "100%",
+ }}
+ />
+ </div>
- {downloadProgress.title && (
- <p dir="auto" className="text-xs text-foreground/45 mt-1 truncate max-w-50">
- {downloadProgress.title}
- </p>
- )}
+ <p className="text-xs text-foreground/50 font-medium">
+ {downloadProgress.stage === "resolving"
+ ? t("notes.upload.urlResolving")
+ : t("notes.upload.urlDownloading")}
+ </p>
- <Button
- variant="ghost"
- size="sm"
- onClick={handleCancelDownload}
- className="mt-3 h-7 text-xs text-foreground/45"
- >
- {t("notes.upload.urlCancelDownload")}
- </Button>
- </div>
- )}
+ {downloadProgress.title && (
+ <p dir="auto" className="text-xs text-foreground/45 mt-1 truncate max-w-50">
+ {downloadProgress.title}
+ </p>
+ )}
- {state === "transcribing" && (
- <TranscribingView
- t={t}
- progress={progress}
- getTranscribingLabel={getTranscribingLabel}
- file={file}
- chunkProgress={chunkProgress}
- onCancel={cancelTranscription}
- />
- )}
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={handleCancelDownload}
+ className="mt-3 h-7 text-xs text-foreground/45"
+ >
+ {t("notes.upload.urlCancelDownload")}
+ </Button>
+ </div>
+ )}
- {state === "complete" && result && (
- <CompleteView
- t={t}
- result={result}
- partialWarning={partialWarning}
- diarizationWarning={diarizationWarning}
- folders={folders}
- selectedFolderId={selectedFolderId}
- handleFolderChange={handleFolderChange}
- noteId={noteId}
- onNoteCreated={onNoteCreated}
- reset={reset}
- />
- )}
+ {state === "transcribing" && (
+ <TranscribingView
+ t={t}
+ progress={progress}
+ getTranscribingLabel={getTranscribingLabel}
+ file={file}
+ chunkProgress={chunkProgress}
+ onCancel={cancelTranscription}
+ />
+ )}
- {state === "error" && error && (
- <ErrorView t={t} error={error} reset={reset} onRetry={handleRetry} />
- )}
- </div>
+ {state === "complete" && result && (
+ <CompleteView
+ t={t}
+ result={result}
+ partialWarning={partialWarning}
+ diarizationWarning={diarizationWarning}
+ folders={folders}
+ selectedFolderId={selectedFolderId}
+ handleFolderChange={handleFolderChange}
+ noteId={noteId}
+ onNoteCreated={onNoteCreated}
+ reset={reset}
+ />
+ )}
+
+ {state === "error" && error && (
+ <ErrorView t={t} error={error} reset={reset} onRetry={handleRetry} />
+ )}
{(state === "idle" || state === "selected") && (
- <div className="max-w-[320px] mx-auto mt-4">
+ <div className="mt-4">
<div className="flex items-center justify-between">
<div>
<p className="text-xs text-foreground/45 font-medium">
diff --git a/src/components/notes/overview/ContainerOverview.tsx b/src/components/notes/overview/ContainerOverview.tsx
index 74e53a94c..afe368073 100644
--- a/src/components/notes/overview/ContainerOverview.tsx
+++ b/src/components/notes/overview/ContainerOverview.tsx
@@ -12,6 +12,8 @@ import {
useSpaceRootCounts,
} from "../../../stores/noteStore";
import { useContainerChat } from "../../../hooks/useContainerChat";
+import { cn } from "../../lib/utils";
+import { PAGE_CONTENT_WIDTH_CLASS } from "../../ui/pageWidth";
import { ContainerIcon } from "./ContainerIcon";
import { OverviewExplainerBanner } from "./OverviewExplainerBanner";
import { OverviewAskSection } from "./OverviewAskSection";
@@ -101,7 +103,7 @@ export function ContainerOverview({
return (
<div className="flex-1 overflow-y-auto min-h-0">
- <div className="max-w-2xl mx-auto px-6 py-8 flex flex-col gap-5">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-8 flex flex-col gap-5")}>
<div className="flex flex-col items-center text-center gap-2 pt-4">
<div className="h-12 w-12 rounded-xl bg-foreground/4 dark:bg-white/5 border border-border/70 dark:border-white/10 flex items-center justify-center mb-1">
<ContainerIcon space={space} folder={folder} size={20} />
diff --git a/src/components/ui/pageWidth.ts b/src/components/ui/pageWidth.ts
new file mode 100644
index 000000000..2e213ccac
--- /dev/null
+++ b/src/components/ui/pageWidth.ts
@@ -0,0 +1,4 @@
+// Content column shared by the control panel pages. Apply it inside a scroll
+// container, never around one, so the wheel and scrollbar keep the full pane.
+// .rich-text-editor-content in index.css centers note text on the same width.
+export const PAGE_CONTENT_WIDTH_CLASS = "mx-auto w-full max-w-5xl";
diff --git a/src/index.css b/src/index.css
index 52a94aa55..7c2a42bce 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1674,7 +1674,10 @@ a:hover {
.rich-text-editor-content {
outline: none;
unicode-bidi: plaintext;
- padding: 0.75rem 1.25rem 5rem;
+ padding-block: 0.75rem 5rem;
+ /* Centers the text in the page column (PAGE_CONTENT_WIDTH_CLASS) with padding, not a
+ max-width, so the editable area spans the pane and a margin click places the caret. */
+ padding-inline: max(1.25rem, calc((100% - var(--container-5xl)) / 2 + 1.25rem));
font-size: 0.875rem;
line-height: 1.7;
color: var(--color-foreground);