fix(web): widen sync banners and simplify the working timer (#8855)
This commit is contained in:
1 parent
9842518c9a
commit
3f62e6fa65
4 files changed
+6
-36
No files matched your search
@@ -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}
|
||||
|
||||
@@ -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} />
|
||||
) : (
|
||||
|
||||
@@ -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 ? (
|
||||
|
||||
@@ -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 peek
|
||||
to 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
|
||||
|
||||
Reference in new issue
Block a user