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
5 changes: 2 additions & 3 deletions frontend/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

export default function DashboardPage() {
const { user, loading, initialized } = useAuth();
const router = useRouter();

Check warning on line 60 in frontend/src/app/dashboard/page.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'loading' is assigned a value but never used

const [documents, setDocuments] = useState<DocInfo[]>([]);
const prevDocsRef = useRef<Record<string, string>>({});
Expand Down Expand Up @@ -86,7 +86,6 @@
}, []);

// Auth guard

useEffect(() => {
if (initialized && !user) router.replace("/login");
}, [user, initialized, router]);
Expand All @@ -104,7 +103,6 @@
}
}, [user]);


// Load documents
const loadDocuments = useCallback(async () => {
setDocumentsLoading(true);
Expand Down Expand Up @@ -187,7 +185,8 @@
);

return (
<div className="h-screen flex flex-col overflow-hidden">
// min-w-[375px] ensures the layout never squishes below iPhone SE width
<div className="h-screen flex flex-col overflow-hidden min-w-[375px]">
<Header
sidebarOpen={sidebarOpen}
onToggleSidebar={() => setSidebarOpen(!sidebarOpen)}
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,19 @@
.light .prose-chat .hljs-comment { color: oklch(0.5 0 0); }
.light .prose-chat strong { color: oklch(0.2 0 0); }
.light .prose-chat blockquote { color: oklch(0.4 0 0); }

html,
body {
min-width: 375px;
}

/*
* Enable iOS safe-area insets so fixed elements (FAB, modals) clear
* the home indicator bar on iPhone SE and similar devices.
* Requires viewport-fit=cover in the <meta name="viewport"> tag.
*/
@supports (padding: env(safe-area-inset-bottom)) {
:root {
--safe-area-bottom: env(safe-area-inset-bottom);
}
}
10 changes: 5 additions & 5 deletions frontend/src/components/chat/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
setMessages((prev) =>
prev.map((m) =>
m.id === assistantId
? { ...m, content: `Error: ${event.data}`, isStreaming: false }

Check warning on line 231 in frontend/src/components/chat/ChatPanel.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'e' is defined but never used
: m
)
);
Expand Down Expand Up @@ -275,12 +275,12 @@
if (!activeDoc) return;
setShowExportMenu(false);
const token = localStorage.getItem("token");
const url = `${API_BASE}/api/v1/chat/export/${activeDoc.id}?format=${format}&token=${token}`;

Check warning on line 278 in frontend/src/components/chat/ChatPanel.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'err' is defined but never used
// Trigger download via a temporary anchor
const a = document.createElement("a");
a.href = url;
a.download = "";
document.body.appendChild(a);

Check warning on line 283 in frontend/src/components/chat/ChatPanel.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'ev' is defined but never used
a.click();
document.body.removeChild(a);
};
Expand All @@ -291,7 +291,7 @@
const handleClickOutside = (e: MouseEvent) => {
if (exportMenuRef.current && !exportMenuRef.current.contains(e.target as Node)) {
setShowExportMenu(false);
}

Check warning on line 294 in frontend/src/components/chat/ChatPanel.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'err' is defined but never used
};
document.addEventListener("mousedown", handleClickOutside);
return () => document.removeEventListener("mousedown", handleClickOutside);
Expand Down Expand Up @@ -508,7 +508,7 @@
</div>

{/* ── Input Area ─────────────────────────────── */}
<div className="border-t border-border/50 p-4 bg-card/30 backdrop-blur-sm relative">
<div className="border-t border-border/50 p-4 pl-16 sm:pl-4 bg-card/30 backdrop-blur-sm relative">
<div className="max-w-3xl mx-auto relative">
{/* Status / Error Message Area */}
{(isRecording || speechError) && (
Expand Down Expand Up @@ -593,7 +593,7 @@
>
{isRecording ? <MicOff className="h-4 w-4" /> : <Mic className="h-4 w-4" />}
</Button>

Check warning on line 596 in frontend/src/components/chat/ChatPanel.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

React Hook useEffect has missing dependencies: 'handleClear', 'handleSend', 'setInput', 'setIsTyping', 'setStreaming', and 'toggleRecording'. Either include them or remove the dependency array
{/* NEW Keyboard Shortcuts Info Button */}
<Button
id="shortcut-help-btn"
Expand All @@ -615,7 +615,7 @@
size="icon"
onClick={handleSend}
disabled={!input.trim() || streaming}
className="h-[44px] w-[44px]"
className="h-10 w-10 sm:h-[44px] sm:w-[44px]"
aria-label={streaming ? "Sending message" : "Send message"}
>
{streaming ? (
Expand All @@ -633,7 +633,7 @@
variant="ghost"
size="icon"
onClick={() => setShowExportMenu((v) => !v)}
className="h-[44px] w-[44px] text-muted-foreground hover:text-primary"
className="h-10 w-10 sm:h-[44px] sm:w-[44px] text-muted-foreground hover:text-primary"
title={t("chat.exportTitle")}
aria-label={t("chat.exportTitle")}
aria-expanded={showExportMenu}
Expand All @@ -648,7 +648,7 @@
role="menu"
aria-label="Export chat"
onKeyDown={handleExportMenuKeyDown}
className="absolute bottom-full mb-2 right-0 min-w-[160px] rounded-lg border border-border bg-popover p-1 shadow-lg animate-in fade-in slide-in-from-bottom-2 z-50"
className="absolute bottom-full mb-2 right-0 min-w-[160px] max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-popover p-1 shadow-lg animate-in fade-in slide-in-from-bottom-2 z-50"
>
<button
id="export-md-btn"
Expand Down Expand Up @@ -688,7 +688,7 @@
variant="ghost"
size="icon"
onClick={handleClear}
className="h-[44px] w-[44px] text-muted-foreground hover:text-destructive"
className="h-10 w-10 sm:h-[44px] sm:w-[44px] text-muted-foreground hover:text-destructive"
aria-label="Clear chat history"
>
<Trash2 className="w-4 h-4" />
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/components/chat/ChatSessionSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,16 @@ export default function ChatSessionSidebar() {
</Button>
</div>

{/*
FAB β€” mobile only (md:hidden).
z-20: sits below the Header (z-50) and its backdrop (z-40) so
it is not tappable when the document navigation sheet is open.
bottom uses safe-area-inset-bottom so the button clears the iOS
home indicator on iPhone SE and other small-screen devices.
*/}
<Button
onClick={() => setMobileOpen(true)}
className="fixed bottom-4 left-4 z-30 h-11 w-11 rounded-full shadow-lg md:hidden"
className="fixed bottom-[calc(1rem+env(safe-area-inset-bottom,0px))] left-4 z-20 h-11 w-11 rounded-full shadow-lg md:hidden"
size="icon"
aria-label="Open chat sessions"
aria-controls="mobile-chat-sessions"
Expand All @@ -263,7 +270,7 @@ export default function ChatSessionSidebar() {
)}
aria-label="Chat sessions"
aria-hidden={!mobileOpen}
inert={!mobileOpen ? true : undefined}
{...(!mobileOpen ? { inert: true } : {})}
>
{sessionsContent(true)}
</aside>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
DropdownMenuSub,

Check warning on line 16 in frontend/src/components/layout/Header.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'DropdownMenuSub' is defined but never used
DropdownMenuSubTrigger,

Check warning on line 17 in frontend/src/components/layout/Header.tsx

View workflow job for this annotation

GitHub Actions / βš›οΈ Frontend β€” TypeScript & Build

'DropdownMenuSubTrigger' is defined but never used
DropdownMenuSubContent,
DropdownMenuPortal,
DropdownMenuRadioGroup,
Expand Down Expand Up @@ -253,7 +253,7 @@
].join(" ")}
aria-label="Mobile navigation"
aria-hidden={!sheetOpen}
inert={!sheetOpen ? true : undefined}
{...(!sheetOpen ? { inert: true } : {})}
>
<div className="h-14 flex items-center justify-between px-4 border-b border-sidebar-border flex-shrink-0">
{/* MOBILE LOGO β€” clicking navigates to dashboard and closes the sheet */}
Expand Down
Loading