Skip to content

Commit 30175a8

Browse files
fix(web): restore unified activity logs and composer banners (pingdotgg#8734)
Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
1 parent f9137a0 commit 30175a8

33 files changed

Lines changed: 1407 additions & 2232 deletions

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
MenuTrigger,
4141
} from "./ui/menu";
4242
import { Separator } from "./ui/separator";
43+
import { ComposerSurface } from "./chat/ComposerSurface";
4344

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

468469
return (
469-
<div
470+
<ComposerSurface.ContextStrip
470471
ref={setStripElement}
471472
data-compact={labelsOverflow ? "" : undefined}
472-
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"
473473
>
474474
{isMobile && showGitControls ? (
475475
<MobileRunContextSelector
@@ -534,6 +534,6 @@ export const BranchToolbar = memo(function BranchToolbar({
534534
{...(onComposerFocusRequest ? { onComposerFocusRequest } : {})}
535535
/>
536536
) : null}
537-
</div>
537+
</ComposerSurface.ContextStrip>
538538
);
539539
});

‎apps/web/src/components/ChatView.logic.test.ts‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import {
3535
resolveSendEnvMode,
3636
resolveDraftHeroState,
3737
scheduleEnvironmentReconnectWarning,
38-
shoulderTabReserve,
3938
startNewThreadForProject,
4039
codexArtifactTemplatePromptToAppend,
4140
shouldDockDraftHeroForSubmission,
@@ -89,24 +88,6 @@ describe("artifact template composer insertion", () => {
8988
});
9089
});
9190

92-
describe("shoulderTabReserve", () => {
93-
it("ignores the top drawer when measuring the shoulder tab band", () => {
94-
const elementAt = (top: number) => ({ getBoundingClientRect: () => ({ top }) }) as HTMLElement;
95-
const elements = new Map<string, HTMLElement>([
96-
['[data-chat-composer-form="true"]', elementAt(20)],
97-
[".chat-composer-shoulder-tab", elementAt(100)],
98-
['[data-chat-composer-main-surface="true"]', elementAt(128)],
99-
]);
100-
const overlay = {
101-
querySelector: (selector: string) => elements.get(selector) ?? null,
102-
} as HTMLElement;
103-
104-
expect(shoulderTabReserve(overlay)).toBe(28);
105-
elements.set(".chat-composer-tasks-tab", elementAt(100));
106-
expect(shoulderTabReserve(overlay)).toBe(0);
107-
});
108-
});
109-
11091
describe("draft hero submission transition", () => {
11192
it("does not dock the composer before a background submission", () => {
11293
expect(

‎apps/web/src/components/ChatView.logic.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@ export function codexArtifactTemplatePromptToAppend(
5252
? null
5353
: codexArtifactTemplateUsePrompt(template);
5454
}
55-
export function shoulderTabReserve(overlay: HTMLElement): number {
56-
if (overlay.querySelector(".chat-composer-tasks-tab")) return 0;
57-
const tab = overlay.querySelector<HTMLElement>(".chat-composer-shoulder-tab");
58-
const surface = overlay.querySelector<HTMLElement>('[data-chat-composer-main-surface="true"]');
59-
if (!tab || !surface) return 0;
60-
return Math.max(
61-
0,
62-
Math.round(surface.getBoundingClientRect().top - tab.getBoundingClientRect().top),
63-
);
64-
}
6555

6656
export function shouldDockDraftHeroForSubmission(input: {
6757
isDraftHeroState: boolean;

0 commit comments

Comments
 (0)