From 4ab4aae02e8c54c96c3b291f07d4a95e446329a5 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 30 Jun 2026 23:24:35 -0700 Subject: [PATCH] FN-7344: replace Activity subtabs with a dropdown Replace the task detail Activity subtab strip with a compact selector while keeping legacy routing intact. - Swap the Live, Feed, and Raw Logs segmented control for an Activity view dropdown. - Preserve legacy Activity segment ids and initial-tab routing for Live, Feed, and Raw views. - Update Activity styling, coverage, and the published CLI changeset for the dropdown behavior. Files changed: .changeset/fn-7344-activity-dropdown.md | 7 ++ .../dashboard/app/components/TaskDetailModal.css | 63 +++--------------- .../dashboard/app/components/TaskDetailModal.tsx | 56 +++++++--------- .../TaskDetailModal.attachments-and-tabs.test.tsx | 76 ++++++++++++---------- .../__tests__/TaskDetailModal.css.test.ts | 10 +-- ...lModal.inline-editing-and-integrations.test.tsx | 2 +- ...skDetailModal.models-progress-workflow.test.tsx | 12 ++-- .../__tests__/TaskDetailModal.rendering.test.tsx | 2 +- ...etailModal.responsive-and-dependencies.test.tsx | 43 +++++------- .../TaskDetailModal.task-activity-chat.test.tsx | 39 ++++++----- .../components/__tests__/TaskDetailModal.test.tsx | 28 ++++---- 11 files changed, 153 insertions(+), 185 deletions(-) Fusion-Task-Id: FN-7344 Fusion-Task-Lineage: cb609122-d9b6-4ef2-9cf0-35130c3dcffc Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-7344-activity-dropdown.md | 7 ++ .../app/components/TaskDetailModal.css | 63 +++------------ .../app/components/TaskDetailModal.tsx | 56 ++++++-------- ...kDetailModal.attachments-and-tabs.test.tsx | 76 +++++++++++-------- .../__tests__/TaskDetailModal.css.test.ts | 10 +-- ...l.inline-editing-and-integrations.test.tsx | 2 +- ...ailModal.models-progress-workflow.test.tsx | 12 ++- .../TaskDetailModal.rendering.test.tsx | 2 +- ...Modal.responsive-and-dependencies.test.tsx | 41 ++++------ ...askDetailModal.task-activity-chat.test.tsx | 39 +++++----- .../__tests__/TaskDetailModal.test.tsx | 28 ++++--- 11 files changed, 152 insertions(+), 184 deletions(-) create mode 100644 .changeset/fn-7344-activity-dropdown.md diff --git a/.changeset/fn-7344-activity-dropdown.md b/.changeset/fn-7344-activity-dropdown.md new file mode 100644 index 0000000000..572e88481c --- /dev/null +++ b/.changeset/fn-7344-activity-dropdown.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Replace task Activity subtabs with a compact Live, Feed, Raw dropdown. +category: fix +dev: Keeps legacy Activity segment ids and initial-tab routing while removing the old segmented-control shell. diff --git a/packages/dashboard/app/components/TaskDetailModal.css b/packages/dashboard/app/components/TaskDetailModal.css index 74287242d2..263e38987b 100644 --- a/packages/dashboard/app/components/TaskDetailModal.css +++ b/packages/dashboard/app/components/TaskDetailModal.css @@ -2434,13 +2434,10 @@ FNXC:TaskDetailTabs 2026-06-26-00:35: font-weight: 600; } -/* === Activity Segmented Control === */ +/* === Activity View Selector === */ /* -FNXC:TaskDetailActivity 2026-06-30-23:55: -The Activity top-level tab owns Live (internal `current`), Feed, and Raw Logs as an in-content segmented control. Keep this selector visually quieter than the top-level tab strip and horizontally reachable on narrow modal and embedded task-detail surfaces; the Activity-wide expand control must sit beside it on every segment. - -FNXC:TaskDetailActivity 2026-06-30-12:00: -Selected Activity segments must stay the same height as inactive siblings while using a slightly smaller label. Keep sizing on the base segment contract so visual active-state styling cannot alter the Live/Feed/Raw Logs row height. +FNXC:TaskDetailActivity 2026-06-30-15:50: +The Activity top-level tab owns Live (internal `current`), Feed, and Raw as one dropdown rather than in-content subtabs. Keep the selector compact and token-styled on desktop/mobile, with the Activity-wide expand control beside it on every view. */ .activity-toolbar { display: flex; @@ -2450,54 +2447,13 @@ Selected Activity segments must stay the same height as inactive siblings while margin-bottom: var(--space-md); } -.activity-segmented-control { - display: inline-flex; - max-inline-size: 100%; - gap: 0; - background: var(--card); - border: var(--border-width) solid var(--border); - border-radius: var(--radius-md); - padding: calc(var(--space-xs) / 4); - overflow-x: auto; - overflow-y: hidden; - overscroll-behavior-inline: contain; - touch-action: pan-x pan-y; - -webkit-overflow-scrolling: touch; - scrollbar-width: thin; -} - -.activity-segment { - box-sizing: border-box; - flex: 0 0 auto; +.activity-view-select { + min-inline-size: calc(var(--space-2xl) + var(--space-xl) + var(--space-lg)); min-block-size: var(--space-2xl); - padding: calc(var(--space-xs) / 2) var(--space-md); - background: none; - border: none; - border-radius: var(--radius-sm); - color: var(--text-muted); - cursor: pointer; - font-size: var(--font-size-xs); - font-weight: 500; + padding-block: calc(var(--space-xs) / 2); + padding-inline: var(--space-sm) var(--space-xl); + font-size: var(--font-size-sm); line-height: var(--line-height-tight); - font-family: inherit; - touch-action: pan-x pan-y; - transition: color var(--transition-fast), background var(--transition-fast); -} - -.activity-segment:hover { - color: var(--text); - background: var(--card-hover); -} - -.activity-segment:focus-visible { - outline: none; - box-shadow: var(--focus-ring-strong); -} - -.activity-segment-active { - color: var(--text); - background: var(--surface); - box-shadow: var(--shadow-sm); } .activity-expand-toggle { @@ -2524,8 +2480,9 @@ Selected Activity segments must stay the same height as inactive siblings while align-items: stretch; } - .activity-segmented-control { + .activity-view-select { flex: 1 1 auto; + min-inline-size: 0; } .activity-expand-toggle { diff --git a/packages/dashboard/app/components/TaskDetailModal.tsx b/packages/dashboard/app/components/TaskDetailModal.tsx index 530710ff4d..70b6fe9781 100644 --- a/packages/dashboard/app/components/TaskDetailModal.tsx +++ b/packages/dashboard/app/components/TaskDetailModal.tsx @@ -1,5 +1,5 @@ import "./TaskDetailModal.css"; -import React, { Suspense, lazy, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react"; +import React, { Suspense, lazy, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { Pencil, Bot, X, ChevronDown, ChevronRight, GitBranch, ArrowLeft, Zap, Loader2, AlertTriangle, Sparkles, Maximize2, Minimize2 } from "lucide-react"; import { useModalResizePersist } from "../hooks/useModalResizePersist"; @@ -213,6 +213,9 @@ The first Activity segment keeps the stable internal `current` id for legacy seg FNXC:TaskDetailActivity 2026-06-30-23:55: The first Activity segment is user-facing Live while legacy internals remain `current` and explicit `initialTab="chat"` continues landing there for compatibility. + +FNXC:TaskDetailActivity 2026-06-30-15:50: +Activity view switching uses one dropdown labeled for Live, Feed, and Raw while retaining the internal `current`, `feed`, and `raw-logs` segment ids. Legacy `chat` and `logs` initial-tab routing remains compatible so older links still open Activity → Live or Activity → Feed. */ function resolveDefaultTab(initialTab: TabId | undefined, column: ColumnId, taskDetailChatFirst = false): TabId { if (initialTab === "retries") { @@ -548,6 +551,7 @@ export function TaskDetailContent({ workflowFieldDefs: workflowFieldDefsProp, }: TaskDetailContentProps) { const { t } = useTranslation("app"); + const activitySelectorId = useId(); const columnLabel = useColumnLabel(); const fileBrowser = useFileBrowser(); const [activeTab, setActiveTab] = useState(() => resolveDefaultTab(initialTab, task.column, taskDetailChatFirst)); @@ -3412,41 +3416,29 @@ export function TaskDetailContent({
{/* FNXC:TaskDetailPlannerChat 2026-06-30-22:30: - Activity owns the existing steering/current view, Feed, and Raw Logs inside one segmented control. The stable Activity tab id remains `chat`, legacy `logs` callers land on Feed, and Raw Logs is the only segment that enables raw agent-log fetching. Planner-model conversation belongs to the separate `planner-chat` tab and must not route into steering comments. + Activity owns the existing steering/current view, Feed, and raw agent logs inside one compact selector. The stable Activity tab id remains `chat`, legacy `logs` callers land on Feed, and Raw is the only selector option that enables raw agent-log fetching. Planner-model conversation belongs to the separate `planner-chat` tab and must not route into steering comments. FNXC:TaskDetailActivity 2026-06-30-23:55: - The first Activity segment is user-facing Live but keeps the legacy `current` segment id. Activity expansion is segment-wide, so the same reachable toggle must remain present on Live, Feed, and Raw Logs without fetching Raw Logs outside the Raw Logs segment. + The first Activity segment is user-facing Live but keeps the legacy `current` segment id. Activity expansion is segment-wide, so the same reachable toggle must remain present on Live, Feed, and Raw without fetching Raw outside the Raw segment. + + FNXC:TaskDetailActivity 2026-06-30-15:50: + Replacing the in-content subtabs with a native dropdown removes the horizontal tab shell on mobile while preserving keyboard operation and the legacy Activity segment ids (`current`, `feed`, `raw-logs`). */}
-
- - - -
+ +