Two related dashboard fixes.
1. Card timer mismatch: the board card timer chip showed only workflow
runtime (e.g. <1m on FN-2716) while the task detail Stats panel
reported "Total execution time" of 7m+ for the same task. Cause —
the slim board listing strips `task.log` to keep payloads small, so
the card's client-side `[timing]` log scan returned 0. Now the slim
path aggregates `[timing] … in <N>ms` durations server-side into a
new `task.timedExecutionMs` field before stripping the log; the
card prefers this aggregate, falling back to the client scan when
the full log is loaded (TaskDetailModal). Wire payload stays slim.
2. View Changes diff modal: defaulted to `90vw × 80vh` and was not
user-resizable. Switched to `min(95vw, 2200px) × min(90vh, ...)`
default with `resize: both`, persisted via useModalResizePersist
(`fusion:changes-diff-modal-size`). Mobile keeps fullscreen layout.
Overlay dismiss switched to the shared `useOverlayDismiss` hook so
resize-drags that release on the overlay don't close the modal.
Updated the diff modal's regression tests to match the new constraint
shape (still asserts max-height clamps to viewport via calc()).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The task card timer chip previously fell back through several metrics
(timed duration → workflow runtime → wallclock), so cards showed only a
subset of execution time. For FN-2714 this rendered <1m on the card while
the stats tab reported >2m of workflow runtime.
The chip now reports the sum of [timing]-tagged log events and workflow
step runtime (matching the new "Total execution time" metric in the stats
panel), with live elapsed for in-progress workflow steps. When neither
metric is recorded, the chip is hidden rather than falling back to
wallclock.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Move TaskCard time indicator rendering from the header back into the footer metadata row
- Render timer and files-changed metadata together in the shared footer row layout
- Update timer chip CSS to stay right-aligned with margin-left:auto and prevent shrinking
- Update TaskCard and mobile board tests to assert footer placement and alignment behavior
- Render the countdown timer in the task card header next to metadata for clearer scanning
- Remove legacy footer timer styling and adjust TaskCard structure accordingly
- Update TaskCard unit tests to assert the new timer placement and header behavior
- Expand mobile board tests to validate timer visibility and placement across card states
- Remove token usage badge rendering and compact token formatting from TaskCard
- Drop token usage fields from TaskCard memo equality checks now that the badge is gone
- Delete obsolete TaskCard token badge CSS rules and icon import
- Simplify TaskCard tests by removing token badge assertions and related fixtures
Capture per-session token usage from pi-coding-agent's getSessionStats()
after each promptWithFallback in the executor and merger paths, so
task.tokenUsage populates live during runs and reflects final totals on
done tasks. Previously the executor never read session usage and only
the heartbeat path bumped agent token totals, leaving task.tokenUsage
undefined even after completion.
Stats panel and done-card timing also now reflect live state: the modal
overlays the SSE-updated task prop on top of the one-shot fullDetail
snapshot, in-progress workflow steps contribute live elapsed to the
Workflow runtime metric, and the done card uses Timed duration (matching
the stats tab) with workflow runtime as fallback. Time indicator labels
coarsened to <1m / Nm / Nh / Nd.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add reusable ConfirmDialog component, styles, and useConfirm hook to provide async confirmation flows
- Wire ConfirmProvider at app level and migrate confirm call sites across task, agent, roadmap, plugin, and settings UI actions
- Update modal interaction patterns to support dialog reentry and consistent destructive-action confirmations
- Expand dashboard tests with confirm dialog and hook coverage plus migrated component test assertions
Done task cards now show agent execution time (sum of workflow step
durations) instead of wallclock time from creation to completion, matching
the Workflow runtime metric in the stats tab. Falls back to the previous
wallclock duration when no workflow timing data is available. Formatter
also updated to render sub-minute durations in seconds (e.g., 45.3s, 1m 30s)
to match the stats panel format.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Render a compact token usage indicator in TaskCard footer with accessible labeling and token-aware styling
- Track token usage fields in the TaskCard memo comparator and expose a comparator test helper for regression coverage
- Add TaskCard tests for token usage rendering behavior and comparator invalidation on token usage updates
- Configure runtime plugin Vitest setups with an @fusion/engine source alias for reliable workspace test resolution
- Keep restart integration child_process spawn mocking aligned with execSync-driven merge verification behavior
- Render provider icons on TaskCard model metadata with token-based sizing and spacing
- Add provider icon display in TaskDetailModal for executor, validator, and planning model rows
- Update dashboard styling with reusable provider icon classes and layout tweaks in component CSS
- Expand TaskCard tests to cover provider icon rendering and fallback behavior
- Update TaskCard done-duration calculations to use createdAt as the start baseline for completed tasks
- Refactor TaskCard timer tests to assert against TaskStore-backed timestamps and avoid brittle elapsed-time assumptions
- Cover done-state timer behavior with expanded test scenarios for start/end timestamp combinations
- Remove unused provider code in pi-claude-cli to satisfy lint and keep the full test/build gates green
- Split timer calculation paths so in-progress cards show live elapsed time since entering in-progress
- Make done cards show fixed processing duration from start to completion instead of growing post-completion elapsed time
- Improve timer tooltip and aria-label copy for clearer in-progress and done semantics
- Expand TaskCard tests to cover boundary formatting, fixed done-duration behavior, and stable timer output as time advances
- Add a workflow-failed dot modifier class for failed workflow checks in TaskCard
- Apply ws-warning styling to workflow-origin failed steps while keeping regular failed steps unchanged
- Update TaskCard rendering logic to append the workflow-failed class only for workflow failed items
- Expand TaskCard tests to verify class assignment for regular failed, workflow failed, done, and pending dots
- Refactor TaskCard to compute files-changed metadata once and render it through a shared footer slot
- Render elapsed time chip in the same footer row as file-change metadata when either element is present
- Update TaskCard styles to add a reusable .card-footer-row layout and align the timer chip to the row end
- Add regression coverage asserting files-changed and timer chips coexist in one footer container
- Derive task elapsed time from columnMovedAt with updatedAt/createdAt fallbacks and guard against invalid or future timestamps
- Render a clock-based timer chip on in-progress and done cards with accessible labeling and tooltip metadata
- Add TaskCard styles for the timer row/chip using design tokens, including mobile-size adjustments
- Expand TaskCard tests to cover visibility by column, invalid timestamp suppression, boundary label formatting, and 30s live refresh cadence
Sweep 2 of the styles.css split. Three card-related blocks moved out of the
monolith into co-located component CSS files. styles.css 4488 → 3304
(–1184 lines).
- /* === Cards === */ (583 lines) → new TaskCard.css
- /* === Card Inline Editing === */ (266 lines) → appended to TaskCard.css
- /* === Inline Create Card === */ (342 lines) → new InlineCreateCard.css
Mobile rules for the moved selectors that previously sat in the global mobile
@media block also followed to their respective component CSS files.
Kept global: .dep-dropdown* (4 consumers — InlineCreateCard, NewTaskModal,
TaskDetailModal, TaskForm). Moving without adding imports to the other 3
consumers would silently break their styling.
CSS imports added at TaskCard.tsx:1 and InlineCreateCard.tsx:1. Verified by
visual smoke test against the live dev server (board view + cards render
correctly).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Gate unified progress display in ListView to tasks that are executing or in-progress
- Gate TaskCard progress bar and steps toggle behind the same active-execution visibility rule
- Update ListView and mobile list-card tests to cover hidden progress for non-executing todo tasks
- Expand TaskCard and mobile board tests to assert progress/toggle visibility for executing vs queued states
- Wire priority through task creation and update API payloads for dashboard clients
- Add priority selection to TaskForm, New Task modal, and inline create card with default/reset behavior
- Support priority editing and display in Task Detail modal plus non-default priority badges on task cards
- Extend dashboard styles and component tests to cover priority selectors, rendering, and mobile behavior
The FN-2370 auto-resolved squash (de5dd6f7d) reverted three commits' worth
of refinements to the claude-cli provider because the branch contained
rebased duplicates of commits already on main. The auto-resolver picked
the older side line-by-line and dropped the newer.
Restored:
- /api/models filter logic (was inverted; emptied every model picker)
- Claude Opus 4.7 catalog entry in pi-claude-cli
- Provider card status text and toast messages (no longer claim a restart
is needed — the extension is always-loaded now)
- POST /api/auth/claude-cli returns restartRequired: false
Prevention:
- Regression tests on the /api/models useClaudeCli filter
- scripts/audit-squash-merge.mjs flags duplicate-cherry-pick risk and
touched-file overlap on any squash commit
- AGENTS.md documents the rebase-before-squash rule and requires the
merging agent to run the audit and triage every flagged item itself
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Resolve workflow step names by preferring lookup entries, then workflow result names, then raw step IDs
- Shorten task card workflow phase badges to concise pre-merge/post-merge labels while preserving tooltip context
- Expand TaskCard coverage for phase badge rendering and workflow name fallback behavior when lookup values are blank or missing
- Thread workflow name lookup data from Board into Column, TaskCard, and WorktreeGroup components
- Update unified task progress resolution to prefer workflow lookup names over raw workflow IDs
- Keep fallback behavior for missing lookup entries so progress labels remain stable
- Expand Board, Column, and TaskCard tests to cover lookup-based workflow name rendering
- Extend TaskStore deleteTask with a safe default that blocks deleting tasks still referenced by live dependents
- Add an opt-in removeDependencyReferences path that rewrites dependent tasks atomically before deletion
- Update dashboard API/routes to surface TASK_HAS_DEPENDENTS as a 409 with structured details and a delete query flag
- Add TaskCard/TaskDetailModal confirmation-retry UX plus coverage in core, dashboard route/API, and component tests
- Document the new delete semantics and opt-in behavior in the dashboard API README
- Update TaskCard step toggle label to render "step" when the unified total is 1
- Update TaskDetailModal completion label to use singular/plural based on total step count
- Add regression tests in TaskCard and TaskDetailModal suites to verify singular labels and reject incorrect plural forms
- Tighten existing completion-count assertions to cover singular/plural text expectations
- TaskCard: four catch((err: any) => err.message) promise handlers in
archive/unarchive/delete/move → catch((err) => getErrorMessage(err)).
- InlineCreateCard + QuickEntryBox: .catch((err: any)) model-load handlers
→ getErrorMessage(err) with existing @fusion/core import.
- TerminalModal: drop (navigator as any).maxTouchPoints — modern lib.dom
types already expose the property.
- serve.ts: remove unused any annotation on OpenRouter model mapper; the
array element type is already inferred from json.data.
- pi.js, runtime-resolution.ts, dashboard.ts, serve.ts, dev-server-port-
detect.ts, devserver-manager.ts: drop now-stale eslint-disable comments
that the cleanup made redundant.
Fix a prompt-builder regression surfaced by agent's `any` cleanup: toolCall
with a raw string `arguments` field must be preserved verbatim (JSON-quoted)
rather than coerced to `{}`; restores a previously-passing test.
Then promote @typescript-eslint/no-explicit-any from warn → error. Future
new anys must either come with a one-line disable + justification or use a
real type. Workspace is now lint-clean (0 problems).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.
Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
.all()/.get() results via `as unknown as XxxRow[]` (the double cast is
required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
pi-ai concrete shapes; typed Claude stream event message fields.
72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Clears the remaining no-unused-vars warnings across the dashboard app and
server, desktop main, and engine sources. Dead React state destructures are
collapsed to setter-only, unused props are underscore-prefixed to preserve
API shape, and unreferenced catch bindings are dropped. No behaviour change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PluginStore's constructor treats its rootDir arg as a project root and
internally appends `.fusion` before opening the SQLite DB. Several CLI
call sites were passing the already-resolved `.fusion` directory,
producing a doubled `.fusion/.fusion/fusion.db` that the dashboard
process kept recreating on every project load.
Pass the project root instead so the DB lands in the canonical
`.fusion/fusion.db` alongside the rest of the project's state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Move the assigned agent badge out of the card header into a dedicated metadata row below task details
- Add a new .card-agent-row container to control spacing and alignment for the badge block
- Update .card-agent-badge styling to use token-aligned pill radius and color-mix backgrounds while removing monospace/fixed-width conventions
- Expand TaskCard agent badge tests to verify new DOM placement and enforced badge style rules
Resume paths (unpause, drift recovery, engine restart) bypassed the
scheduler's todo->in-progress clear, leaving actively executing tasks
labeled status="queued" with a lingering blockedBy. Broadened
clearResumeFailureState to null both fields alongside the existing
failure cleanup, and added a defensive UI backstop so the "Queued"
badge no longer renders for tasks in the in-progress column.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add step-based dependency to useTaskDiffStats hook to trigger refetch when task steps change
- Implement 5-second polling interval for live diff statistics updates
- Add comprehensive test coverage for polling behavior and step-change detection
- Update TaskCard to pass step information to useTaskDiffStats
- Add TaskCard unit tests for diff statistics display
- Import resolvePrompt and PromptOverrideMap from @fusion/core
- Add promptOverrides parameter to all agent creation paths:
- createMissionInterviewSession
- submitMissionInterviewResponse
- retryMissionInterviewSession
- initializeAgent
- createMissionInterviewAgent
- ensureMissionInterviewAgent
- Use resolvePrompt('planning-system', promptOverrides) for effective prompt
- Fall back to MISSION_INTERVIEW_SYSTEM_PROMPT when override absent
- Update module docs to reflect prompt override behavior
- Add tryRelinkOrphanedFeature() to find and link matching tasks
- Normalize titles (trim, lowercase, collapse whitespace) for matching
- Only relink when exactly one task matches (ambiguous = no action)
- Sync feature status from task state on successful relink
- Normalize to 'defined' when no safe relink exists
- Add 7 tests for orphaned feature relink scenarios
- All 57 tests passing
- Add viewport-gated fetching to TaskCard component so only visible cards load their data
- Implement lightweight memo comparison to prevent unnecessary re-renders
- Add lazy enable gates to useSessionFiles and useTaskDiffStats hooks with caching
- Add comprehensive tests for useSessionFiles and useTaskDiffStats hooks
- Document viewport-gated loading patterns in memory and dashboard-load performance docs
- Add Send Back dropdown to TaskCard showing for in-progress tasks with available target columns
- Thread onMoveTask prop through Column component to BoardView
- Terminate agent sessions when tasks move away from in-progress column
- Add executor tests for move-away session termination
- Add TaskCard send-back UI tests with dropdown visibility and interaction verification
- Update useModalManager to accept Task objects for immediate modal display before full detail loads
- Refactor TaskDetailModal to render with basic Task data and load TaskDetail asynchronously
- Update TaskCard click handlers to open modal immediately with optimistic data
- Update ListView click handler for same optimistic opening behavior
- Update AppModals types to support Task | TaskDetail union
- Add CSS for modal loading/skeleton states
- Add comprehensive tests for TaskDetailModal and useModalManager optimistic flow
- Simplify TaskCard and ListView tests to reflect new optimistic opening pattern
- Broaden TaskCard touch target detection from HTMLElement to Element so nested SVG targets are treated as interactive
- Keep mobile tap handling from opening task details when pressing card controls
- Add board-mobile regressions for edit button taps, steps toggle taps, and SVG-inside-button touch events