Repository navigation
fix(desktop): invert window-drag regions so chrome stays clickable, add drag strips to uncovered screens #5911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,13 +51,18 @@ export function TopBar() { | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||
| className="drag gap-2 h-12 w-full flex items-center justify-between bg-muted/45 relative dark:bg-muted/35" | ||||||||||||||||||||||||
| // Window-drag regions live on the empty leaf elements (traffic-light | ||||||||||||||||||||||||
| // spacer + title filler), never on this container: `no-drag` carve-outs | ||||||||||||||||||||||||
| // under a `drag` ancestor are lost inside zoomed/masked/scrollable | ||||||||||||||||||||||||
| // wrappers, which makes the whole bar swallow clicks. | ||||||||||||||||||||||||
| className="gap-2 h-12 w-full flex items-center justify-between bg-muted/45 relative dark:bg-muted/35" | ||||||||||||||||||||||||
| style={barStyle} | ||||||||||||||||||||||||
| > | ||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||
| className="flex items-center h-full" | ||||||||||||||||||||||||
| style={{ paddingLeft: trafficLightInset }} | ||||||||||||||||||||||||
| > | ||||||||||||||||||||||||
| <div className="flex items-center h-full"> | ||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||
| className="drag h-full shrink-0" | ||||||||||||||||||||||||
| style={{ width: trafficLightInset }} | ||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||
| {!sidebarHostsChrome && ( | ||||||||||||||||||||||||
| <ZoomStable enabled={isMac} className="flex items-center gap-1.5"> | ||||||||||||||||||||||||
| <SidebarToggle /> | ||||||||||||||||||||||||
|
|
@@ -67,15 +72,15 @@ export function TopBar() { | |||||||||||||||||||||||
| )} | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| <div className="flex min-w-0 flex-1 items-center justify-start"> | ||||||||||||||||||||||||
| <div className="drag flex h-full min-w-0 flex-1 items-center justify-start"> | ||||||||||||||||||||||||
| {isV2WorkspaceRoute && v2WorkspaceId && ( | ||||||||||||||||||||||||
| <V2WorkspaceTitle workspaceId={v2WorkspaceId} /> | ||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
|
Comment on lines
+75
to
79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Keep the v2 title outside the drag region.
Proposed fix- <div className="drag flex h-full min-w-0 flex-1 items-center justify-start">
+ <div className="flex h-full min-w-0 flex-1 items-center justify-start">
{isV2WorkspaceRoute && v2WorkspaceId && (
<V2WorkspaceTitle workspaceId={v2WorkspaceId} />
)}
+ <div className="drag h-full min-w-0 flex-1" />
</div>As per coding guidelines, apply 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| <div className="flex items-center gap-3 h-full pr-4 shrink-0"> | ||||||||||||||||||||||||
| {!isOnline && ( | ||||||||||||||||||||||||
| <div className="no-drag flex items-center gap-1.5 text-xs text-muted-foreground bg-muted px-2 py-1 rounded"> | ||||||||||||||||||||||||
| <div className="flex items-center gap-1.5 text-xs text-muted-foreground bg-muted px-2 py-1 rounded"> | ||||||||||||||||||||||||
| <HiOutlineWifi className="size-3.5" /> | ||||||||||||||||||||||||
| <span>Offline</span> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type { ReactNode } from "react"; | ||
|
|
||
| /** | ||
| * Wraps full-pane workspace state screens (not-found, creating, host | ||
| * incompatible, missing worktree, loading). On the v2 workspace route with an | ||
| * expanded sidebar the TopBar is hidden and the pane tab bar — normally the | ||
| * window-drag region — isn't rendered either, so these screens must provide | ||
| * their own drag strip across the top. Overlaid (not in flow) so the centered | ||
| * state content keeps its layout; the strip only covers empty background. | ||
| */ | ||
| export function StateScreenShell({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <div className="relative h-full w-full"> | ||
| <div className="drag absolute inset-x-0 top-0 h-12" /> | ||
| {children} | ||
| </div> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { StateScreenShell } from "./StateScreenShell"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Document agent responsibilities and capabilities.
This adds interaction guidance, but does not identify agent responsibilities or capabilities as required for desktop
AGENTS.md. As per coding guidelines,apps/desktop/**/AGENTS.mdmust “Document agent responsibilities, capabilities, and interaction patterns in AGENTS.md”.🤖 Prompt for AI Agents
Source: Coding guidelines