Files
fusion/packages/dashboard/app/components/__tests__/TaskDetailModal.github-tracking-header.test.tsx
gsxdsm 254e97da74 FN-7306: rename task-detail Chat tab to Activity
Renames the existing task-detail activity surface while preserving the stable chat tab id.

- Move the Activity tab to the first task-detail position and make it the default for every task state.
- Keep `chat` as the compatibility tab id for modal callers, plugin APIs, and deep links.
- Update task-detail tests and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7306-task-detail-activity-tab.md     |  7 +++
 .../dashboard/app/components/TaskDetailModal.tsx   | 35 ++++++-------
 .../TaskDetailModal.attachments-and-tabs.test.tsx  | 57 +++++++++++-----------
 .../TaskDetailModal.definition-actions.test.tsx    | 24 ++++-----
 ...TaskDetailModal.github-tracking-header.test.tsx |  2 +-
 .../TaskDetailModal.github-tracking-stale.test.tsx |  2 +-
 ...lModal.inline-editing-and-integrations.test.tsx |  4 +-
 ...skDetailModal.models-progress-workflow.test.tsx |  2 +-
 .../__tests__/TaskDetailModal.rendering.test.tsx   |  4 +-
 ...etailModal.responsive-and-dependencies.test.tsx |  6 +--
 .../__tests__/TaskDetailModal.summary-tab.test.tsx | 33 ++++++++-----
 .../components/__tests__/TaskDetailModal.test.tsx  |  4 +-
 packages/dashboard/app/hooks/useModalManager.ts    |  4 ++
 packages/dashboard/app/plugins/types.ts            |  7 ++-
 14 files changed, 107 insertions(+), 84 deletions(-)

Fusion-Task-Id: FN-7306
Fusion-Task-Lineage: c905134c-de74-4c46-9c5a-d3fbc8200093
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 14:58:07 -07:00

49 lines
2.3 KiB
TypeScript

/*
FNXC:TaskDetailTabs 2026-06-17-08:20:
FN-7306 labels the stable internal `chat` tab as Activity and keeps it as the default TaskDetailModal tab. Tests that assert Definition-only sections must opt into `initialTab="definition"` so they verify the intended surface instead of the Activity landing state.
*/
import { describe, expect, it } from "vitest";
import { render, screen } from "@testing-library/react";
import { loadAllAppCss } from "../../test/cssFixture";
import { TaskDetailModal } from "../TaskDetailModal";
import { makeTask, noop, noopDelete, noopMerge, noopMove, noopOpenDetail, setupTaskDetailModalHooks } from "./TaskDetailModal.test-helpers";
setupTaskDetailModalHooks();
describe("FN-4224 GitHub tracking header layout", () => {
it("keeps the summary, enable action, and disclosure toggle on one row across desktop and mobile CSS", () => {
render(
<TaskDetailModal
initialTab="definition"
task={makeTask({
column: "todo",
githubTracking: { enabled: false },
})}
onClose={noop}
onMoveTask={noopMove}
onDeleteTask={noopDelete}
onMergeTask={noopMerge}
onOpenDetail={noopOpenDetail}
addToast={noop}
/>,
);
expect(screen.getByText("GitHub tracking")).toBeInTheDocument();
expect(screen.getByText("Tracking is currently disabled")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Enable GitHub tracking" })).toHaveTextContent("Enable");
expect(screen.getByRole("button", { name: "Expand GitHub tracking details" })).toBeInTheDocument();
const css = loadAllAppCss();
expect(css).toMatch(
/\.detail-github-tracking-section\s+\.detail-source-header\s*\{[^}]*flex-wrap:\s*nowrap;[^}]*align-items:\s*center;[^}]*min-width:\s*0;/,
);
expect(css).toMatch(
/\.detail-github-tracking-section\s+\.detail-source-summary\s*\{[^}]*flex:\s*1 1 auto;[^}]*flex-wrap:\s*nowrap;[^}]*min-width:\s*0;/,
);
expect(css).toMatch(
/@media[^{]*\(max-width:\s*768px\)[^{]*\{[\s\S]*?\.detail-github-tracking-section\s+\.detail-source-header\s*\{[^}]*flex-wrap:\s*nowrap;[^}]*min-width:\s*0;[^}]*\}[\s\S]*?\.detail-github-tracking-section\s+\.detail-source-summary\s*\{[^}]*flex:\s*1 1 auto;[^}]*flex-wrap:\s*nowrap;[^}]*min-width:\s*0;[^}]*\}/,
);
});
});