Skip to content

Commit 39283f4

Browse files
committed
fix(web): restore unified activity logs and composer banners
1 parent 8dcb963 commit 39283f4

33 files changed

Lines changed: 1506 additions & 2094 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
@@ -32,7 +32,6 @@ import {
3232
resolveSendEnvMode,
3333
resolveDraftHeroState,
3434
scheduleEnvironmentReconnectWarning,
35-
shoulderTabReserve,
3635
startNewThreadForProject,
3736
shouldDockDraftHeroForSubmission,
3837
shouldReleaseTimelineAnchorForToolActivity,
@@ -46,24 +45,6 @@ const projectId = ProjectId.make("project-1");
4645
const threadId = ThreadId.make("thread-1");
4746
const now = "2026-03-29T00:00:00.000Z";
4847

49-
describe("shoulderTabReserve", () => {
50-
it("ignores the top drawer when measuring the shoulder tab band", () => {
51-
const elementAt = (top: number) => ({ getBoundingClientRect: () => ({ top }) }) as HTMLElement;
52-
const elements = new Map<string, HTMLElement>([
53-
['[data-chat-composer-form="true"]', elementAt(20)],
54-
[".chat-composer-shoulder-tab", elementAt(100)],
55-
['[data-chat-composer-main-surface="true"]', elementAt(128)],
56-
]);
57-
const overlay = {
58-
querySelector: (selector: string) => elements.get(selector) ?? null,
59-
} as HTMLElement;
60-
61-
expect(shoulderTabReserve(overlay)).toBe(28);
62-
elements.set(".chat-composer-tasks-tab", elementAt(100));
63-
expect(shoulderTabReserve(overlay)).toBe(0);
64-
});
65-
});
66-
6748
describe("draft hero submission transition", () => {
6849
it("does not dock the composer before a background submission", () => {
6950
expect(

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ export const ENVIRONMENT_RECONNECT_WARNING_GRACE_MS = 2_000;
3939

4040
export const LastInvokedScriptByProjectSchema = Schema.Record(ProjectId, Schema.String);
4141

42-
export function shoulderTabReserve(overlay: HTMLElement): number {
43-
if (overlay.querySelector(".chat-composer-tasks-tab")) return 0;
44-
const tab = overlay.querySelector<HTMLElement>(".chat-composer-shoulder-tab");
45-
const surface = overlay.querySelector<HTMLElement>('[data-chat-composer-main-surface="true"]');
46-
if (!tab || !surface) return 0;
47-
return Math.max(
48-
0,
49-
Math.round(surface.getBoundingClientRect().top - tab.getBoundingClientRect().top),
50-
);
51-
}
52-
5342
export function shouldDockDraftHeroForSubmission(input: {
5443
isDraftHeroState: boolean;
5544
activeThreadKey: string | null;

0 commit comments

Comments
 (0)