Files
t3code/apps/web/src/rightPanelLayout.ts
T
Julius Marmingeandcodex abd5cc5ff8 Map thread panel into title bar and sidebar
- Add thread-panel presentation logic for inline vs popover layouts
- Move thread details controls into the chat header/sidebar flow
- Add shared wait-for-atom helper and workspace display name parsing

Co-authored-by: codex <[email protected]>
2026-08-07 13:22:22 +02:00

18 lines
863 B
TypeScript

export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 980px)";
export const THREAD_PANEL_INLINE_MIN_WIDTH = 960;
export const RIGHT_PANEL_SHEET_CLASS_NAME =
"w-[min(42vw,28rem)] min-w-80 max-w-[28rem] p-0 max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]";
export type ThreadPanelPresentation = "inline" | "popover";
export function resolveThreadPanelPresentation(
workspaceWidth: number | null,
occupiedRightPanelWidth: number,
rightPanelMaximized: boolean,
): ThreadPanelPresentation {
if (workspaceWidth === null) return "inline";
const chatPaneWidth = rightPanelMaximized ? 0 : workspaceWidth - occupiedRightPanelWidth;
return chatPaneWidth < THREAD_PANEL_INLINE_MIN_WIDTH ? "popover" : "inline";
}