authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-12 15:43:05-08:00
committergravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-12 15:43:05-08:00
log86e7bd000c2b13fb1f3fbf946d61a6ed16b6fa87
tree89159e493276cb139aec577bd412f847901c2522
parent1cad53dae43aa9d719e190f88f2a3e1ce549942a

Align Electron drag headers and sidebar branding spacing

- Update `ChatView` so Electron uses a fixed 52px drag titlebar, including empty-thread state. - Make `DiffPanel` header use the same Electron drag-region sizing. - Consolidate Sidebar drag-region into branding row and remove separate spacer div. - Co-authored-by: codex <codex@users.noreply.github.com>

3 files changed, 10 insertions(+), 6 deletions(-)

apps/web/src/components/ChatView.tsx+6-2
......@@ -863,7 +863,11 @@ export default function ChatView() {
863863 if (!activeThread) {
864864 return (
865865 <div className="flex min-h-0 flex-1 flex-col bg-background text-muted-foreground/40">
866 {isElectron && <div className="drag-region h-[52px] shrink-0" />}
866 {isElectron && (
867 <div className="drag-region flex h-[52px] shrink-0 items-center border-b border-border px-5">
868 <span className="text-xs text-muted-foreground/50">No active thread</span>
869 </div>
870 )}
867871 <div className="flex flex-1 items-center justify-center">
868872 <div className="text-center">
869873 <p className="text-sm">Select a thread or create a new one to get started.</p>
......@@ -877,7 +881,7 @@ export default function ChatView() {
877881 <div className="flex min-h-0 flex-1 flex-col bg-background">
878882 {/* Top bar */}
879883 <header
880 className={`flex items-center justify-between border-b border-border px-5 pb-3 ${isElectron ? "drag-region pt-[28px]" : "pt-3"}`}
884 className={`flex items-center justify-between border-b border-border px-5 ${isElectron ? "drag-region h-[52px]" : "py-3"}`}
881885 >
882886 <div className="flex items-center gap-3">
883887 <h2 className="text-sm font-medium text-foreground">{activeThread.title}</h2>
apps/web/src/components/DiffPanel.tsx+1-1
......@@ -8,7 +8,7 @@ export default function DiffPanel() {
88 <aside className="flex h-full w-[400px] shrink-0 flex-col border-l border-border bg-card">
99 {/* Header */}
1010 <div
11 className={`flex items-center justify-between border-b border-border px-4 pb-3 ${isElectron ? "drag-region pt-[28px]" : "pt-3"}`}
11 className={`flex items-center justify-between border-b border-border px-4 ${isElectron ? "drag-region h-[52px]" : "py-3"}`}
1212 >
1313 <h3 className="text-xs font-medium text-foreground">Uncommitted changes</h3>
1414 <button
apps/web/src/components/Sidebar.tsx+3-3
......@@ -237,10 +237,10 @@ export default function Sidebar() {
237237
238238 return (
239239 <aside className="sidebar flex h-full w-[260px] shrink-0 flex-col border-r border-border bg-card">
240 {/* Drag region / traffic light space (Electron only) */}
241 {isElectron && <div className="drag-region h-[52px] shrink-0" />}
242240 {/* Branding */}
243 <div className={`flex items-center gap-2.5 px-4 pb-4 ${isElectron ? "" : "pt-4"}`}>
241 <div
242 className={`flex items-center gap-2.5 px-4 ${isElectron ? "drag-region h-[52px] pl-[76px]" : "py-4"}`}
243 >
244244 <span className="flex-1 text-sm font-semibold tracking-tight text-foreground">
245245 T3 <span className="font-normal text-muted-foreground">Code</span>
246246 </span>