mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
feat(coach): move conversations into a collapsible right panel
The Coach page gets a conversations panel on the right of the thread. From 1280 px it docks beside the thread and slides open and shut; the reading column keeps its width either way and only its centring moves. It is open on a first visit and remembers the last choice per device. Below 1280 px it is a sheet from the right. The toggle sits at the trailing edge of the top bar, through a small page-owned slot the top bar now renders. The panel lists every conversation grouped by recency, with a row menu to rename in place (Enter saves, Escape cancels without closing the panel) and delete with the existing undo toast. The undo window now survives the sheet closing. New chat is the round button at the panel's bottom right, and picking or starting a conversation keeps ?c= in the URL. The gear in the panel header opens quick settings: a popover from md up, a bottom sheet on a phone. It switches the answering provider (chain reordered through the existing route), the model and reasoning level where the person owns them, and shows what the Coach can see. Keys, the Codex sign-in and the fallback chain stay in Settings > AI. The drawer's gear opens the same overlay. The composer's + menu is gone. Settings > Coach links to /coach?settings=data, which opens the overlay on what the Coach can see instead of a rail that no longer exists.
This commit is contained in:
1 parent
1cb50ed21d
commit
12153fe143
33 files changed
+2074
-428
No files matched your search
@@ -88,6 +88,13 @@ export interface ResponsiveSheetProps {
|
||||
* default, so the width now resolves from this single source.
|
||||
*/
|
||||
contentWidth?: "md" | "lg" | "2xl" | "3xl" | "4xl" | "6xl";
|
||||
/**
|
||||
* Where focus goes when the surface closes. Radix returns it to a
|
||||
* `Dialog.Trigger`, and this primitive has none, so a caller whose opener
|
||||
* should get focus back (a gear, a menu button) hands it over here: call
|
||||
* `event.preventDefault()` and focus the opener.
|
||||
*/
|
||||
onCloseAutoFocus?: (event: Event) => void;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
@@ -136,6 +143,7 @@ export function ResponsiveSheet({
|
||||
bodyClassName,
|
||||
showCloseButton = true,
|
||||
contentWidth = "md",
|
||||
onCloseAutoFocus,
|
||||
children,
|
||||
}: ResponsiveSheetProps) {
|
||||
const isMobile = useIsMobile();
|
||||
@@ -144,6 +152,7 @@ export function ResponsiveSheet({
|
||||
return (
|
||||
<Sheet open={open} onOpenChange={onOpenChange}>
|
||||
<SheetContent
|
||||
onCloseAutoFocus={onCloseAutoFocus}
|
||||
side="bottom"
|
||||
showCloseButton={showCloseButton}
|
||||
data-slot="responsive-sheet-content"
|
||||
@@ -246,6 +255,7 @@ export function ResponsiveSheet({
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent
|
||||
onCloseAutoFocus={onCloseAutoFocus}
|
||||
showCloseButton={showCloseButton}
|
||||
data-slot="responsive-sheet-content"
|
||||
data-variant="dialog"
|
||||
|
||||
Reference in new issue
Block a user