diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 8272223ae34778164172141721365b471c91b4cf..ab3248639b0f76c3bf66ddd554b9e550d5e66383 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1698,7 +1698,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
-
+ const headerRow = ( + <> +
+ {canScrollTurnStripLeft && ( +
+ )} + {canScrollTurnStripRight && ( +
+ )} + +
-
- {canScrollTurnStripLeft && ( -
- )} - {canScrollTurnStripRight && ( -
- )} - -
+ {orderedTurnDiffSummaries.map((summary) => ( - {orderedTurnDiffSummaries.map((summary) => ( - - ))} -
-
- { - const next = value[0]; - if (next === "stacked" || next === "split") { - setDiffRenderMode(next); - } - }} - > - - - - - - - + ))}
+ { + const next = value[0]; + if (next === "stacked" || next === "split") { + setDiffRenderMode(next); + } + }} + > + + + + + + + + + ); + const headerRowClassName = cn( + "flex items-center justify-between gap-2 px-4", + shouldUseDragRegion ? "drag-region h-[52px] border-b border-border" : "h-12", + ); + + return ( +
+ {shouldUseDragRegion ? ( +
{headerRow}
+ ) : ( +
+
{headerRow}
+
+ )} {!activeThread ? (
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 566b386914b62322f07fca8acc2b1e36a46e78a0..7bed62ff2096ab81c7f220200d476503f23a0979 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -467,40 +467,56 @@ export default function Sidebar() { }; }, [handleNewThread, keybindings, routeThreadId, state.projects, state.threads]); + const onCreateThreadClick = () => { + if (state.projects.length === 0) { + setAddingProject(true); + return; + } + const firstProject = state.projects[0]; + if (firstProject) void handleNewThread(firstProject.id); + }; + + const wordmark = ( +
+ +
+ + + Code + + + {APP_STAGE_LABEL} + +
+
+ ); + + const newThreadButton = ( + + ); + return ( <> - -
- -
- - - Code - - - {APP_STAGE_LABEL} - -
-
- - -
+ {isElectron ? ( + <> + + {wordmark} + +
{newThreadButton}
+ + ) : ( + + {wordmark} + {newThreadButton} + + )} diff --git a/apps/web/src/routes/_chat.$threadId.tsx b/apps/web/src/routes/_chat.$threadId.tsx index 1cebff4b3b877af263b9c5664068f4631327a241..5c23d14f17efe3f61634319e0fbc081ba535f034 100644 --- a/apps/web/src/routes/_chat.$threadId.tsx +++ b/apps/web/src/routes/_chat.$threadId.tsx @@ -12,7 +12,7 @@ const DiffPanel = lazy(() => import("../components/DiffPanel")); const DIFF_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 1180px)"; const DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY = "chat_diff_sidebar_width"; const DIFF_INLINE_DEFAULT_WIDTH = "clamp(28rem,48vw,44rem)"; -const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 28 * 16; +const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 26 * 16; const DiffPanelSheet = (props: { children: ReactNode;