Skip to content

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

fix(notes): scope side-panel layout flip to notes view with active note

Gabriel Steina13543d3d057
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index c405bf216..f300a848f 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -73,6 +73,8 @@ export default function ControlPanel() {
const isMeetingMode = useIsMeetingMode();
const isNarrowWindow = useIsNarrowWindow();
const activeNoteId = useActiveNoteId();
+ const isSidePanelLayout =
+ isMeetingMode || (isNarrowWindow && activeView === "personal-notes" && activeNoteId != null);
const recordingNoteId = useMeetingRecordingStore((s) => s.recordingNoteId);
const recordingFolderId = useMeetingRecordingStore((s) => s.recordingFolderId);
const [meetingRecordingRequest, setMeetingRecordingRequest] = useState<{
@@ -670,7 +672,7 @@ export default function ControlPanel() {
<div className="flex flex-1 overflow-hidden">
<div
className="shrink-0 overflow-hidden transition-[width] duration-300 ease-out"
- style={{ width: isMeetingMode ? 0 : undefined }}
+ style={{ width: isSidePanelLayout ? 0 : undefined }}
>
<ControlPanelSidebar
activeView={activeView}
@@ -717,7 +719,7 @@ export default function ControlPanel() {
className="flex items-center justify-between w-full h-10 shrink-0"
style={{ WebkitAppRegion: "drag" } as React.CSSProperties}
>
- {isNarrowWindow && (
+ {isSidePanelLayout && (
<div
className={platform === "darwin" ? "ml-[84px] mt-[16px]" : "ml-2"}
style={{ WebkitAppRegion: "no-drag" } as React.CSSProperties}
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsx
index 412f547a8..2a802e19e 100644
--- a/src/components/notes/PersonalNotesView.tsx
+++ b/src/components/notes/PersonalNotesView.tsx
@@ -66,6 +66,7 @@ import {
import {
useMeetingRecordingStore,
useIsMeetingMode,
+ useIsNarrowWindow,
startRecording as storeStartRecording,
stopRecording as storeStopRecording,
lockSpeaker,
@@ -100,9 +101,11 @@ export default function PersonalNotesView({
onMeetingRecordingRequestHandled,
}: PersonalNotesViewProps) {
const isMeetingMode = useIsMeetingMode();
+ const isNarrowWindow = useIsNarrowWindow();
const { t } = useTranslation();
const notes = useNotes();
const activeNoteId = useActiveNoteId();
+ const isSidePanelLayout = isMeetingMode || (isNarrowWindow && activeNoteId != null);
const activeFolderId = useActiveFolderId();
const [isSaving, setIsSaving] = useState(false);
const [localTitle, setLocalTitle] = useState("");
@@ -585,7 +588,7 @@ export default function PersonalNotesView({
<div className="flex h-full">
<div
className="shrink-0 overflow-hidden transition-[width] duration-300 ease-out"
- style={{ width: isMeetingMode ? 0 : "13rem" }}
+ style={{ width: isSidePanelLayout ? 0 : "13rem" }}
>
<div className="w-52 shrink-0 border-r border-border/15 dark:border-white/4 flex flex-col h-full">
<div className="px-2 pt-2 pb-1 shrink-0 space-y-0.5">