Skip to content

Commit 0cf5a91

Browse files
committed
fix(web): reconnect the composer seam for remote non-Git projects
When the context strip holds only the static environment label, its locked variants had no height, so the strip rendered 6px shorter than the fixed 2rem the composer's glass seam assumes and the shell's rounded corners stepped out past the strip. Give the three locked labels the xs control height (h-7 sm:h-6) they already borrow padding from, so the strip keeps a fixed height whatever it contains.
1 parent 5661c61 commit 0cf5a91

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎apps/web/src/components/BranchToolbar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const MobileRunContextSelector = memo(function MobileRunContextSelector({
126126

127127
if (isLocked) {
128128
return (
129-
<span className="inline-flex min-w-0 max-w-[48%] flex-1 items-center justify-start gap-1 rounded-md border border-transparent px-[calc(--spacing(2)-1px)] text-sm font-medium text-muted-foreground/70 md:hidden">
129+
<span className="inline-flex h-7 min-w-0 max-w-[48%] flex-1 items-center justify-start gap-1 rounded-md border border-transparent px-[calc(--spacing(2)-1px)] text-sm font-medium text-muted-foreground/70 sm:h-6 md:hidden">
130130
{triggerContent}
131131
</span>
132132
);

‎apps/web/src/components/BranchToolbarEnvModeSelector.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
5050

5151
if (envLocked) {
5252
return (
53-
<span className="inline-flex shrink-0 items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
53+
<span className="inline-flex h-7 shrink-0 items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:h-6 sm:text-xs">
5454
{activeWorktreePath ? (
5555
<>
5656
<FolderGitIcon className="size-3" />

‎apps/web/src/components/BranchToolbarEnvironmentSelector.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,14 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
4141
[availableEnvironments],
4242
);
4343

44+
// The static label carries the xs control's height (h-7 sm:h-6) as well as
45+
// its padding: the composer context strip has no min-height of its own, and
46+
// the glass seam joining it to the composer assumes a fixed strip height, so
47+
// a shorter label would drag the seam out of line whenever this label is the
48+
// only thing in the strip.
4449
if (envLocked || onEnvironmentChange === undefined) {
4550
return (
46-
<span className="inline-flex min-w-0 max-w-full items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
51+
<span className="inline-flex h-7 min-w-0 max-w-full items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:h-6 sm:text-xs">
4752
{activeEnvironment?.isPrimary ? (
4853
<MonitorIcon className="size-3 shrink-0" />
4954
) : (

0 commit comments

Comments
 (0)