gsxdsm
937650472a
FN-7820: add Cost tab to task detail and optional card cost badge
Adds a shared cost-derivation utility and surfaces token/cost info in a new Cost tab on the task detail modal, plus an opt-in per-card cost badge on the board.
- Extract token-cost calculation into a shared taskTokenCost helper (read-time costFor derivation) reused by the Summary tab, new Cost tab, and card badge
- Add TaskDetailModal Cost tab (TaskCostTab.tsx/.css) showing cost breakdown for a task
- Simplify TaskSummaryTab by delegating cost math to the shared helper
- Add default-off project setting showCostBadgeOnCards (settings-schema.ts, types.ts) with a SettingsModal/AppearanceSection toggle
- Add CostBadgeContext to thread the setting into TaskCard without prop drilling
- Show an optional cost badge on TaskCard when the setting is enabled
- Update i18n strings across en/es/fr/ko/zh-CN/zh-TW locales
- Update docs (dashboard-guide.md, settings-reference.md) and add changeset fn-7820-cost-tab-and-card-badge.md
Files changed:
.changeset/fn-7820-cost-tab-and-card-badge.md | 7 ++
docs/dashboard-guide.md | 4 +
docs/settings-reference.md | 1 +
.../core/src/__tests__/settings-defaults.test.ts | 13 ++
packages/core/src/settings-schema.ts | 5 +
packages/core/src/types.ts | 5 +
packages/dashboard/app/App.tsx | 5 +
.../dashboard/app/components/SettingsModal.tsx | 6 +
packages/dashboard/app/components/TaskCard.css | 7 +-
packages/dashboard/app/components/TaskCard.tsx | 27 +++-
packages/dashboard/app/components/TaskCostTab.css | 51 ++++++++
packages/dashboard/app/components/TaskCostTab.tsx | 91 ++++++++++++++
.../dashboard/app/components/TaskDetailModal.tsx | 14 ++-
.../dashboard/app/components/TaskSummaryTab.tsx | 123 +-----------------
.../app/components/__tests__/TaskCard.test.tsx | 81 +++++++++++-
.../app/components/__tests__/TaskCostTab.test.tsx | 55 ++++++++
.../TaskDetailModal.attachments-and-tabs.test.tsx | 11 +-
.../settings/sections/AppearanceSection.tsx | 8 ++
.../sections/__tests__/AppearanceSection.test.tsx | 20 +++
.../settings-default-descriptions.test.tsx | 1 +
.../dashboard/app/context/CostBadgeContext.tsx | 19 +++
packages/dashboard/app/hooks/useAppSettings.ts | 15 +++
.../app/utils/__tests__/taskTokenCost.test.ts | 62 +++++++++
packages/dashboard/app/utils/taskTokenCost.ts | 139 +++++++++++++++++++++
packages/i18n/locales/en/app.json | 29 ++++-
packages/i18n/locales/es/app.json | 30 ++++-
packages/i18n/locales/fr/app.json | 27 +++-
packages/i18n/locales/ko/app.json | 30 ++++-
packages/i18n/locales/zh-CN/app.json | 30 ++++-
packages/i18n/locales/zh-TW/app.json | 30 ++++-
30 files changed, 789 insertions(+), 157 deletions(-)
Fusion-Task-Id: FN-7820
Fusion-Task-Lineage: d33c5678-a68c-4b29-9db1-8ff0369dfd72
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 18:07:00 -07:00
..
2026-07-11 18:07:00 -07:00
2026-05-13 10:00:00 -07:00
2026-05-04 21:21:22 -07:00
2026-07-06 19:03:06 -07:00
2026-06-29 21:02:34 -07:00
2026-07-01 11:12:59 -07:00
2026-07-01 07:33:56 -07:00
2026-06-30 18:15:10 -07:00
2026-04-30 22:55:48 -07:00
2026-06-22 15:23:43 -07:00
2026-05-14 02:23:45 -07:00
2026-05-18 03:10:52 -07:00
2026-05-21 08:43:57 -07:00
2026-06-27 17:22:12 -07:00
2026-06-25 12:25:13 -07:00
2026-05-22 17:24:38 -07:00
2026-05-12 21:55:43 -07:00
2026-06-14 13:50:17 -07:00
2026-04-08 16:14:32 -07:00
2026-06-27 23:53:51 -07:00
2026-04-23 00:06:03 -07:00
2026-04-02 09:58:04 -07:00
2026-06-14 14:27:45 -07:00
2026-07-04 21:28:19 -07:00
2026-06-26 09:32:53 -07:00
2026-04-23 23:02:36 -07:00
2026-04-03 18:33:23 -07:00
2026-05-08 18:44:16 -07:00
2026-06-30 19:21:53 -07:00
2026-04-29 07:10:52 -07:00
2026-06-27 23:47:21 -07:00
2026-06-28 02:04:31 -07:00
2026-07-10 22:25:21 -07:00
2026-04-08 14:38:36 -07:00
2026-06-02 14:14:24 -07:00
2026-07-08 00:14:52 -07:00
2026-07-02 11:38:31 -07:00
2026-07-11 18:07:00 -07:00
2026-06-17 17:57:19 -07:00
2026-05-21 08:43:57 -07:00
2026-05-20 20:27:11 -07:00
2026-05-07 18:35:45 -07:00
2026-05-14 18:35:30 -07:00
2026-07-02 23:53:26 -07:00
2026-05-14 05:55:16 -07:00
2026-05-19 18:56:24 -07:00
2026-06-14 13:50:17 -07:00
2026-06-29 14:59:16 -07:00
2026-07-05 11:31:46 -07:00
2026-05-13 06:29:35 -07:00
2026-04-12 07:00:49 -07:00
2026-05-15 07:50:34 -07:00
2026-07-11 18:07:00 -07:00
2026-07-08 15:09:26 -07:00
2026-04-28 22:43:51 -07:00
2026-05-29 20:05:14 -07:00
2026-04-29 07:10:52 -07:00