Skip to content

Commit cfbc653

Browse files
fix(desktop): show live transcript across tabs
Mount and frame the active meeting live transcript in the main shell for non-active tabs, suppress duplicate per-session transcript controls, and keep batch progress visible for other sessions.
1 parent 0b47daf commit cfbc653

13 files changed

Lines changed: 719 additions & 26 deletions

File tree

apps/desktop/src/main/body.tsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { type MouseEvent, type PointerEvent, useCallback, useRef } from "react";
1010

1111
import { cn } from "@hypr/utils";
1212

13+
import { resolveMainSurfaceChrome } from "./main-surface-chrome";
1314
import { ClassicMainSidebar } from "./shell-sidebar";
1415
import { ClassicMainTabContent } from "./tab-content";
1516
import { TopMeetingTimeline } from "./top-meeting-timeline";
@@ -22,6 +23,7 @@ import {
2223
import { useClassicMainTabsShortcuts } from "./useTabsShortcuts";
2324

2425
import { useShell } from "~/contexts/shell";
26+
import { GlobalLiveTranscriptAccessory } from "~/session/components/bottom-accessory/global-live";
2527
import { useConfigValue } from "~/shared/config";
2628
import {
2729
hasCustomSidebarTab,
@@ -66,6 +68,14 @@ export function ClassicMainBody() {
6668
const showLeftSurfaceChromeBack = hasLeftSurfaceCustomSidebar;
6769
const enableMainAreaTopDrag =
6870
showSidebarTimelineChrome || hasLeftSurfaceCustomSidebar;
71+
const mainSurfaceChrome = resolveMainSurfaceChrome({
72+
hasLeftSurfaceCustomSidebar,
73+
isChangelog,
74+
leftSidebarExpanded: leftsidebar.expanded,
75+
showSidebarTimeline,
76+
showSidebarTimelineChrome,
77+
showTopTimeline,
78+
});
6979
const mainAreaTopDrag = useMainAreaTopWindowDrag(enableMainAreaTopDrag);
7080
const update = useDesktopUpdateControl();
7181

@@ -148,12 +158,17 @@ export function ClassicMainBody() {
148158
onPointerMove={mainAreaTopDrag.onPointerMove}
149159
onPointerUp={mainAreaTopDrag.onPointerEnd}
150160
>
151-
{currentTab ? (
152-
<ClassicMainTabContent
153-
key={uniqueIdfromTab(currentTab)}
154-
tab={currentTab as Tab}
155-
/>
156-
) : null}
161+
<GlobalLiveTranscriptAccessory
162+
currentTab={currentTab}
163+
surfaceChrome={mainSurfaceChrome}
164+
>
165+
{currentTab ? (
166+
<ClassicMainTabContent
167+
key={uniqueIdfromTab(currentTab)}
168+
tab={currentTab as Tab}
169+
/>
170+
) : null}
171+
</GlobalLiveTranscriptAccessory>
157172
</div>
158173
</div>
159174
</div>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { type MainSurfaceChrome } from "~/shared/main";
2+
3+
export function resolveMainSurfaceChrome({
4+
hasLeftSurfaceCustomSidebar,
5+
isChangelog,
6+
leftSidebarExpanded,
7+
showSidebarTimeline,
8+
showSidebarTimelineChrome,
9+
showTopTimeline,
10+
}: {
11+
hasLeftSurfaceCustomSidebar: boolean;
12+
isChangelog: boolean;
13+
leftSidebarExpanded: boolean;
14+
showSidebarTimeline: boolean;
15+
showSidebarTimelineChrome: boolean;
16+
showTopTimeline: boolean;
17+
}): MainSurfaceChrome {
18+
if (showSidebarTimelineChrome && !leftSidebarExpanded) {
19+
return "top-borderless";
20+
}
21+
22+
if (isChangelog && !showSidebarTimeline) {
23+
return "top";
24+
}
25+
26+
if (showSidebarTimeline || hasLeftSurfaceCustomSidebar) {
27+
return "left";
28+
}
29+
30+
if (showTopTimeline) {
31+
return "top";
32+
}
33+
34+
return "default";
35+
}

apps/desktop/src/main/shell-frame.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import { ClassicMainBody } from "./body";
2+
import { resolveMainSurfaceChrome } from "./main-surface-chrome";
23

34
import { useShell } from "~/contexts/shell";
45
import { useConfigValue } from "~/shared/config";
5-
import {
6-
type MainSurfaceChrome,
7-
MainShellBodyFrame,
8-
MainShellScaffold,
9-
} from "~/shared/main";
6+
import { MainShellBodyFrame, MainShellScaffold } from "~/shared/main";
107
import { ToastArea } from "~/sidebar/toast";
118
import {
129
hasCustomSidebarTab,
@@ -27,23 +24,19 @@ export function ClassicMainShellFrame() {
2724
const showSidebarTimelineChrome =
2825
sidebarTimelineEnabled && !hasCustomSidebar && !isOnboarding;
2926
const showSidebarTimeline = showSidebarTimelineChrome && leftsidebar.expanded;
30-
const showCollapsedSidebarTimelineChrome =
31-
showSidebarTimelineChrome && !leftsidebar.expanded;
3227
const showTopTimeline =
3328
leftsidebar.expanded &&
3429
!showSidebarTimeline &&
3530
!hasCustomSidebar &&
3631
!isOnboarding;
37-
const mainSurfaceChrome: MainSurfaceChrome =
38-
showCollapsedSidebarTimelineChrome
39-
? "top-borderless"
40-
: isChangelog && !showSidebarTimeline
41-
? "top"
42-
: showSidebarTimeline || hasLeftSurfaceCustomSidebar
43-
? "left"
44-
: showTopTimeline
45-
? "top"
46-
: "default";
32+
const mainSurfaceChrome = resolveMainSurfaceChrome({
33+
hasLeftSurfaceCustomSidebar,
34+
isChangelog,
35+
leftSidebarExpanded: leftsidebar.expanded,
36+
showSidebarTimeline,
37+
showSidebarTimelineChrome,
38+
showTopTimeline,
39+
});
4740

4841
return (
4942
<MainShellScaffold

0 commit comments

Comments
 (0)