Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(meeting-notes): make the copy action visible inside the meeting note (#6070)

Louis Beaumontd17b421a621d
diff --git a/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.test.tsx b/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.test.tsx
index 1eed9831d..7c0072286 100644
--- a/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.test.tsx
+++ b/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.test.tsx
@@ -75,6 +75,55 @@ describe("meeting workspace tabs", () => {
expect(transcript).toHaveFocus();
expect(screen.getByLabelText("summary working")).toBeVisible();
});
+
+ // The note-wide copy action shares the tab rule so it is visible from every
+ // tab, but it must not become a fourth tab: arrow keys still cycle three
+ // tabs, and screen readers must not announce it as one.
+ it("renders a trailing action outside the tablist without adding a tab", () => {
+ const onValueChange = vi.fn();
+ render(
+ <MeetingWorkspaceTabs
+ value="notes"
+ onValueChange={onValueChange}
+ trailing={
+ <button type="button" aria-label="copy meeting and transcript">
+ copy
+ </button>
+ }
+ />,
+ );
+
+ const copy = screen.getByRole("button", {
+ name: "copy meeting and transcript",
+ });
+ expect(copy).toBeVisible();
+ expect(screen.getAllByRole("tab")).toHaveLength(3);
+ expect(copy.closest('[role="tablist"]')).toBeNull();
+
+ // End must land on the last real tab, not the trailing action.
+ fireEvent.keyDown(screen.getByRole("tab", { name: "notes" }), {
+ key: "End",
+ });
+ expect(onValueChange).toHaveBeenCalledWith("summary");
+ expect(screen.getByRole("tab", { name: "summary" })).toHaveFocus();
+ });
+
+ // Whichever branch renders, the tabs sit on exactly one bottom rule.
+ it("keeps a single bottom rule with and without a trailing action", () => {
+ const { container: plain } = render(
+ <MeetingWorkspaceTabs value="notes" onValueChange={vi.fn()} />,
+ );
+ expect(plain.querySelectorAll(".border-b")).toHaveLength(1);
+
+ const { container: withTrailing } = render(
+ <MeetingWorkspaceTabs
+ value="notes"
+ onValueChange={vi.fn()}
+ trailing={<button type="button">copy</button>}
+ />,
+ );
+ expect(withTrailing.querySelectorAll(".border-b")).toHaveLength(1);
+ });
});
describe("meeting summary surface", () => {
diff --git a/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.tsx b/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.tsx
index 0f88e10e5..a7e7f21ff 100644
--- a/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.tsx
+++ b/apps/screenpipe-app-tauri/components/meeting-notes/meeting-workspace.tsx
@@ -48,10 +48,15 @@ export function MeetingWorkspaceTabs({
value,
onValueChange,
summaryState,
+ trailing,
}: {
value: MeetingWorkspaceTab;
onValueChange: (value: MeetingWorkspaceTab) => void;
summaryState?: "working" | "ready" | "attention" | null;
+ // Rendered on the same rule as the tabs but outside the tablist, so a
+ // note-wide action stays reachable from every tab without becoming a
+ // fourth pseudo-tab for arrow-key navigation.
+ trailing?: React.ReactNode;
}) {
const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
@@ -62,11 +67,14 @@ export function MeetingWorkspaceTabs({
tabRefs.current[normalized]?.focus();
};
- return (
+ const tablist = (
<div
role="tablist"
aria-label="meeting workspace"
- className="flex min-w-0 items-stretch overflow-x-auto border-b border-border [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
+ className={cn(
+ "flex min-w-0 items-stretch overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
+ !trailing && "border-b border-border",
+ )}
>
{MEETING_TABS.map((tab, index) => {
const selected = value === tab.value;
@@ -122,6 +130,15 @@ export function MeetingWorkspaceTabs({
})}
</div>
);
+
+ if (!trailing) return tablist;
+
+ return (
+ <div className="flex min-w-0 items-stretch border-b border-border">
+ {tablist}
+ <div className="ml-auto flex shrink-0 items-stretch">{trailing}</div>
+ </div>
+ );
}
export function extractMeetingSummary(markdown: string): string | null {
diff --git a/apps/screenpipe-app-tauri/components/meeting-notes/note-view.tsx b/apps/screenpipe-app-tauri/components/meeting-notes/note-view.tsx
index 90541a5a0..031e26b4e 100644
--- a/apps/screenpipe-app-tauri/components/meeting-notes/note-view.tsx
+++ b/apps/screenpipe-app-tauri/components/meeting-notes/note-view.tsx
@@ -1479,7 +1479,7 @@ export function NoteView({
meetings
</Button>
- <div className="group/title mt-1 flex min-w-0 items-center gap-2">
+ <div className="mt-1 flex min-w-0 items-center gap-2">
<input
value={title}
onChange={(event) => setTitle(event.target.value)}
@@ -1488,29 +1488,6 @@ export function NoteView({
aria-label="meeting title"
className="min-w-0 flex-1 bg-transparent text-xl font-medium leading-tight tracking-tight text-foreground placeholder:text-muted-foreground/40 focus:outline-none sm:text-2xl"
/>
- {/* Revealed on intent. Copying is occasional, and a permanent
- bordered cluster competed with the title for attention. */}
- <Button
- variant="ghost"
- size="sm"
- onClick={handleCopy}
- disabled={copying}
- title="copy meeting + transcript to clipboard"
- aria-label="copy meeting and transcript"
- className={cn(
- MEETING_QUIET_CONTROL_CLASS,
- "h-8 w-8 shrink-0 p-0 opacity-0 focus-visible:opacity-100 group-focus-within/title:opacity-100 group-hover/title:opacity-100",
- copied && "opacity-100",
- )}
- >
- {copying ? (
- <Loader2 className="h-3.5 w-3.5 animate-spin" />
- ) : copied ? (
- <Check className="h-3.5 w-3.5" />
- ) : (
- <Copy className="h-3.5 w-3.5" />
- )}
- </Button>
</div>
<div className="mt-3 flex min-w-0 items-center gap-2 overflow-x-auto pb-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
@@ -1553,6 +1530,33 @@ export function NoteView({
);
}}
summaryState={summaryTabState}
+ // Copying the note is what people do after reading it, so the
+ // action lives on the tab rule where it is always visible and
+ // applies to the whole meeting rather than the active tab. It was
+ // previously hidden until the title row was hovered, which made it
+ // undiscoverable and collided with the shortcut overlay.
+ trailing={
+ <button
+ type="button"
+ onClick={handleCopy}
+ disabled={copying}
+ data-testid="meeting-copy-button"
+ title="copy meeting + transcript to clipboard"
+ aria-label="copy meeting and transcript"
+ className="flex h-11 shrink-0 items-center gap-2 border-l border-border px-4 font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:z-10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-foreground disabled:text-muted-foreground/50 disabled:hover:bg-transparent"
+ >
+ {copying ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : copied ? (
+ <Check className="h-3.5 w-3.5" />
+ ) : (
+ <Copy className="h-3.5 w-3.5" />
+ )}
+ <span className="hidden sm:inline">
+ {copied ? "copied" : "copy"}
+ </span>
+ </button>
+ }
/>
</div>
</header>