Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): unify activity logs and composer banners #8693

Mergedjuliusmarmingemerged 8 commits intomain fromrefs/pull/8693/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Note

Medium Risk Large UI refactor across composer, timeline, and system banners with prop renames (externalDrawerAttached → bannerItems, etc.) that can affect stacking order, scroll padding, and in-flight turn visibility.

Overview Unifies chat composer notices and live status around new ComposerBanner and ComposerSurface primitives, instead of scattered glass-shell classes and Alert-based stacks.

Banners, stash/tasks shoulders, pending-approval drawers, and command menus now share the same attachment/dock layout. ComposerBannerStack sorts items by priority (activity, urgent, notice) with keyboard-friendly peek/expand, and ChatComposer owns the stack (via bannerItems) plus a dedicated activity slot for thread sync and “Working…” timers—replacing the separate ThreadSyncStatusPill and timeline working rows. Task progress is derived from the active turn’s plan steps (not sidebar shell state) and can embed that activity row; per-turn task dismiss is removed.

ChatView wraps the composer in ComposerSurface.Shell/Host/Main, drops shoulderTabReserve scroll adjustment, and tightens server-update banners (ComposerServerUpdateStatus, failed-update dismiss). BranchToolbar uses ComposerSurface.ContextStrip. Several markup-focused component tests were removed or narrowed as layouts moved to the shared primitives.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 078c28963bf3000c9393305d35570952bc3fe6d4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Unify activity logs and composer banners in chat composer

  • Introduces ComposerBanner primitives and refactors the chat composer UI (tasks, stash, command menu, server updates) to use them
  • Removes working rows and the MAX_VISIBLE_WORK_LOG_ENTRIES truncation from MessagesTimeline; work log entries are now grouped and summarized directly, including non-tool update entries
  • Excludes turn.plan.updated activities from the derived work log in session-logic.ts
  • Adds dismissServerUpdateFailure and isServerUpdateFailureDismissed to versionSkew.ts to track dismissed failed server updates in memory
  • Risk: ChatComposerProps drops externalDrawerAttached and requires bannerItems; MessagesTimelineRow removes the working variant; shoulderTabReserve is deleted from ChatView.logic.ts; several chat-composer-* CSS classes are removed from index.css
Macroscope summarized 078c289.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: b44ec0da-f7ba-4164-b9db-44ffa1f3c6e9

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.3 KiB13.3 KiB−42 B (−0.3%)15.1 KiB✅
      CodexThread snapshot wire6.9 KiB6.9 KiB−8 B (−0.1%)7.3 KiB✅
      CodexLive turn WebSocket wire6.4 KiB6.4 KiB−34 B (−0.5%)7.8 KiB✅
      CodexLive turn WebSocket decoded55.6 KiB55.6 KiB−44 B (−0.1%)66.4 KiB✅
      CodexLive turn messages1110−1 (−9.1%)21✅
      ClaudeTotal thread wire13.3 KiB13.3 KiB+4 B (+0.0%)15.1 KiB✅
      ClaudeThread snapshot wire6.9 KiB6.9 KiB−8 B (−0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.4 KiB6.5 KiB+12 B (+0.2%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded56.4 KiB56.4 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages11110 (0.0%)21✅

      Baseline: c0e09f3 · PR result: 078c289 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 109.4 KiB
      • Claude decoded thread snapshot: 110.1 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. UI consistency review of the composer banner migration. The new ComposerBanner primitive set, the ComposerBannerStack ordering/expansion rework, and the shared ScrollArea reuse all look sound; a few ownership and coverage issues below.

      Posted via Macroscope — UI Consistency
      @@ -163,0 +129,21 @@
      129+ const row = (
      130+ <ComposerBanner.Row
      131+ render={<button type="button" />}
      132+ aria-expanded={expanded}
      133+ aria-label={`${expanded ? "Collapse tasks" : "Tasks"}: ${progress.completedSteps} of ${progress.totalSteps} complete. Current task: ${progress.step}`}
      134+ data-composer-tasks-badge="true"
      135+ onClick={onToggle}
      136+ onPointerDown={(event) => event.preventDefault()}
      137+ >
      138+ <TaskSummary
      139+ expanded={expanded}
      140+ progress={progress}
      141+ steps={steps}
      142+ activityStatus={activityStatus}
      143+ />
      144+ </ComposerBanner.Row>
      145+ );
      146+ return placement === "inline" ? (
      147+ row
      148+ ) : (
      149+ <ComposerBanner.Root className="chat-composer-shoulder-tab chat-composer-tasks-tab">
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Same as the stash tab: chat-composer-tasks-tab has no remaining consumer now that shoulderTabReserve (which queried .chat-composer-tasks-tab) and the .chat-composer-shoulder-tab CSS block are gone. Keep the shoulder-tab marker that ChatView's group-has- selector still relies on.

      Suggested change
      149- <ComposerBanner.Root className="chat-composer-shoulder-tab chat-composer-tasks-tab">
      149+ <ComposerBanner.Root className="chat-composer-shoulder-tab">
      Posted via Macroscope — UI Consistency
      @@ -3374,4 +3414,4 @@
      33743414 onDragOverCapture={composerMentionDragHandlers.onDragOver}
      33753415 onDragLeaveCapture={onComposerMentionDragLeaveCapture}
      33763416 onDropCapture={composerMentionDragHandlers.onDrop}
      3377- className={cn("mx-auto w-full min-w-0 max-w-3xl", hasShoulderTab && "pt-7")}
      3417+ className="mx-auto w-full min-w-0 max-w-3xl"
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      --chat-composer-drawer-inset is now read but never defined. index.css lost the rule that declared it on [data-chat-composer-form="true"] / .chat-composer-drawer-slot / .chat-composer-top-drawer, yet ComposerCommandMenuLayer still reads it from this form element (ChatComposer.tsx:200) and now always falls through to the hardcoded 1.375. The real inset moved into ComposerBanner.Attachment as the literal w-[calc(100%-2.75rem)], so the two values can silently drift and misplace the command menu.

      Smallest fix: re-declare the token on the owner that the lookup reads (and ideally derive the attachment width from it), or delete the now-dead getComputedStyle read and share one constant.

      Suggested change
      3418+ className="mx-auto w-full min-w-0 max-w-3xl [--chat-composer-drawer-inset:1.375rem]"
      Posted via Macroscope — UI Consistency
      @@ -63,18 +63,3 @@
      63- <button
      64- type="button"
      65- data-prompt-stash-badge="true"
      66- aria-label={`Stashed prompts: ${props.count}. Open stash.`}
      67- aria-expanded={props.menuOpen}
      68- className={cn(
      69- "chat-composer-shoulder-tab chat-composer-stash-tab absolute -top-7 right-5.5 z-0 inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-t-xl border border-b-0 px-3 pb-1 text-xs leading-none",
      70- "transition-[color,border-color] duration-200",
      71- props.menuOpen && "pointer-events-none",
      72- props.menuOpen || props.pulsing
      73- ? "text-foreground"
      74- : "text-muted-foreground hover:text-foreground",
      75- )}
      76- onPointerDown={(event) => {
      77- // Keep composer focus so Escape/typing flows stay intact.
      78- event.preventDefault();
      79- }}
      80- onClick={props.onToggleMenu}
      63+ <ComposerBanner.Root
      64+ width="content"
      65+ className="chat-composer-shoulder-tab chat-composer-stash-tab ml-auto"
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      chat-composer-stash-tab no longer has any consumer: the .chat-composer-shoulder-tab rule block was deleted from index.css and no selector, test, or JS query references the stash-specific class anymore. chat-composer-shoulder-tab is still needed (ChatView's group-has-[.chat-composer-shoulder-tab] padding hook), so keep only that one.

      Suggested change
      65- className="chat-composer-shoulder-tab chat-composer-stash-tab ml-auto"
      65+ className="chat-composer-shoulder-tab ml-auto"
      Posted via Macroscope — UI Consistency
      @@ -52,6 +49,20 @@
      49+ ComposerBannerStackItem,
      50+ "id" | "variant" | "priority" | "className"
      51+> & { readonly content: ReactNode };
      52+
      53+type ComposerBannerStackEntry = ComposerBannerStackItem | ComposerBannerStackContent;
      54+
      55+function bannerPriority(item: ComposerBannerStackEntry) {
      56+ if (item.priority === "urgent" || item.variant === "error" || item.variant === "warning") {
      57+ return 0;
      58+ }
      59+ return item.priority === "activity" ? 1 : 2;
      60+}
      61+
      5262 interface ComposerBannerStackProps {
      5363 readonly className?: string;
      54- readonly items: ReadonlyArray<ComposerBannerStackItem>;
      64+ readonly items: ReadonlyArray<ComposerBannerStackEntry>;
      5565 }
      5666
      5767 export function ComposerBannerStack({ className, items }: ComposerBannerStackProps) {
      68+ const [stackExpanded, setStackExpanded] = useState(false);
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      This change turns the stack from a CSS-only hover reveal into a real state machine — bannerPriority ordering, a focusable peek button, pointer/focus expansion, Escape-to-collapse — while ComposerBannerStack.test.tsx (plus the stash and tasks badge tests) is deleted and nothing replaces it. Ordering and expansion are exactly the behavior this check expects focused coverage for.

      Consider a small render test asserting urgent → activity → notice ordering and that the peek button toggles aria-expanded / grid-rows-[1fr], with Escape collapsing and returning focus to the peek.

      Posted via Macroscope — UI Consistency
    5. UI consistency review

      Two findings in the composer banner migration; the rest of the ComposerBanner extraction (shared surface, attachment geometry moved out of index.css, data-composer-banner-surface selector hooks) looks consistent with the shared primitives and preserves the glass/attachment ownership rules.

      • ComposerPendingUserInputPanel.tsx: the option buttons now run to the clipping edge of the permanently overflow-hidden CollapsiblePanel, shaving their focus ring on the trailing side (the removed px-3 sm:px-4 comment warned about exactly this).
      • ComposerTasksBadge.tsx / ComposerStashMenu.tsx: the task and stash lists lost the explicit role="list" / role="listitem" they used to carry, while the new ul/li are rendered with display: grid.
      Posted via Macroscope — UI Consistency
      @@ -249,9 +173,12 @@
      249- {step.durationMs !== undefined
      250- ? formatDuration(step.durationMs)
      251- : step.status === "inProgress"
      252- ? "now"
      253- : null}
      254- </span>
      255- </div>
      256- ))}
      257- </div>
      173+ <ComposerTasksBadge
      174+ expanded={expanded}
      175+ onToggle={onToggle}
      176+ placement="inline"
      177+ progress={progress}
      178+ steps={steps}
      179+ activityStatus={activityStatus}
      180+ />
      181+ {expanded ? (
      182+ <ComposerBanner.Scroll data-composer-tasks-scroll="true">
      183+ <ComposerBanner.Children
      184+ render={<ul />}
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      The previous task list declared role="list" on the container and role="listitem" on each row. The replacement uses real ul/li, but both are rendered with display: grid by ComposerBanner.Children/ComposerBanner.Row, and Tailwind preflight also sets list-style: none — which drops the implicit list/listitem mapping in WebKit (and for grid-displayed li in Chromium). Net effect is that the count-bearing list semantics the old markup guaranteed are no longer reliable here or in the stash list (ComposerStashMenu.tsx:133).

      Restoring them explicitly keeps the migration behavior-neutral:

      Suggested change
      182- <ComposerBanner.Scroll data-composer-tasks-scroll="true">
      182+ render={<ul role="list" />}

      The row also needs render={<li role="listitem" />} (same for the stash entries) to keep the pairing intact.

      Posted via Macroscope — UI Consistency
      @@ -205,17 +200,4 @@
      205- ) : null}
      206- {/* The chevron points at the body: down while it is open below the
      207- header, up while it is collapsed into it. */}
      208- <ChevronDownIcon
      209- aria-hidden="true"
      210- className={cn(
      211- "ml-auto size-3.5 shrink-0 text-secondary-label transition-transform duration-150 group-hover:text-foreground",
      212- isCollapsed && "rotate-180",
      213- )}
      214- />
      215- </CollapsibleTrigger>
      216- </div>
      217- {/* The panel carries the horizontal padding itself: it clips its content
      218- while the height animates, so the option buttons have to sit inside
      219- that padding or their focus rings get shaved off at the edges. */}
      220- <CollapsiblePanel className="px-3 sm:px-4">
      221- <div className="pt-2 pb-0.5">
      200+ <ComposerBanner.ToggleIcon expanded={!isCollapsed} />
      201+ </ComposerBanner.Actions>
      202+ </CollapsibleTrigger>
      203+ <CollapsiblePanel>
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      CollapsiblePanel is permanently overflow-hidden (ui/collapsible.tsx), and the horizontal padding that used to keep the option buttons off that clip edge (px-3 sm:px-4, with the comment explaining why) moved into ComposerBanner.Body, which only pads the inline start. The w-full option buttons below now reach the panel's trailing edge, so their focus-visible:ring-1 is shaved off on that side.

      Smallest fix is a trailing inset on the clipping element:

      Suggested change
      203- <CollapsiblePanel>
      203+ <CollapsiblePanel className="pe-1">
      Posted via Macroscope — UI Consistency
    6. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot), but a cloud agent failed to start. Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 74d4ba62f0af16c9afaeca7829d6e1a7e28dc546. Configure [here](https://www.cursor.com/dashboard/bugbot).
    7. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This is a broad production UI refactor that changes the default composer, activity-log, banner-stacking, update-status, and accessibility behavior across existing flows. Unresolved concerns include shared geometry drift, deleted coverage for new interaction state, list semantics, and focus-ring clipping.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    8. UI consistency review of the composer banner migration. Two findings, both about behavior/ownership preserved-through-migration rather than styling taste. The rest of the migration (banner primitives composed from Button/ScrollArea, ScrollArea replacing the hand-rolled overflow-y-auto task list, [data-composer-banner-surface="attached"] replacing the per-class :has() selectors, .chat-composer-shoulder-tab retained as the marker ChatView still keys group-has-[...] off) looks consistent.

      Posted via Macroscope — UI Consistency
      @@ -205,17 +200,4 @@
      205- ) : null}
      206- {/* The chevron points at the body: down while it is open below the
      207- header, up while it is collapsed into it. */}
      208- <ChevronDownIcon
      209- aria-hidden="true"
      210- className={cn(
      211- "ml-auto size-3.5 shrink-0 text-secondary-label transition-transform duration-150 group-hover:text-foreground",
      212- isCollapsed && "rotate-180",
      213- )}
      214- />
      215- </CollapsibleTrigger>
      216- </div>
      217- {/* The panel carries the horizontal padding itself: it clips its content
      218- while the height animates, so the option buttons have to sit inside
      219- that padding or their focus rings get shaved off at the edges. */}
      220- <CollapsiblePanel className="px-3 sm:px-4">
      221- <div className="pt-2 pb-0.5">
      200+ <ComposerBanner.ToggleIcon expanded={!isCollapsed} />
      201+ </ComposerBanner.Actions>
      202+ </CollapsibleTrigger>
      203+ <CollapsiblePanel>
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      CollapsiblePanel clips permanently (overflow-hidden in the primitive), and the padding that used to keep content off that clip is gone: the old panel carried px-3 sm:px-4 plus pt-2 pb-0.5, while ComposerBanner.Body only pads the inline start (ps-…). The option buttons are w-full with focus-visible:ring-1, which paints outside the border box, so the ring is now shaved on the end edge of every option and on the bottom edge of the last one — exactly the failure the removed comment warned about.

      Smallest fix is to give the clipping element a little end/bottom room:

      Suggested change
      203- <CollapsiblePanel>
      203+ <CollapsiblePanel className="pe-1 pb-1">
      Posted via Macroscope — UI Consistency
      @@ -0,0 +1,17 @@
      1+import { mergeProps } from "@base-ui/react/merge-props";
      2+import { useRender } from "@base-ui/react/use-render";
      3+import { ChevronDownIcon, XIcon } from "lucide-react";
      4+import type { ComponentProps } from "react";
      5+
      6+import { cn } from "~/lib/utils";
      7+import { Button, buttonVariants } from "../ui/button";
      8+import { ScrollArea } from "../ui/scroll-area";
      9+
      10+export type ComposerBannerVariant = "default" | "error" | "info" | "success" | "warning";
      11+
      12+function Attachment({ className, ...props }: ComponentProps<"div">) {
      13+ return (
      14+ <div
      15+ data-slot="composer-banner-attachment"
      16+ className={cn(
      17+ "mx-auto -mb-[calc(1rem+1px)] w-[calc(100%-2.75rem)] max-w-[45.25rem]",
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      This hardcodes the attachment geometry (2.75rem = 2 × 1.375rem inset, 45.25rem = 48rem − inset × 2) while the PR deletes the --chat-composer-drawer-inset: 1.375rem declaration from index.css. That token still has an imperative consumer: ChatComposer.tsx:200 reads it with getComputedStyle(...).getPropertyValue("--chat-composer-drawer-inset") to position the command-menu layer, and now always lands on its || 1.375 fallback. Nothing breaks today only because the literal here and the fallback there happen to agree — the two can silently drift the next time this width changes.

      Suggest picking one owner: either keep the custom property (declared on [data-chat-composer-form="true"]) and consume it here (w-[calc(100%-2*var(--chat-composer-drawer-inset))], max-w-[calc(48rem-2*var(--chat-composer-drawer-inset))]), or drop the now-dead getComputedStyle read in ChatComposer and export the inset as a shared constant.

      Posted via Macroscope — UI Consistency
    9. Composer screenshots from 078c28963bf, using synthetic review fixtures.

      Working stays attached to the composer. Update notices, including failures and retry progress, stay in the stack behind it.

      Working attached with the update notice peeking behind it

      Revealing a failed update keeps Working attached, with both Retry and dismiss available:

      Failed update revealed above the attached Working row

      Expanded tasks and revealed update notice

      Expanded tasks and revealed update notice

      Syncing hides the working timer and cached tasks

      Syncing hides the working timer and cached tasks

      Long task list with scroll fade

      Long task list with scroll fade

      Stash uses the shared banner layout

      Stash uses the shared banner layout

      Dark mode

      Dark mode

      Narrow viewport

      Narrow viewport

      Checked task expansion, notice hit areas, retry, and dismissal in the web client. Scoped typecheck, lint, and formatting passed.

    10. juliusmarminge merged this3d32797

    11. juliusmarminge closed this

Sign in to join this conversation.