Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "../../../../../../loopx/control_plane/presentation/action_review_plan.js";
import { refreshAttention } from "./attention-details";
import { teamPlanAssignments, teamPlanAppliedLine, teamPlanAppliedOutcome, teamPlanFields, teamPlanGoalId, teamPlanLaneCount, teamPlanReceiptGapLanes, teamPlanTodoIds } from "./team-plan-preview";
import { useEffect, useMemo, useRef, useState, type ClipboardEvent as ReactClipboardEvent, type ReactNode } from "react";
import { useEffect, useLayoutEffect, useMemo, useRef, useState, type ClipboardEvent as ReactClipboardEvent, type ReactNode } from "react";
import { AlertCircle, Bot, CalendarClock, FileText, ListPlus, MessageCircleQuestion, Paperclip, Plus, RefreshCw, Send, X } from "lucide-react";

import {
Expand Down Expand Up @@ -1095,6 +1095,9 @@ export function PersonalWorkspacePage({
const quickPromptBlocked = steering || sending || conversationTurnRunning;
// The Goal overview is for reading; its composer folds to one line until asked for.
const [overviewComposerOpen, setOverviewComposerOpen] = useState(false);
useLayoutEffect(() => {
if (overviewComposerOpen) composerRef.current?.focus();
}, [overviewComposerOpen]);
useEffect(() => setOverviewComposerOpen(false), [selectedGoalId, selectedGoalTab]);
const composerCollapsed = Boolean(selectedGoal) && selectedGoalTab === "overview" && !overviewComposerOpen
&& !composer.trim() && !actionDraft && !imageAttachments.length && !imageAttachmentError && !sending && !conversationTurnRunning;
Expand Down Expand Up @@ -2248,7 +2251,7 @@ export function PersonalWorkspacePage({
<div className={composerCollapsed ? "personal-composer-folded" : undefined}>
{composerCollapsed && selectedGoal ? <>
<button className="personal-composer-pill" data-testid="overview-composer-pill" type="button"
onClick={() => { setOverviewComposerOpen(true); window.requestAnimationFrame(() => composerRef.current?.focus()); }}>
onClick={() => setOverviewComposerOpen(true)}>
<MessageCircleQuestion aria-hidden size={15} /><span>{t("composer.goalPrompt")}</span>
</button>
</> : null}
Expand Down
Loading