Files
fusion/packages/dashboard/app/lib
gsxdsm 32e8bbe459 FN-7612: fix off-by-one step number mismatch between task dialog and Activity tab
Introduces a single canonical step-number helper so the task-dialog step indicators agree with the Activity tab for the same underlying step.

- Add `getCanonicalStepNumber()` in `packages/dashboard/app/lib/step-display.ts`, returning the raw 0-based, PROMPT.md-numbered step index (Step 0 = Preflight), clamped to a valid range.
- Update `ActiveAgentsPanel` to derive its step/total-steps display from the new helper instead of adding its own +1 to `task.currentStep`.
- Update `TaskTokenStatsPanel`'s step-progress row to use the same canonical helper instead of its own +1 math.
- Add regression tests (`step-number-alignment.test.tsx`) asserting the task-dialog and Activity-tab step numbers stay in sync across surfaces.

Files changed:
 .../dashboard/app/components/ActiveAgentsPanel.tsx |   8 +-
 .../app/components/TaskTokenStatsPanel.tsx         |   7 +-
 .../__tests__/step-number-alignment.test.tsx       | 162 +++++++++++++++++++++
 packages/dashboard/app/lib/step-display.ts         |  57 ++++++++
 4 files changed, 229 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7612

Fusion-Task-Lineage: a33703f5-32cb-4d10-9153-399821517ea3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-06 19:03:06 -07:00
..