Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/web/src/components/BranchToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
MenuTrigger,
} from "./ui/menu";
import { Separator } from "./ui/separator";
import { ComposerSurface } from "./chat/ComposerSurface";

interface BranchToolbarProps {
environmentId: EnvironmentId;
Expand Down Expand Up @@ -466,10 +467,9 @@ export const BranchToolbar = memo(function BranchToolbar({
if (!hasActiveThread || !activeProject) return null;

return (
<div
<ComposerSurface.ContextStrip
ref={setStripElement}
data-compact={labelsOverflow ? "" : undefined}
className="chat-composer-context-strip group/composer-context -mt-4 mx-auto flex w-[calc(100%-2.75rem)] max-w-[calc(48rem-2.75rem)] items-center gap-2 overflow-x-clip overflow-y-visible ps-1 pe-2 pt-5 pb-1"
>
{isMobile && showGitControls ? (
<MobileRunContextSelector
Expand Down Expand Up @@ -534,6 +534,6 @@ export const BranchToolbar = memo(function BranchToolbar({
{...(onComposerFocusRequest ? { onComposerFocusRequest } : {})}
/>
) : null}
</div>
</ComposerSurface.ContextStrip>
);
});
19 changes: 0 additions & 19 deletions apps/web/src/components/ChatView.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
resolveSendEnvMode,
resolveDraftHeroState,
scheduleEnvironmentReconnectWarning,
shoulderTabReserve,
startNewThreadForProject,
codexArtifactTemplatePromptToAppend,
shouldDockDraftHeroForSubmission,
Expand Down Expand Up @@ -89,24 +88,6 @@ describe("artifact template composer insertion", () => {
});
});

describe("shoulderTabReserve", () => {
it("ignores the top drawer when measuring the shoulder tab band", () => {
const elementAt = (top: number) => ({ getBoundingClientRect: () => ({ top }) }) as HTMLElement;
const elements = new Map<string, HTMLElement>([
['[data-chat-composer-form="true"]', elementAt(20)],
[".chat-composer-shoulder-tab", elementAt(100)],
['[data-chat-composer-main-surface="true"]', elementAt(128)],
]);
const overlay = {
querySelector: (selector: string) => elements.get(selector) ?? null,
} as HTMLElement;

expect(shoulderTabReserve(overlay)).toBe(28);
elements.set(".chat-composer-tasks-tab", elementAt(100));
expect(shoulderTabReserve(overlay)).toBe(0);
});
});

describe("draft hero submission transition", () => {
it("does not dock the composer before a background submission", () => {
expect(
Expand Down
10 changes: 0 additions & 10 deletions apps/web/src/components/ChatView.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ export function codexArtifactTemplatePromptToAppend(
? null
: codexArtifactTemplateUsePrompt(template);
}
export function shoulderTabReserve(overlay: HTMLElement): number {
if (overlay.querySelector(".chat-composer-tasks-tab")) return 0;
const tab = overlay.querySelector<HTMLElement>(".chat-composer-shoulder-tab");
const surface = overlay.querySelector<HTMLElement>('[data-chat-composer-main-surface="true"]');
if (!tab || !surface) return 0;
return Math.max(
0,
Math.round(surface.getBoundingClientRect().top - tab.getBoundingClientRect().top),
);
}

export function shouldDockDraftHeroForSubmission(input: {
isDraftHeroState: boolean;
Expand Down
Loading
Loading