TypeScript
fix(web): widen sync banners and simplify the working timer (#8855)
Julius Marminge3f62e6fa65c2
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex b59b083be8f..e2b82e5a5f8 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -2435,21 +2435,6 @@ function ChatViewContent(props: ChatViewProps) {() => deriveActivePlanState(threadActivities, activeLatestTurn?.turnId ?? undefined),[activeLatestTurn?.turnId, threadActivities],);- // Current step for the in-chat working row: only for the running turn's own- // plan (deriveActivePlanState falls back to older turns' plans, which must- // not label fresh work). Falls back to the first pending step so an- // all-pending freshly written plan labels the row, matching the composer and- // the server's planProgress.- const workingStepLabel = useMemo(() => {- if (!activePlan || activePlan.turnId !== (activeLatestTurn?.turnId ?? null)) {- return null;- }- return (- activePlan.steps.find((step) => step.status === "inProgress")?.step ??- activePlan.steps.find((step) => step.status === "pending")?.step ??- null- );- }, [activeLatestTurn?.turnId, activePlan]);const showPlanFollowUpPrompt = shouldShowPlanFollowUpPrompt({pendingUserInputCount: pendingUserInputs.length,interactionMode,@@ -7240,7 +7225,6 @@ function ChatViewContent(props: ChatViewProps) {onOpenAgents={addAgentsSurface}key={activeThread.id}isWorking={isWorking}- workingStepLabel={workingStepLabel}activeTurnStartedAt={activeWorkStartedAt}listRef={legendListRef}timelineEntries={timelineEntries}diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsxindex 854efb96aac..8937e52048e 100644--- a/apps/web/src/components/chat/ChatComposer.tsx+++ b/apps/web/src/components/chat/ChatComposer.tsx@@ -3439,14 +3439,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)/>{!activityStackItem && (props.threadSyncPhase || inlineTasksBadge) ? (<ComposerBanner.Attachment>- <ComposerBanner.Root- width={- props.threadSyncPhase && !showComposerTopDrawer && !isComposerCollapsedMobile- ? "content"- : "fill"- }- data-chat-composer-activity-strip="true"- >+ <ComposerBanner.Root data-chat-composer-activity-strip="true">{props.threadSyncPhase ? (<ComposerActivityRow phase={props.threadSyncPhase} />) : (diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsxindex c654b8707d9..1fd5f5a7562 100644--- a/apps/web/src/components/chat/MessagesTimeline.tsx+++ b/apps/web/src/components/chat/MessagesTimeline.tsx@@ -171,8 +171,6 @@ interface TimelineRowActivityState {isWorking: boolean;isRevertingCheckpoint: boolean;latestTurnId: TurnId | null;- /** Current plan step label for the working row, when the turn has a plan. */- workingStepLabel: string | null;}const TimelineRowCtx = createContext<TimelineRowSharedState>(null!);@@ -227,7 +225,6 @@ interface MessagesTimelineProps {agentPanelModel?: AgentPanelModel;onOpenAgents?: () => void;isWorking: boolean;- workingStepLabel?: string | null;activeTurnStartedAt: string | null;listRef: React.RefObject<LegendListRef | null>;timelineEntries: ReturnType<typeof deriveTimelineEntries>;@@ -273,7 +270,6 @@ interface MessagesTimelineProps {export const MessagesTimeline = memo(function MessagesTimeline({isWorking,- workingStepLabel = null,activeTurnStartedAt,agentPanelModel = EMPTY_AGENT_PANEL_MODEL,onOpenAgents = NOOP_OPEN_AGENTS,@@ -583,9 +579,8 @@ export const MessagesTimeline = memo(function MessagesTimeline({isWorking,isRevertingCheckpoint,latestTurnId: latestTurn?.turnId ?? null,- workingStepLabel,}),- [isRevertingCheckpoint, isWorking, latestTurn?.turnId, workingStepLabel],+ [isRevertingCheckpoint, isWorking, latestTurn?.turnId],);// Stable renderItem — no closure deps. Row components read shared state@@ -1323,7 +1318,6 @@ function ProposedPlanTimelineRow({}function WorkingTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "working" }> }) {- const { workingStepLabel } = use(TimelineRowActivityCtx);return (<div><div className="border-b border-border/60 pb-2 pt-1">@@ -1337,11 +1331,6 @@ function WorkingTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "workin"Working...")}</span>- {workingStepLabel ? (- <span className="ml-2 min-w-0 truncate text-muted-foreground/55">- · {workingStepLabel}- </span>- ) : null}</div></div>{row.showThinking ? (diff --git a/docs/user/composer.md b/docs/user/composer.mdindex 5c6704a9242..6f14245ae27 100644--- a/docs/user/composer.md+++ b/docs/user/composer.md@@ -37,6 +37,10 @@ when starting a thread or changing an existing thread's model.## Notices above the composer+On web and desktop, loading and syncing statuses fill the available banner width beside the+stash tab. Task progress appears above the composer, while the timeline's working timer shows+only elapsed time.+On web and desktop, additional notices peek out above the attached banner. Hover over the peekto reveal them, or focus **Show other notices** with `Tab` and press `Enter` or `Space`. Press`Escape` to close the stack and return focus to that control. On a touchscreen, tap the peek to