diff --git a/.changeset/fn-7195-model-name-wrap.md b/.changeset/fn-7195-model-name-wrap.md new file mode 100644 index 0000000000..9116a3266b --- /dev/null +++ b/.changeset/fn-7195-model-name-wrap.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Keep Summary token table model names readable in narrow task detail panels. +category: fix +dev: Adds token-table CSS min-width and wrap-contract regression coverage for right-dock layouts. diff --git a/packages/dashboard/app/components/TaskDetailModal.css b/packages/dashboard/app/components/TaskDetailModal.css index 39390439ad..e344a9d709 100644 --- a/packages/dashboard/app/components/TaskDetailModal.css +++ b/packages/dashboard/app/components/TaskDetailModal.css @@ -1645,6 +1645,9 @@ The done-task Summary tab is a scrollable overview composed from existing detail /* FNXC:TaskDetailSummaryTokenCost 2026-06-27-00:00: The done-task Summary token-cost section must reuse task-summary card hierarchy while showing per-model counts and cost without hardcoded colors or spacing. Mobile converts table rows to stacked cards so the modal and right dock do not trap horizontal scrolling. + +FNXC:TaskDetailSummaryTokenCost 2026-06-28-00:00: +The desktop table needs a token-scale min-width and non-anywhere model-name wrapping so narrow right-dock containers scroll horizontally instead of collapsing MODEL values to one character per line. */ .task-summary-token-table-wrap { width: 100%; @@ -1653,6 +1656,7 @@ The done-task Summary token-cost section must reuse task-summary card hierarchy .task-summary-token-table { width: 100%; + min-width: calc(var(--space-2xl) * 16); border-collapse: collapse; color: var(--text); } @@ -1693,7 +1697,8 @@ The done-task Summary token-cost section must reuse task-summary card hierarchy } .task-summary-model-label span:last-child { - overflow-wrap: anywhere; + overflow-wrap: normal; + word-break: normal; } .task-summary-cost-unavailable { @@ -1801,6 +1806,7 @@ The done-task Summary token-cost section must reuse task-summary card hierarchy .task-summary-token-table th, .task-summary-token-table td { display: block; + min-width: 0; } .task-summary-token-table thead { diff --git a/packages/dashboard/app/components/__tests__/TaskDetailModal.summary-tab.test.tsx b/packages/dashboard/app/components/__tests__/TaskDetailModal.summary-tab.test.tsx index 13733099a5..9559fae944 100644 --- a/packages/dashboard/app/components/__tests__/TaskDetailModal.summary-tab.test.tsx +++ b/packages/dashboard/app/components/__tests__/TaskDetailModal.summary-tab.test.tsx @@ -387,9 +387,20 @@ describe("TaskDetailModal Summary tab", () => { it("keeps token-cost summary styling responsive without hardcoded colors", () => { const css = readDashboardStylesSource(); + const tokenTableRule = css.match(/\.task-summary-token-table\s*\{[^}]*\}/)?.[0] ?? ""; + const modelNameRule = css.match(/\.task-summary-model-label span:last-child\s*\{[^}]*\}/)?.[0] ?? ""; + const mobileTokenBlock = css.slice(css.indexOf("@media (max-width: 768px)"), css.indexOf("/* Spec tab layout")); + expect(css).toContain(".task-summary-token-table"); + expect(tokenTableRule).toMatch(/min-width:\s*calc\(var\(--space-2xl\)\s*\*\s*16\)/); + expect(modelNameRule).toContain("overflow-wrap: normal"); + expect(modelNameRule).toContain("word-break: normal"); + expect(modelNameRule).not.toContain("overflow-wrap: anywhere"); expect(css).toContain("@media (max-width: 768px)"); - expect(css).toContain(".task-summary-token-table td::before"); + expect(mobileTokenBlock).toContain(".task-summary-token-table-wrap"); + expect(mobileTokenBlock).toContain("overflow-x: visible"); + expect(mobileTokenBlock).toContain(".task-summary-token-table td::before"); + expect(mobileTokenBlock).toContain("min-width: 0"); expect(css).toContain("var(--color-warning)"); expect(css).not.toMatch(/task-summary-token[^{}]*#[0-9a-fA-F]{3,8}/); });