From bd5a77942373fdcd0ab29c1593ac5dc8d73d3039 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 24 Jun 2026 23:19:00 -0700 Subject: [PATCH] FN-6982: remove task chat guidance copy Remove the task Chat composer guidance line and rely on placeholders for task state cues. - Drop the idle/guidance text block above the task Chat entry box. - Remove obsolete localized guidance strings and generated resource types. - Update dashboard docs, regression coverage, and release notes for the simplified composer. Files changed: .changeset/fn-6982-task-chat-guidance.md | 7 ++ docs/dashboard-guide.md | 2 +- packages/dashboard/app/components/TaskChatTab.css | 10 -- packages/dashboard/app/components/TaskChatTab.tsx | 83 +---------------- .../app/components/__tests__/App.test.tsx | 42 ++++----- .../PlanningModeModal.ui-interactions.test.tsx | 2 +- .../app/components/__tests__/TaskChatTab.test.tsx | 102 +++++++++++---------- packages/i18n/locales/en/app.json | 2 - packages/i18n/locales/es/app.json | 2 - packages/i18n/locales/fr/app.json | 2 - packages/i18n/locales/ko/app.json | 2 - packages/i18n/locales/zh-CN/app.json | 2 - packages/i18n/locales/zh-TW/app.json | 2 - packages/i18n/src/resources.d.ts | 2 - 14 files changed, 81 insertions(+), 181 deletions(-) Fusion-Task-Id: FN-6982 Fusion-Task-Lineage: b880df6c-d84b-4d34-886b-f54c1d568ece --- .changeset/fn-6982-task-chat-guidance.md | 7 ++ docs/dashboard-guide.md | 2 +- .../dashboard/app/components/TaskChatTab.css | 10 -- .../dashboard/app/components/TaskChatTab.tsx | 83 +------------- .../app/components/__tests__/App.test.tsx | 42 +++---- ...PlanningModeModal.ui-interactions.test.tsx | 2 +- .../components/__tests__/TaskChatTab.test.tsx | 104 +++++++++--------- packages/i18n/locales/en/app.json | 2 - packages/i18n/locales/es/app.json | 2 - packages/i18n/locales/fr/app.json | 2 - packages/i18n/locales/ko/app.json | 2 - packages/i18n/locales/zh-CN/app.json | 2 - packages/i18n/locales/zh-TW/app.json | 2 - packages/i18n/src/resources.d.ts | 2 - 14 files changed, 82 insertions(+), 182 deletions(-) create mode 100644 .changeset/fn-6982-task-chat-guidance.md diff --git a/.changeset/fn-6982-task-chat-guidance.md b/.changeset/fn-6982-task-chat-guidance.md new file mode 100644 index 0000000000..65a6dd8eac --- /dev/null +++ b/.changeset/fn-6982-task-chat-guidance.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Remove helper guidance above the task chat composer. +category: fix +dev: Task chat placeholders now carry active/idle/done composer guidance without an extra status shell. diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index 3cae7719c3..3bc881dd87 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -977,7 +977,7 @@ Recommended workflow: ordinary chains stay as `Blocks N` so noise stays low, hig ### Logs → Agent Log view -The **Chat** tab sits between Definition and Logs and presents a live, chat-styled transcript of task agent output. Consecutive entries are grouped by role and labeled as Planner, Executor, Reviewer, or Merger; legacy log rows without an agent role use the neutral Agent fallback. Agent group headers and user message headers show a small muted relative timestamp (for example, “just now”, “1m ago”, or “2h ago”) based on the transcript timestamp, while agent group metadata still includes the entry count. Consecutive text/message chunks inside a role group render as one continuous markdown bubble, while consecutive tool/tool-result/tool-error rows collapse into one expandable, compact tool-call summary that stays collapsed by default; the summary counts tool invocations, lists deduped tool names with overflow, and shows an error count when failures are present, while the expanded body pairs each call with its result or error in dense entry cards. Thinking entries render in a collapsible block that starts expanded. The transcript opens at the latest output whenever the tab loads or becomes active, then follows new live output when you are already near the bottom while preserving your scroll position when you review older messages. When older task-agent history exists, scrolling to the top or selecting **Load previous messages** prepends earlier transcript entries without moving the message you were reading. When you scroll away from the bottom of a populated transcript, a sticky **Latest** button appears inside the transcript so you can jump back to the newest message and resume live follow. For non-`done` tasks, the composer sends guidance through the same steering path used by comments, including active planning/triage, `in-progress`, and `in-review` sessions, plus live CLI-agent sessions reported by the session bridge; messages are still saved as queued guidance when no session is currently live. When no active or steerable agent session will reply immediately, the composer shows an idle warning hint that no agent is currently working on the task and that the sent message is saved for the next run; the input and Send button remain usable. On a `done` task, sending a Chat message starts a refinement task using the typed text as feedback and shows a success toast with the new task ID; the current task detail modal remains on the completed task. The task-detail Chat tab keeps the composer pinned and visible on mobile and desktop while the transcript scrolls internally; its textarea placeholder reads “Steer the currently executing agent” for steering mode and switches to refinement copy for completed tasks, with the same inline, icon-only send affordance to the right of the input at every breakpoint. In the composer, plain **Enter** sends, **Shift+Enter** inserts a newline, and **Cmd/Ctrl+Enter** remains a supported send shortcut. +The **Chat** tab sits between Definition and Logs and presents a live, chat-styled transcript of task agent output. Consecutive entries are grouped by role and labeled as Planner, Executor, Reviewer, or Merger; legacy log rows without an agent role use the neutral Agent fallback. Agent group headers and user message headers show a small muted relative timestamp (for example, “just now”, “1m ago”, or “2h ago”) based on the transcript timestamp, while agent group metadata still includes the entry count. Consecutive text/message chunks inside a role group render as one continuous markdown bubble, while consecutive tool/tool-result/tool-error rows collapse into one expandable, compact tool-call summary that stays collapsed by default; the summary counts tool invocations, lists deduped tool names with overflow, and shows an error count when failures are present, while the expanded body pairs each call with its result or error in dense entry cards. Thinking entries render in a collapsible block that starts expanded. The transcript opens at the latest output whenever the tab loads or becomes active, then follows new live output when you are already near the bottom while preserving your scroll position when you review older messages. When older task-agent history exists, scrolling to the top or selecting **Load previous messages** prepends earlier transcript entries without moving the message you were reading. When you scroll away from the bottom of a populated transcript, a sticky **Latest** button appears inside the transcript so you can jump back to the newest message and resume live follow. For non-`done` tasks, the composer sends guidance through the same steering path used by comments, including active planning/triage, `in-progress`, and `in-review` sessions, plus live CLI-agent sessions reported by the session bridge; messages are still saved as queued guidance when no session is currently live. The composer no longer renders guidance text above the entry box; active, idle, and completed task actions are communicated through the textarea placeholder while the input and Send button remain usable. On a `done` task, sending a Chat message starts a refinement task using the typed text as feedback and shows a success toast with the new task ID; the current task detail modal remains on the completed task. The task-detail Chat tab keeps the composer pinned and visible on mobile and desktop while the transcript scrolls internally; its textarea placeholder reads “Steer the currently executing agent” for steering mode and switches to refinement copy for completed tasks, with the same inline, icon-only send affordance to the right of the input at every breakpoint. In the composer, plain **Enter** sends, **Shift+Enter** inserts a newline, and **Cmd/Ctrl+Enter** remains a supported send shortcut. The **Logs** tab includes an **Agent Log** subview designed for debugging long-running and tool-heavy sessions: diff --git a/packages/dashboard/app/components/TaskChatTab.css b/packages/dashboard/app/components/TaskChatTab.css index a49c30f140..6a8d1b067d 100644 --- a/packages/dashboard/app/components/TaskChatTab.css +++ b/packages/dashboard/app/components/TaskChatTab.css @@ -380,16 +380,6 @@ List View split-pane detail can be narrow while the global viewport is desktop-s padding: var(--space-sm) var(--space-md); } -.task-chat-session-hint { - color: var(--text-muted); - font-size: var(--space-md); -} - -/* FNXC:TaskDetailChat 2026-06-19-22:54: Idle task-detail chat needs a warning-token hint so saved guidance is visibly non-live without disabling the composer. */ -.task-chat-session-hint--idle { - color: var(--color-warning); -} - .task-chat-composer-row { display: flex; align-items: flex-end; diff --git a/packages/dashboard/app/components/TaskChatTab.tsx b/packages/dashboard/app/components/TaskChatTab.tsx index b77dac3431..ebd6904558 100644 --- a/packages/dashboard/app/components/TaskChatTab.tsx +++ b/packages/dashboard/app/components/TaskChatTab.tsx @@ -50,22 +50,6 @@ type TaskChatToolGroupRow = | { kind: "invocation"; call: AgentLogEntry; completion?: AgentLogEntry; callIndex: number; completionIndex?: number } | { kind: "entry"; entry: AgentLogEntry; index: number }; -const STEERING_BLOCKED_STATUSES = new Set([ - "paused", - "awaiting-user-input", - "awaiting-cli-approval", - "awaiting-user-review", - "awaiting-approval", - "awaiting-integration", - "failed", - "needs-replan", -]); -const REVIEW_STEERABLE_STATUSES = new Set(["reviewing", "merging", "merging-fix", "fixing"]); -// The scheduler's waiting/blocked marker for a not-yet-dispatched task -// (self-healing.ts documents `status: "queued"` as the blocked marker). A queued -// in-progress row has no agent executing yet, so it stays assignment-gated rather -// than counting as an implied active session. -const SCHEDULER_WAITING_STATUS = "queued"; const BOTTOM_FOLLOW_THRESHOLD = 48; const TOP_LOAD_THRESHOLD = 48; @@ -241,48 +225,6 @@ function buildTranscriptItems(entries: readonly AgentLogEntry[], userMessages: r }, []); } -function isActiveAgentSession(task: Task | TaskDetail, opts: { sessionLive?: boolean } = {}): boolean { - if (task.paused || task.userPaused) return false; - if (opts.sessionLive) return true; - - if (task.status === SCHEDULER_WAITING_STATUS) return false; - - const hasAssignedAgent = Boolean(task.assignedAgentId || task.checkedOutBy); - const statusBlocksProgressSteering = task.status ? STEERING_BLOCKED_STATUSES.has(task.status) : false; - if (statusBlocksProgressSteering) return false; - - const statusAllowsProgressSteering = !statusBlocksProgressSteering; - const statusAllowsReviewSteering = !task.status || REVIEW_STEERABLE_STATUSES.has(task.status); - const columnAllowsSteering = (task.column === "triage" && statusAllowsProgressSteering) - || (task.column === "in-progress" && statusAllowsProgressSteering) - || (task.column === "in-review" && statusAllowsReviewSteering); - // FNXC:TaskDetailChat 2026-06-20-20:10: - // In the default ephemeral-agents mode the scheduler never writes - // `assignedAgentId`/`checkedOutBy` — those are only set when - // `ephemeralAgentsEnabled === false` (scheduler.ts). An actively-executing - // task therefore has no assignment field yet IS being worked, so requiring - // `hasAssignedAgent` made the chat always show "no agent is working" for - // default-mode tasks. Treat assignment as sufficient-but-not-necessary: - // - in-progress with a non-blocked, non-`queued` status is an executing run; - // - in-review with an active review/merge status (REVIEW_STEERABLE_STATUSES) - // has a reviewer/merger running. A null-status in-review row is awaiting - // human review, not actively worked, so it stays assignment-gated and idle. - // FNXC:TaskDetailChat 2026-06-21-13:03: - // Planning/triage is an execution surface too: triage.ts writes - // `status: "planning"` only after a planner slot is acquired, while active - // default-mode planner sessions still omit assignment fields. Treat non-waiting, - // non-blocked triage rows as active so steering copy does not falsely say no - // agent is working during spec generation. Keep `queued` and awaiting/failed - // statuses idle before assignment checks because they are waiting states, not - // live agent work. - const executionImpliesActiveAgent = - (task.column === "triage" && statusAllowsProgressSteering) - || (task.column === "in-progress" && statusAllowsProgressSteering) - || (task.column === "in-review" && task.status != null && REVIEW_STEERABLE_STATUSES.has(task.status)); - return columnAllowsSteering - && (hasAssignedAgent || executionImpliesActiveAgent); -} - function isToolLikeEntry(entry: AgentLogEntry): boolean { return entry.type === "tool" || entry.type === "tool_result" || entry.type === "tool_error"; } @@ -549,7 +491,7 @@ function TaskChatUserMessage({ message }: { message: UserChatMessage }) { ); } -export function TaskChatTab({ task, projectId, active, addToast, sessionLive, onTaskUpdated, expanded = false, onToggleExpanded, effectiveModels }: TaskChatTabProps) { +export function TaskChatTab({ task, projectId, active, addToast, onTaskUpdated, expanded = false, onToggleExpanded, effectiveModels }: TaskChatTabProps) { const { t } = useTranslation("app"); const { entries, loading, loadMore, hasMore, loadingMore } = useAgentLogs(task.id, active, projectId); const [draft, setDraft] = useState(""); @@ -575,21 +517,11 @@ export function TaskChatTab({ task, projectId, active, addToast, sessionLive, on const transcriptItems = useMemo(() => buildTranscriptItems(entries, userMessages, t), [entries, t, userMessages]); const transcriptItemCount = entries.length + userMessages.length; const firstEntryKey = entries[0] ? getEntryKey(entries[0], 0) : null; - const activeSession = isActiveAgentSession(task, { sessionLive }); const isDoneTask = task.column === "done"; - const isIdleSession = !isDoneTask && !activeSession; /** - * FNXC:TaskDetailChat 2026-06-19-22:54: - * The task-detail chat must never silently accept a question when no agent session will consume it. Keep idle chats sendable, but surface that the message is saved as guidance for the next task run instead of implying a live reply. - * - * FNXC:TaskDetailChat 2026-06-22-21:20: - * The idle "No agent is working on this task right now…" hint is suppressed (empty) per user request — idle chats stay sendable but no longer show the banner. Done/active hints remain. The render gates on a truthy sessionHint, so the empty idle case renders nothing. + * FNXC:TaskDetailChat 2026-06-24-00:00: + * The task-detail chat composer must not render guidance above the entry box in active, idle, or done states. Keep the action-specific copy in the textarea placeholder so the composer remains compact while send/refinement behavior stays unchanged. */ - const sessionHint = isDoneTask - ? t("taskChat.doneSessionHint", "Send a message to start a refinement task for this completed task.") - : activeSession - ? t("taskChat.activeSessionHint", "Message the active agent session. Guidance is delivered to the running session in real time.") - : ""; const composerPlaceholder = isDoneTask ? t("taskChat.donePlaceholder", "Start a refinement task for this completed task") : t("taskChat.activePlaceholder", "Steer the currently executing agent"); @@ -927,15 +859,6 @@ export function TaskChatTab({ task, projectId, active, addToast, sessionLive, on
- {sessionHint ? ( -
- {sessionHint} -
- ) : null}