Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { Button } from "@hypr/ui/components/ui/button";
import { SparklesIcon } from "lucide-react";
import { useState } from "react";

const TEMPLATES = [
"Brainstorming",
"1-on-1",
"User Interview",
"Daily Standup",
"Project Plan",
"Meeting Notes",
"Action Items",
"Decision Log",
"Key Insights",
"Brainstorming",
"1-on-1",
];

export function FloatingRegenerateButton() {
const [showTemplates, setShowTemplates] = useState(false);

return (
<div className="absolute bottom-6 left-1/2 -translate-x-1/2">
{/* White card - slides up from behind */}
<div
className={`absolute left-1/2 -translate-x-1/2 bg-white rounded-lg shadow-lg border px-6 pb-14 transition-all duration-300 overflow-visible ${
showTemplates
? "opacity-100 bottom-[-14px] pt-2 w-[270px] pointer-events-auto"
: "opacity-0 bottom-0 pt-0 w-0 pointer-events-none"
}`}
style={{ zIndex: 0 }}
onMouseEnter={() => setShowTemplates(true)}
onMouseLeave={() => setShowTemplates(false)}
>
<div className={`transition-opacity duration-200 ${showTemplates ? "opacity-100" : "opacity-0"}`}>
<div className="flex flex-col gap-3 max-h-64 overflow-y-auto">
{TEMPLATES.map((template) => (
<button
key={template}
className="text-center py-2 hover:bg-neutral-100 rounded transition-colors text-base"
onClick={() => {
console.log("Template clicked:", template);
setShowTemplates(false);
}}
>
{template}
</button>
))}
</div>

<div className="flex items-center gap-3 text-neutral-400 text-sm mt-3">
<div className="flex-1 h-px bg-neutral-300"></div>
<span>or</span>
<div className="flex-1 h-px bg-neutral-300"></div>
</div>
</div>
</div>

{/* Black button - always on top */}
<Button
className="relative bg-black hover:bg-neutral-800 text-white px-4 py-2 rounded-lg shadow-lg"
style={{ zIndex: 10 }}
onMouseEnter={() => setShowTemplates(true)}
onMouseLeave={() => setShowTemplates(false)}
onClick={() => {
console.log("regenerate clicked");
}}
>
<SparklesIcon className="w-4 h-4 mr-2" />
Regenerate
</Button>
</div>
);
}
28 changes: 16 additions & 12 deletions apps/desktop2/src/components/main/body/sessions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import NoteEditor from "@hypr/tiptap/editor";
import * as persisted from "../../../../store/tinybase/persisted";
import { rowIdfromTab, type Tab } from "../../../../store/zustand/tabs";
import { type TabItem, TabItemBase } from "../shared";
import { FloatingRegenerateButton } from "./floating-regenerate-button";
import { InnerHeader } from "./inner-header";
import { OuterHeader } from "./outer-header";
import { AudioPlayer } from "./player";
Expand Down Expand Up @@ -51,7 +52,7 @@ export function TabContentNote({ tab }: { tab: Tab }) {
);

return (
<div className="flex flex-col px-4 py-1 rounded-lg border h-full">
<div className="flex flex-col px-4 py-1 rounded-lg border h-full overflow-hidden relative">
<div className="py-1">
<OuterHeader
sessionRow={sessionRow}
Expand All @@ -74,18 +75,21 @@ export function TabContentNote({ tab }: { tab: Tab }) {
shouldShowEnhancedTab={false}
/>
<div className="py-1"></div>
<NoteEditor
key={editorKey}
initialContent={sessionRow.raw_md ?? ""}
handleChange={(e) => handleEditRawMd(e)}
mentionConfig={{
trigger: "@",
handleSearch: async () => {
return [];
},
}}
/>
<div className="flex-1 overflow-auto">
<NoteEditor
key={editorKey}
initialContent={sessionRow.raw_md ?? ""}
handleChange={(e) => handleEditRawMd(e)}
mentionConfig={{
trigger: "@",
handleSearch: async () => {
return [];
},
}}
/>
</div>
{showAudioPlayer && <AudioPlayer url="https://www2.cs.uic.edu/~i101/SoundFiles/gettysburg10.wav" />}
<FloatingRegenerateButton />
</div>
);
}
Loading