Show full-fidelity model token breakdowns in Command Center while keeping Overview compact.
- Remove the Tokens detail chart cap so bars, pies, and tables include every analytics model bucket.
- Keep Overview model summaries explicitly limited to the top consumers with a named cap.
- Add dashboard coverage and docs for full Tokens attribution versus Overview summaries.
- Add a patch changeset for the published CLI bundle.
Files changed:
.changeset/fn-7117-tokens-by-model.md | 7 ++
docs/dashboard-guide.md | 5 +-
.../components/command-center/CommandCenter.tsx | 8 ++-
.../__tests__/CommandCenter.test.tsx | 78 +++++++++++++++++++++-
.../components/command-center/areas/TokensArea.tsx | 38 ++++++-----
.../areas/__tests__/TokensArea.test.tsx | 68 +++++++++++++++++++
6 files changed, 182 insertions(+), 22 deletions(-)
Fusion-Task-Id: FN-7117
Fusion-Task-Lineage: 7bf4c090-1054-40d0-97bf-e0e495077af5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Backfill resolved pi session models so token analytics can show every model bucket.\n\n- Mirror explicit model overrides onto sessions that do not expose a model snapshot.\n- Cover multi-model token grouping totals and Command Center pie/table rendering.\n- Add a patch changeset for the dashboard token breakdown fix.\n\nFiles changed:\n .changeset/tidy-token-model-buckets.md | 7 ++++++\n .../core/src/__tests__/token-analytics.test.ts | 5 ++++\n .../areas/__tests__/TokensArea.test.tsx | 5 ++++\n .../src/__tests__/pi-create-fn-agent.test.ts | 28 ++++++++++++++++++++++\n packages/engine/src/pi.ts | 10 +++++++-\n 5 files changed, 54 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-7075
Fusion-Task-Lineage: 5f026435-5c3c-4e83-aab4-c1d7a487685a
Split the oversized Command Center area test suite into focused files while preserving shared fixtures and coverage.
- Extract shared date ranges, fixtures, and helpers into areas.test-harness.tsx.
- Move GitHub and Signals area assertions into a dedicated sibling suite.
- Keep the remaining areas.test.tsx below the 2000-line cap with existing coverage intact.
Files changed:
.../areas/__tests__/areas.github-signals.test.tsx | 406 +++++++++++++
.../areas/__tests__/areas.test-harness.tsx | 302 ++++++++++
.../command-center/areas/__tests__/areas.test.tsx | 648 +--------------------
3 files changed, 730 insertions(+), 626 deletions(-)
Fusion-Task-Id: FN-7044
Fusion-Task-Lineage: 63886ec9-e9c3-410e-bbc6-c5116cddb168
- Double-commit race: null pendingValueRef synchronously at commit() start
so the close-flush + unmount-cleanup guards can't both fire and send a
duplicate PUT for the same value.
- Clamp ceiling: clamp setValue against max(SLIDER_BASE_MAX, currentValue)
instead of Number(raw) (which had no effective upper bound for
programmatic callers).
- Out-of-band staleness: force-revalidate on each activate so a Settings-modal
save (which writes globalMaxConcurrent directly, bypassing this store) is
reflected when a slider surface reopens.
- Load-error label: add an explicit error branch in both EngineControlMenu
and CommandCenterControls so a failed initial load shows "Load failed"
instead of "Ready" while the slider is disabled.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a "Global Max Concurrent" slider to the footer engine menu and the
Command Center Concurrency card, and group the Scheduling settings by
Global vs Project scope so the global cap isn't mistaken for a per-project
setting (clearer on mobile).
Both sliders are backed by a single shared `useGlobalConcurrency` hook
(module-level store) so they read/write one source of truth and revalidate
after every PUT /api/global-concurrency — fixing the last-writer-wins and
stale-clobber races a per-component cache would cause. The hook treats a
fetch error as non-interactive (slider disabled, not stuck at 1), surfaces
a save-state indicator, and flushes a pending edit on menu close / unmount
so a quick drag-then-dismiss is never silently dropped.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Command Center analytics now honor picker presets and open-ended date bounds.\n\n- Serialize All time with an explicit upper bound and preserve one-sided custom/preset query params.\n- Resolve server analytics ranges as open windows for from-only and to-only requests instead of defaulting them away.\n- Cover picker query serialization and range-consuming Command Center endpoints with regression tests.\n- Document the restored picker contract and add a patch changeset.\n\nFiles changed:\n .changeset/fn-7019-command-center-range.md | 7 ++\n docs/dashboard-guide.md | 3 +-\n .../components/command-center/DateRangePicker.tsx | 12 ++-\n .../command-center/areas/__tests__/areas.test.tsx | 54 ++++++++++++-\n .../components/command-center/areas/areaShared.ts | 8 +-\n .../register-command-center-routes.test.ts | 92 +++++++++++++++++++++-\n .../src/routes/register-command-center-routes.ts | 28 ++++---\n 7 files changed, 183 insertions(+), 21 deletions(-)
Fusion-Task-Id: FN-7019
Fusion-Task-Lineage: 327f8f45-8ad8-4103-8cc4-efcf2af6a73a
Fixes ~19 deterministic dashboard test failures pre-existing on origin/main
(non-blocking full-suite lane). Mix of real product fixes and stale-test
reconciliation; no appeasement (no widened timeouts, skips, or weakened
assertions).
Product CSS fixes (real regressions the guards caught):
- Info toast contrast: shadcn-custom light theme had white-on-#0284c7 (4.10,
below WCAG AA 4.5); enrolled it in the light-mode dark-text correction.
- 27 undefined CSS token references (typos/foreign tokens) renamed to canonical
defined tokens; defined the genuinely-intended --border-strong and
--right-dock-min/max-width.
- Raw rgba() box-shadow fallback tokenized to color-mix; dev-server mobile
header split into its own responsive rule.
Stale tests reconciled with intentional product changes:
- workflowColumns graduated to always-on (board-workflows unit test).
- workflow optional-steps source re-pointed to v2 optional-group nodes.
- command-center pricing docs (one doc gap filled: openai-codex:* keying).
- SetupWizardModal added detectWorkspace + workspaceMode/taskPrefix payload.
- board-mobile listener-count assertion → unmount no-throw behavior.
- CommandCenterControls / ThemeSelector: default theme relabeled "Fusion Legacy".
- ProjectOverview / WorkflowNodeEditor: header divider intentionally removed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep Command Center token usage surfaces mounted and updated during live analytics polling.
- Preserve existing analytics data while background polls are in flight so token surfaces revalidate without disappearing.
- Add live refresh intervals for Overview and Tokens token-usage data.
- Cover in-place token stat, chart, and model-row updates with Command Center and area tests.
- Add a patch changeset for the published Fusion package.
Files changed:
.changeset/fn-6970-command-center-token-live.md | 7 ++
.../components/command-center/CommandCenter.tsx | 4 +
.../__tests__/CommandCenter.test.tsx | 81 +++++++++++++--
.../components/command-center/areas/AreaShell.tsx | 3 +
.../components/command-center/areas/TokensArea.tsx | 4 +
.../command-center/areas/__tests__/areas.test.tsx | 111 +++++++++++++++++++--
.../command-center/areas/useAnalyticsArea.ts | 12 ++-
7 files changed, 208 insertions(+), 14 deletions(-)
Fusion-Task-Id: FN-6970
Fusion-Task-Lineage: 670bb5ac-bc7d-47d8-abed-ef6748292cc6
Measure Command Center Recharts wrappers directly and keep usable fallback dimensions until lazy dashboard cards report a drawable box. This restores line charts such as Daily activity, Tokens trend, and Activity trend, plus model-share pies that used the same sizing path.
ViewHeader.css defaults now carry the canonical header: space-lg/space-xl padding, surface bg, 1px border-bottom, icon var(--todo), title 1.125rem/600, actions pinned right (margin-left:auto). Removed now-redundant per-view overrides (Agents, Documents doubled divider); converted Secrets from a bespoke header to ViewHeader (Lock icon + Refresh/Add as btn btn-sm); aligned Command Center title metrics. Right-dock/pop-out Secrets hide-selectors retargeted so the dock is unchanged. Chat/Todo (no view title row) and AgentDetail (per-entity header) intentionally left bespoke.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove the Active nodes and Sessions stat cards (data still feeds the activity sparkline). Remaining cards reflow via auto-fill.
- Stat value font scales up to fill the card (container-query cqi clamp, nowrap+overflow:hidden+min-width:0 so long values shrink to fit, never overflow).
- Add space-lg above the View Board/View Agents row so it's balanced below the Start/Stop AI Engine button.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- List view header: count + Bulk Edit + View options + New Task on one compact btn-sm row; view-options shrunk; count compacted/secondary.
- File browser pop-out now opens the file you're currently viewing — current path shared via scoped storage (kb-dashboard-dock-files-current) with cross-instance live-sync.
- Dashboard Overview: View Board / View Agents are now btn btn-secondary (taller, centered) to match the Stop AI Engine button.
- Test suite: fix ~40 stale assertions from the redesign (App nav moved to LeftSidebarNav, Import Tasks embedded, removed Todos in-view header, SkillsView shared ViewHeader, gm embedded keyboard rule, ThemeSelector option drift) — test-only, nothing weakened. Pre-existing board-mobile InlineCreateCard failure left as-is.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- FloatingWindow: reusable non-blocking, draggable, smoothly-resizable window with focus-to-front z-index so multiple coexist (file browser + terminal + several task details open and movable at once).
- Task detail gains a Pop out (Maximize2) button in List + Board; App tracks multiple open floating task-detail windows (dedupe by id).
- New Task dialog is now a floating, draggable, resizable, non-blocking window; all quick-add controls visible without expanding (TaskForm forceMoreOptionsOpen).
- Dashboard Overview: removed the duplicate AI Engine row — View Board / View Agents moved into the first instance (the AI engine card, under Stop AI Engine).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code review (8 reviewers) fixes:
- P1: embedded board task-detail now passes onRequestClose so delete/merge/retry dismiss the panel (no ghost task).
- P1: RightDock + TerminalModal drag handlers add pointercancel + unmount teardown (no leaked document listeners / rAF / stuck userSelect); remove dead onOpenChange prop.
- Planning slot DOM-poll interval now caps (self-cancels on mobile); heartbeat slider persist debounced + mounted-guarded.
- Cleanup: remove dead ViewHeader-migration CSS (Skills/Insights), extract shared GithubIcon, move Activity Log embedded CSS to ActivityLogModal.css, FNXC date-format fixes, AGENTS lazy-view note.
- Update stale RightDock roster tests + LeftSidebarNav 'Compound Eng' test to current behavior.
Live UI tweaks:
- Default load lands on board, never the Command Center Dashboard.
- View Board/View Agents moved to the Command Center Overview tab (under the live-activity strip).
- Heartbeat card full-width with spaced, wrapping controls.
- Dev Server panel scrolls in the dock; ChatView right-pane title takes the full line.
- Files pop-out renders deterministic left-right two-pane.
- Mailbox list pane narrower + narrow by default; Add Goal button height matches the Compound stage button; Memory Working-Memory tab no longer overlaps; Skills view fills full width.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the Command Center AI-engine card's View Board / View Agents shortcuts to sit directly under the engine toggle button (above the heartbeat-speed slider) so they read as engine-card navigation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- TeamArea heartbeat card gains a heartbeat-multiplier slider (mirrors AgentsView: same range/step/presets, persisted via updateSettings) and a View Board / View Agents nav row (onChangeView threaded from CommandCenter <- App handleChangeTaskView).
- Update CC/TeamArea test mocks to export fetchSettings/updateSettings (220 pass).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restore Command Center Activity line charts so their plotted geometry fills the rendered chart box without distorting point markers.
- Measure the rendered SVG dimensions and use them as the line chart viewBox so paths span wide desktop and mobile layouts.
- Preserve safe bounded geometry for zero, single-point, NaN, and resized chart states.
- Update Command Center chart tests and dashboard rendering guidance for the fill-width/circular-marker invariant.
Files changed:
docs/dashboard-guide.md | 2 +-
.../command-center/__tests__/charts.test.tsx | 71 ++++++++++++++---
.../command-center/areas/__tests__/areas.test.tsx | 35 ++++++---
.../components/command-center/charts/LineChart.tsx | 89 ++++++++++++++++++----
.../components/command-center/charts/charts.css | 4 +-
5 files changed, 164 insertions(+), 37 deletions(-)
Fusion-Task-Id: FN-6883
Fusion-Task-Lineage: 71c19a62-1a76-455d-92cb-9c22d0613881
Command Center scheduler controls now expose a default slider ceiling of 50 without hiding higher persisted values.
- Set max concurrent tasks, max triage concurrency, and max worktrees sliders to default to a maximum of 50.
- Preserve dynamic slider maxima for persisted settings above 50 so existing out-of-range values remain visible.
- Add regression coverage for persisting 50, in-range slider maxima, and above-range readouts.
Files changed:
.../command-center/CommandCenterControls.tsx | 9 ++-
.../__tests__/CommandCenterControls.test.tsx | 71 +++++++++++++++++++---
2 files changed, 67 insertions(+), 13 deletions(-)
Fusion-Task-Id: FN-6855
Fusion-Task-Lineage: 780d5322-5f3c-4503-9ec7-17716e966961
Render the Command Center Team org chart horizontally when its container has room.
- Measure the Team org-chart viewport and reuse the shared Agents org-chart layout resolver.
- Add horizontal and vertical data-layout styling for Team org-chart roots and children.
- Cover wide, narrow, unmeasured, loading, error, empty, and single-root Team org-chart states.
- Document the Team org-chart horizontal layout behavior.
Files changed:
docs/dashboard-guide.md | 2 +-
.../components/command-center/areas/TeamArea.tsx | 38 ++++++++++-
.../command-center/areas/__tests__/areas.test.tsx | 77 ++++++++++++++++++++++
.../app/components/command-center/areas/areas.css | 36 +++++++++-
4 files changed, 149 insertions(+), 4 deletions(-)
Fusion-Task-Id: FN-6870
Fusion-Task-Lineage: b023788a-a353-4b10-ad68-a661e72e5be6
Many loading states rendered bare "Loading…" text with no spinner
element, and a couple rendered an unstyled `loading-spinner` div with no
matching CSS (invisible). The global spin animation was never broken —
it rotates in Chromium and WebKit — so prior transform-box edits chased
a non-bug, validated only by a string-matching CSS test.
Add a shared <LoadingSpinner> (self-contained animated SVG, no
lucide-react import so it survives partial test mocks) and adopt it
across ~47 loading placeholders so every loading state shows a
consistent animated spinner. Includes a component test that asserts the
svg carries the animate-spin utility.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Command Center concurrency controls now preserve persisted scheduler values and improve mobile slider handling.
- Load concurrency defaults from project settings and display persisted values without clamping the readout.
- Expand range slider maxima when existing settings exceed normal UI bounds while keeping edits bounded.
- Add mobile touch-drag affordance styling and regression coverage for actual values, overflow values, and CSS contracts.
Files changed:
.../command-center/CommandCenterControls.css | 26 +++++++-
.../command-center/CommandCenterControls.tsx | 63 +++++++++++++-----
.../__tests__/CommandCenterControls.test.tsx | 74 +++++++++++++++++++++-
3 files changed, 143 insertions(+), 20 deletions(-)
Fusion-Task-Id: FN-6768
Fusion-Task-Lineage: 2508c2ab-9e57-4d29-934c-828a015bdfe1
Restore the Command Center tablet layout test mock contract so hook refresh calls resolve cleanly.
- Export fetchConfig, fetchSettings, and updateSettings from the tablet test api mock.
- Document why the real useAppSettings hook requires the full api mock surface.
- Preserve task fixture updates for populated productivity metrics.
Files changed:
.../command-center/__tests__/CommandCenter.mobile-scroll.test.tsx | 2 +-
.../command-center/__tests__/CommandCenter.tablet-layout.test.tsx | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
Fusion-Task-Id: FN-6754
Fusion-Task-Lineage: 5c5955e3-7b23-4fb3-baf5-4ba9dcfeef2e
Command Center token totals now shrink to fit instead of wrapping digit groups.
- Add inline-size containers around stat cards and live metrics for container-query scaling.
- Replace digit wrapping with nowrap overflow clipping and clamp-based numeric font sizes.
- Strengthen Command Center tests for exact live metric values and CSS no-wrap shrink contracts.
Files changed:
.../app/components/command-center/CommandCenter.css | 17 ++++++++++++-----
.../command-center/__tests__/CommandCenter.test.tsx | 3 ++-
.../CommandCenter.token-validity.css.test.ts | 19 +++++++++++++++----
3 files changed, 29 insertions(+), 10 deletions(-)
Fusion-Task-Id: FN-6784
Fusion-Task-Lineage: dfe165f4-7304-49eb-b46b-83c0a9e2c4a3
Three failures in the non-blocking Full Suite:
- CommandCenter mobile-scroll / tablet-layout regression tests rendered with
productivity fixtures missing the `hoursSaved` field added in FN-6721. That
made ProductivityArea throw on `data.hoursSaved.unavailable`, an uncaught
exception that crashed the CommandCenter render (no `command-center` testid)
and polluted the shared worker, causing collateral QuickEntryBox failures.
Add `hoursSaved` to both fixtures.
- github-tracking-delete route test failed intermittently with
`ENOTEMPTY: ... rmdir '.../.fusion'` because the fire-and-forget delete
handler can write into `.fusion` while afterEach removes the temp dir. Make
rm tolerant via maxRetries/retryDelay.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Surface selected-range session totals in the Command Center overview stat grid.
- Add a Sessions stat card backed by existing ActivityAnalytics data.
- Keep Overview populated when sessions are the only activity and default missing session values to zero.
- Cover populated, zero, omitted, and empty Overview session states in tests.
- Document the Overview sessions metric source in the dashboard guide.
Files changed:
docs/dashboard-guide.md | 2 +-
.../components/command-center/CommandCenter.tsx | 10 +++-
.../__tests__/CommandCenter.test.tsx | 53 ++++++++++++++++++++++
3 files changed, 62 insertions(+), 3 deletions(-)
Fusion-Task-Id: FN-6718
Fusion-Task-Lineage: 5e41d3dc-2f69-48e0-aceb-848cb111ea3b