Commit Graph

4488 Commits

Author SHA1 Message Date
gsxdsm
3ee47dec86 merge: integrate origin/main into feature/workflow-steps (FN-7039)
Resolve conflicts from 56 upstream commits:
- db.ts: renumber my migrations around main's new migration 130 (columnDwellMs) —
  enable-id normalization 130→131, drop-table 131→132, SCHEMA_VERSION→132.
- index.ts / routes.ts: take main's new MCP exports/imports; keep WORKFLOW_STEP_TEMPLATES
  array removed (kept the WorkflowStepTemplate type).
- merger.ts: keep the legacy post-merge execution path removed (U7c) over main's version.
- ci-workflow.test.ts (from main): add port-4040/process-supervisor allowlist markers to
  the gate-script assertions that reference the checker filenames (pre-existing self-match).

Gate green (engine-core 299, ci-shape 62); boot smoke PASS; migration tests + typecheck clean.
2026-06-26 08:50:22 -07:00
gsxdsm
005322eeaa fix(review): address PR #1788 review feedback
- workflow-graph-executor: wrap each post-merge walk() in try/catch so a malformed
  post-merge IR / traversal error is logged and skipped, never flipping an already-
  merged task to failed (non-blocking post-merge contract) [T9, real bug].
- Refresh stale FNXC comments now that graphNativePostMerge is default-ON and the
  legacy merger post-merge path was removed (experimental-features, workflow-graph-
  executor, workflow-graph-post-merge.test) [T6/T7/T8].
- Normalize FNXC timestamps to yyyy-MM-dd-hh:mm (TaskCard.test, taskProgress.test) [T2/T3].
- Changeset: category fix → feature to match the minor bump [T0].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 08:40:59 -07:00
gsxdsm
d03d6c23d6 FN-7057: preserve workflow selections across dashboard surfaces
Add regression coverage and stale-workflow fallback for workflow-aware dashboard selection.

- Cover cached board-workflow hydration across remounted Header and Graph switchers.
- Verify Header and Graph selections remain isolated while Graph task filtering follows the Graph selection.
- Treat deleted workflow assignments as default-workflow tasks so they remain visible.
- Add hook coverage for cache hydration, project changes, selection fallbacks, disabled workflow mode, and consumer isolation.
- Add a patch changeset for the stale Graph workflow filtering fix.

Files changed:
 .changeset/fn-7057-graph-workflow-filter.md        |   7 +
 .../workflow-selection-cross-surface.test.tsx      | 184 +++++++++++++++++++++
 .../app/components/GraphWorkflowSwitcherSlot.tsx   |  11 +-
 .../__tests__/GraphWorkflowSwitcherSlot.test.tsx   |   1 +
 .../app/hooks/__tests__/useBoardWorkflows.test.ts  | 133 ++++++++++++++-
 5 files changed, 330 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7057

Fusion-Task-Lineage: 52e6682a-576e-4ed6-92d5-03e0e9b5896c
2026-06-26 04:06:32 -07:00
gsxdsm
8131d541ca FN-7038: add live automation run output
Add configurable automation tool access with live manual-run streaming for schedules and routines.

- Add an automation tool allowlist model and dashboard selectors for AI prompt steps.
- Stream manual automation and routine run progress, output, step updates, and tool events over SSE.
- Surface live run transcripts in automation/routine cards and document the operator workflow.
- Cover validation, runner callbacks, API streaming, and UI behavior with targeted tests.

Files changed:
 .changeset/fn-7038-automation-tools-live-output.md |   7 +
 docs/dashboard-guide.md                            |   9 +
 packages/core/src/__tests__/automation.test.ts     |  27 +-
 packages/core/src/automation.ts                    |  18 +
 packages/core/src/index.ts                         |   4 +-
 packages/core/src/types.ts                         |   6 +
 packages/dashboard/app/api/legacy.ts               |  48 +++
 packages/dashboard/app/components/RoutineCard.tsx  |  16 +-
 packages/dashboard/app/components/ScheduleForm.tsx |  53 ++-
 .../app/components/ScheduleStepsEditor.tsx         |  49 ++-
 .../app/components/ScheduledTasksModal.tsx         |  72 +++-
 packages/dashboard/app/components/ScriptsModal.css |  79 ++++
 .../app/components/__tests__/RoutineCard.test.tsx  |  45 +++
 .../app/components/__tests__/ScheduleForm.test.tsx | 100 +++++-
 .../__tests__/ScheduleStepsEditor.test.tsx         |  67 +++-
 .../__tests__/ScheduledTasksModal.test.tsx         |  36 +-
 .../src/__tests__/routes-automation.test.ts        | 151 +++++++-
 packages/dashboard/src/routes.ts                   | 400 ++++++++++++++++++++-
 packages/dashboard/src/server.ts                   |   7 +-
 packages/engine/src/__tests__/cron-runner.test.ts  |  56 ++-
 .../src/__tests__/pi-create-fn-agent.test.ts       |  44 +++
 .../engine/src/__tests__/routine-runner.test.ts    |  28 ++
 packages/engine/src/cron-runner.ts                 |  20 +-
 packages/engine/src/pi.ts                          |  32 +-
 packages/engine/src/routine-runner.ts              |  39 +-
 packages/i18n/locales/en/app.json                  |   9 +
 packages/i18n/src/resources.d.ts                   |  21 ++
 27 files changed, 1374 insertions(+), 69 deletions(-)

Fusion-Task-Id: FN-7038

Fusion-Task-Lineage: 7f5871d0-1de0-4d22-a9c9-ee9418658677
2026-06-26 02:45:29 -07:00
gsxdsm
301f25da06 FN-7025: add MCP server management settings UI
Adds dashboard controls for managing MCP server configuration across global and project scopes.

- Add global and project MCP settings sections with server cards, validation, inheritance status, and import/export controls.
- Wire MCP settings into split-save behavior, browser-safe core exports, localization, and dashboard documentation.
- Cover MCP settings interactions and save routing with dashboard tests.

Files changed:
 .changeset/fn-7025-mcp-dashboard-ui.md             |   7 +
 docs/dashboard-guide.md                            |  14 +
 packages/core/src/types.ts                         |   4 +
 .../app/__tests__/settings-save-split.test.ts      |  25 +
 .../dashboard/app/components/SettingsModal.tsx     |  25 +
 .../__tests__/SettingsModal.mcp.test.tsx           | 228 +++++++++
 .../app/components/settings/save-split.ts          |   5 +
 .../settings/sections/GlobalMcpSection.tsx         |  26 ++
 .../settings/sections/McpServersCard.css           | 177 +++++++
 .../settings/sections/McpServersCard.tsx           | 515 +++++++++++++++++++++
 .../settings/sections/ProjectMcpSection.tsx        |  27 ++
 packages/i18n/locales/en/app.json                  |  10 +-
 packages/i18n/locales/es/app.json                  |  10 +-
 packages/i18n/locales/fr/app.json                  |  10 +-
 packages/i18n/locales/ko/app.json                  |  10 +-
 packages/i18n/locales/zh-CN/app.json               |  10 +-
 packages/i18n/locales/zh-TW/app.json               |  10 +-
 17 files changed, 1107 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7025

Fusion-Task-Lineage: e4e59431-c819-464b-a04b-e470ac51c460
2026-06-26 02:30:34 -07:00
gsxdsm
347842faca refactor(FN-7039): drop the legacy workflow_steps table; remove all table readers
Final cutover — nothing reads workflow_steps at runtime, so migration 131 drops it.

- Removed the merger post-merge execution path entirely (runPostMergeWorkflowSteps,
  hasEnabledPostMergeWorkflowSteps, executePostMerge{Prompt,Script}Step, post-merge
  worktree helpers + call site). Graph owns post-merge.
- Executor recovery no longer reads getWorkflowStep().gateMode; gate-ness comes from the
  recorded WorkflowStepResult.status.
- Removed store CRUD (create/update/deleteWorkflowStep), materializeWorkflowSteps, and
  migrateLegacyWorkflowSteps; selectTaskWorkflow now seeds default-on optional-group node
  ids (consistent with create-time). KEPT the plugin step-template palette (getWorkflowStep
  plugin-only resolver / listWorkflowSteps plugin-only) — never touches the table.
  Removed the dashboard migrate-legacy-steps route + editor migration UI.
- SCHEMA_VERSION 130→131; migration 131 DROP TABLE IF EXISTS workflow_steps; SCHEMA_SQL
  table def removed; historical migrations 77/105/109/130 guarded with tableExists().

Proof nothing stranded: the graph executes IR nodes resolved from workflowId (never
stepIds/compiled rows) — materializeWorkflowSteps writes were vestigial. Full @fusion/core
suite (6290), reliability backstop (154), boot smoke, and a seed-at-130 drop test all pass
with the table gone.

Plan U7c.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 02:29:32 -07:00
gsxdsm
afa33b76d3 FN-7055: fix task workflow detail rendering
Fix task-detail workflow rendering so inherited workflow data and live results refresh reliably.

- Clear stale workflow selections and result rows while switching between tasks.
- Load inherited/default workflow graphs and avoid empty graph previews during loading.
- Alias optional template IDs to materialized workflow steps so configured details populate.
- Cover task switching, inherited workflows, and optional step detail rendering with dashboard tests.

Files changed:
 .changeset/fn-7055-workflow-tab-graph-step-details.md     |  7 +++
 docs/dashboard-guide.md                                    |  1 +
 packages/dashboard/app/components/TaskDetailModal.tsx      |  5 ++
 packages/dashboard/app/components/WorkflowResultsTab.tsx   | 35 +++++++++--
 packages/dashboard/app/components/__tests__/TaskDetailModal.models-progress-workflow.test.tsx | 56 +++++++++++++++++
 packages/dashboard/app/components/__tests__/WorkflowResultsTab.test.tsx | 72 ++++++++++++++++++++++
 6 files changed, 171 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7055

Fusion-Task-Lineage: a28dd138-3c2f-43bc-81f9-fb47799f5251
2026-06-26 02:04:53 -07:00
gsxdsm
dbd613a529 FN-7053: catch up tasks on SSE re-entry
Reconcile task list catch-up behavior when re-entering live Board/List views.

- Move Board/List SSE re-entry refetch ownership from App into useTasks.
- Trigger exactly one catch-up fetch for each sseEnabled false-to-true transition without duplicating initial mount.
- Cover disabled, search-query, and repeated toggle cases in useTasks tests.

Files changed:
 packages/dashboard/app/App.tsx                     |  22 +----
 .../dashboard/app/hooks/__tests__/useTasks.test.ts | 110 +++++++++++++++++----
 packages/dashboard/app/hooks/useTasks.ts           |  12 +++
 3 files changed, 105 insertions(+), 39 deletions(-)

Fusion-Task-Id: FN-7053

Fusion-Task-Lineage: 7fd7a05e-deb5-4c0d-9585-288089cb9945
2026-06-26 01:24:47 -07:00
gsxdsm
c0d53530cf FN-7052: restore Agent Detail tab touch panning
Restore mobile horizontal panning from direct touches on Agent Detail tab buttons.

- Apply pan-x touch-action to Agent Detail tab buttons alongside the tab strip.
- Cover both base and mobile tab styles so the global mobile pan-y lock does not block button-origin swipes.
- Extend the mobile scroll regression test to assert tab buttons expose horizontal touch panning.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7052-agent-detail-mobile-tab-touch-action.md        | 7 +++++++
 packages/dashboard/app/components/AgentDetailView.css             | 5 +++++
 .../components/__tests__/AgentDetailView.mobile-scroll.test.tsx   | 8 ++++++--
 3 files changed, 18 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7052

Fusion-Task-Lineage: 42921948-f940-46d6-8c86-c159e94603b5
2026-06-26 01:19:55 -07:00
gsxdsm
3f66e55505 FN-7016: keep workflow container edges connected
Keep workflow container fallback layouts connected in the editor.

- Space fallback and auto-layout columns by each node's rendered width so wide containers do not overlap adjacent handles.
- Treat incomplete top-level saved layouts as stale and fall back to a coherent graph layout.
- Cover optional-group, foreach, and mobile graph mapping with regression tests.

Files changed:
 .changeset/fn-7016-optional-group-edges.md         |   7 +
 .../__tests__/workflow-auto-layout.test.ts         |  18 +++
 .../__tests__/workflow-flow-mapping.test.ts        | 154 ++++++++++++++++++++-
 .../__tests__/workflow-mobile-graph.test.ts        |  37 ++++-
 .../app/components/workflow-auto-layout.ts         |  28 +++-
 .../app/components/workflow-flow-mapping.ts        |  40 +++++-
 6 files changed, 271 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-7016

Fusion-Task-Lineage: a009fc2d-05cb-41cc-8be1-c5522f7398ff
2026-06-26 01:15:14 -07:00
gsxdsm
d739223de2 FN-7049: collapse model pricing behind modal editor
Collapse the Global Models pricing editor into a compact summary with a modal table for detailed edits.

- Add a View pricing table modal with escape, overlay, and close-button dismissal.
- Keep add, edit, delete, and LiteLLM fetch workflows available while showing override counts in the collapsed settings view.
- Update model pricing tests, styling, and documentation for the collapsed summary and modal editor.

Files changed:
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   4 +-
 .../settings/sections/ModelPricingSection.css      |  36 +++++-
 .../settings/sections/ModelPricingSection.test.tsx |  62 ++++++++-
 .../settings/sections/ModelPricingSection.tsx      | 144 +++++++++++++++------
 5 files changed, 198 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-7049
Fusion-Task-Lineage: 9ba63354-28e7-4717-81e6-805f1f05fd97
2026-06-26 01:04:03 -07:00
gsxdsm
93da87dc5d FN-7048: enable mobile detail tab swiping
Allow task detail tabs to keep horizontal touch scrolling on mobile surfaces.

- Add pan-x touch-action overrides on detail tab buttons for modal, embedded, mobile, and tablet contexts.
- Extend responsive CSS coverage to assert each task-detail tab target allows horizontal panning.
- Add a patch changeset documenting the mobile task-detail tab scroll fix.

Files changed:
 .changeset/fn-7048-task-detail-mobile-tab-touch-action.md  |  7 +++++++
 packages/dashboard/app/components/TaskDetailModal.css      | 14 ++++++++++++++
 .../TaskDetailModal.responsive-and-dependencies.test.tsx   | 14 +++++++++++++-
 3 files changed, 34 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7048

Fusion-Task-Lineage: bb07b72f-8843-4ed4-a45b-ea8172bc4957
2026-06-26 00:48:51 -07:00
gsxdsm
f3f20accbb FN-7031: preview binary media files in dock Files viewer
Render browser-native previews for right-dock file selections while preserving text editing behavior.

- Add image, video, audio, and PDF preview rendering through the workspace download URL.
- Keep previewable and known binary files out of the text editor, with a read-only fallback for unsupported binaries.
- Cover compact and two-pane dock preview behavior with tests, docs, and a patch changeset.

Files changed:
 .changeset/fn-7031-dock-files-binary-preview.md    |   7 +
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/DockFilesView.css     |  45 ++++++
 .../dashboard/app/components/DockFilesView.tsx     |  85 ++++++++++-
 .../components/__tests__/DockFilesView.test.tsx    | 170 ++++++++++++++++++++-
 5 files changed, 303 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7031

Fusion-Task-Lineage: a52bdd57-bb3e-494e-85a8-81326a1548e2
2026-06-26 00:43:55 -07:00
gsxdsm
2ce208e36d FN-7036: make Automations popup movable and resizable
Render the Automations modal in the shared floating-window shell while preserving embedded and mobile behavior.

- Wrap the modal presentation in FloatingWindow with persisted geometry, drag handle, and resize sizing.
- Update Automations modal CSS so desktop fills the floating shell and mobile remains full-screen with resize handles hidden.
- Cover floating-window rendering, dragging, resizing, mobile CSS contract, and embedded mode in ScheduledTasksModal tests.
- Add a minor changeset for the published Fusion package.

Files changed:
 .changeset/fn-7036-automation-modal-floating.md    |   7 ++
 .../app/components/ScheduledTasksModal.tsx         |  43 +++++----
 packages/dashboard/app/components/ScriptsModal.css |  78 +++++++++-------
 .../__tests__/ScheduledTasksModal.test.tsx         | 103 +++++++++++++++++++--
 4 files changed, 172 insertions(+), 59 deletions(-)

Fusion-Task-Id: FN-7036

Fusion-Task-Lineage: 3d6926b7-ec6d-4179-ad17-573bcfef297f
2026-06-26 00:35:41 -07:00
gsxdsm
98a5052b65 FN-6706: add signal connector incident ingestion
Connect external signal ingestion routes to Command Center incident analytics.\n\n- Add connector status reporting and incident upsert/resolution support for webhook, Sentry, Datadog, and PagerDuty sources.\n- Move signal aggregation through shared activity analytics and expose connector-aware empty states in Command Center.\n- Document connector setup, settings, and dashboard behavior with a published changeset.\n- Extend route, analytics, and Command Center UI tests for scoped signal data and configured-but-quiet connectors.\n\nFiles changed:\n .changeset/fn-6706-signal-connectors.md            |   7 +\n AGENTS.md                                          |   1 +\n docs/dashboard-guide.md                            |   4 +-\n docs/settings-reference.md                         |  16 +\n docs/signals-connectors.md                         | 140 ++++++++\n .../core/src/__tests__/signals-analytics.test.ts   |  37 ++-\n packages/core/src/activity-analytics.ts            | 185 ++++++++++-\n packages/core/src/index.ts                         |  11 +-\n packages/core/src/signals-analytics.ts             | 209 +-----------\n .../command-center/areas/SignalsArea.tsx           |  47 ++-\n .../areas/__tests__/areas.github-signals.test.tsx  | 120 +++++--\n .../command-center/areas/__tests__/areas.test.tsx  |   3 +-\n .../register-command-center-routes.test.ts         |  72 +++-\n .../src/__tests__/register-signal-routes.test.ts   | 369 ++++++++++++++++++++-\n .../src/routes/register-command-center-routes.ts   |  29 +-\n .../dashboard/src/routes/register-signal-routes.ts |  55 +++\n packages/dashboard/src/signal-source.ts            |   8 +\n packages/dashboard/src/signal-sources/datadog.ts   |   8 +\n packages/dashboard/src/signal-sources/pagerduty.ts |  14 +-\n packages/dashboard/src/signal-sources/sentry.ts    |  19 +-\n packages/dashboard/src/signal-sources/webhook.ts   |   8 +\n 21 files changed, 1094 insertions(+), 268 deletions(-)

Fusion-Task-Id: FN-6706

Fusion-Task-Lineage: 09003e9b-481b-4393-926b-44907d13bcf9
2026-06-26 00:28:31 -07:00
gsxdsm
a7eb3c4dd8 refactor(FN-7039): delete WORKFLOW_STEP_TEMPLATES + legacy workflow-step management surface
U6: delete the built-in WORKFLOW_STEP_TEMPLATES catalog + its materializer
(getBuiltInWorkflowTemplate/ensureWorkflowStepForTemplate/toBuiltInWorkflowStep);
inline the browser-verification + code-review name/prompt/toolMode/gateMode into
their optional-group IR builders (node bytes unchanged); simplify
resolveEnabledWorkflowSteps to an identity-stable pass-through (no materialization,
so the optionalGroupIdSet collision guard is no longer needed). Plugin-contributed
step templates are kept as the editor palette.

U5: remove the legacy /api/workflow-steps REST surface (GET/POST/PATCH/DELETE +
/refine + /workflow-step-templates/:id/create), the dead client fns, and the
Settings management UI; GET /api/workflow-step-templates now serves plugin
templates only. The create-time optional-step toggles remain.

Scope: the workflow_steps store CRUD + table are intentionally KEPT — still consumed
by the engine (merger/recovery) and needed by U7's migration; their removal + the
table drop land in U7.

Plan U5 + U6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 00:06:31 -07:00
gsxdsm
4dab2b6986 FN-7011: Exclude engine downtime from task timing
Exclude proven engine-process downtime from active task duration stats and badges.

- Persist a throttled engineLastActiveAt heartbeat while the scheduler is running and unpaused.
- Reconcile in-progress execution segment anchors on startup when downtime exceeds the poll threshold.
- Emit run-audit events for shifted and no-action downtime reconciliation outcomes.
- Cover core timing, dashboard badge behavior, scheduler heartbeat throttling, and self-healing audit metadata.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7011-engine-downtime-timing.md       |  7 +++
 AGENTS.md                                          |  1 +
 .../src/__tests__/store-execution-timing.test.ts   | 51 ++++++++++++++++++++++
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/store.ts                         | 28 ++++++++++++
 packages/core/src/types.ts                         |  5 +++
 .../app/utils/__tests__/taskTiming.test.ts         | 16 +++++++
 .../__tests__/scheduler-workflow-cutover.test.ts   | 29 +++++++++++-
 packages/engine/src/__tests__/self-healing.test.ts | 23 ++++++++++
 packages/engine/src/run-audit.ts                   |  4 ++
 packages/engine/src/scheduler.ts                   | 11 +++++
 packages/engine/src/self-healing.ts                | 21 +++++++++
 12 files changed, 196 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7011

Fusion-Task-Lineage: 44225b0a-0fa1-40be-812d-33fd5e446944
2026-06-25 23:35:31 -07:00
gsxdsm
da69e03d29 FN-7047: remove quick-entry keyboard hint
Remove the retired quick-entry keyboard hint and its empty UI shell from task creation.

- Drop the quick-entry hint element and associated responsive styles.
- Remove the retired quickEntryHint locale key from all app locales and generated resources.
- Add coverage asserting the hint and shell stay absent across expanded and collapsed quick-entry modes.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7047-quick-entry-hint-removal.md         |  7 +++++++
 packages/dashboard/app/components/QuickEntryBox.css    | 18 ------------------
 packages/dashboard/app/components/QuickEntryBox.tsx    |  4 +---
 .../app/components/__tests__/QuickEntryBox.test.tsx    | 18 ++++++++++++++++++
 packages/i18n/locales/en/app.json                      |  1 -
 packages/i18n/locales/es/app.json                      |  1 -
 packages/i18n/locales/fr/app.json                      |  1 -
 packages/i18n/locales/ko/app.json                      |  1 -
 packages/i18n/locales/zh-CN/app.json                   |  1 -
 packages/i18n/locales/zh-TW/app.json                   |  1 -
 packages/i18n/src/resources.d.ts                       |  1 -
 11 files changed, 26 insertions(+), 28 deletions(-)

Fusion-Task-Id: FN-7047

Fusion-Task-Lineage: c838f25b-a3cf-4c2c-b214-511df12dd423
2026-06-25 23:34:08 -07:00
gsxdsm
ea5e12e8eb FN-7042: stop refocusing quick task input after submit
Prevent successful quick task creation from stealing focus back to the quick-entry textarea.

- Remove the post-submit focus restoration request/effect from QuickEntryBox.\n- Update desktop, mobile, duplicate-confirm, and image-upload tests to assert no automatic refocus.\n- Add a patch changeset documenting the quick-entry focus fix.\n\nFiles changed:\n .changeset/fn-7042-quick-entry-no-refocus.md       |  7 +++\n .../dashboard/app/components/QuickEntryBox.tsx     | 46 +------------------\n .../components/__tests__/QuickEntryBox.test.tsx    | 53 ++++++++++++----------\n 3 files changed, 39 insertions(+), 67 deletions(-)

Fusion-Task-Id: FN-7042

Fusion-Task-Lineage: 7c8e26a6-3a6b-463f-bfb7-8310682584f8
2026-06-25 23:34:08 -07:00
gsxdsm
9bd0853667 FN-7044: split Command Center area tests
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
2026-06-25 23:34:08 -07:00
gsxdsm
2c46cdc1e2 FN-7041: fix optional workflow step descriptions
Fix the workflow results settings display for configured optional steps.

- Treat workflow step definitions as missing only when the lookup has no entry.
- Preserve empty descriptions for found optional-group steps such as Code Review.
- Add regression coverage for configured, checkbox, and ordering displays.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-7041-workflow-step-definition-not-found.md  |  7 +++++
 .../app/components/WorkflowResultsTab.tsx          |  9 +++++-
 .../__tests__/WorkflowResultsTab.test.tsx          | 36 ++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7041

Fusion-Task-Lineage: 84698437-d4d3-4b68-9c5f-c8b15f513230
2026-06-25 23:34:07 -07:00
gsxdsm
c7cbae147c FN-7040: align task-detail model displays
Unify task-detail model resolution so Chat, Agent Log, and Workflow settings display the same effective model.

- Add a shared dashboard resolver for executor, validator, and planning model display precedence.
- Reuse the resolver in TaskDetailModal and WorkflowResultsTab instead of duplicating fallback logic.
- Cover log marker, assigned runtime model, task override, and settings fallback cases with focused tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../FN-7040-align-task-detail-model-display.md     |   7 +
 .../dashboard/app/components/TaskDetailModal.tsx   | 158 +--------------------
 .../app/components/WorkflowResultsTab.tsx          |  15 +-
 .../__tests__/WorkflowResultsTab.test.tsx          |  74 +++++++++-
 .../__tests__/effective-model-resolution.test.ts   | 111 +++++++++++++++
 .../app/components/effective-model-resolution.ts   | 149 +++++++++++++++++++
 6 files changed, 354 insertions(+), 160 deletions(-)

Fusion-Task-Id: FN-7040

Fusion-Task-Lineage: 05ec3ae7-5063-4219-a515-da16168e9a19
2026-06-25 23:34:07 -07:00
gsxdsm
9a2709dde9 FN-6969: show provider icons beside Command Center models
Show inferred provider icons beside model names across Command Center bar and table surfaces.

- Add dashboard-side provider-icon inference for model/provider strings.
- Render provider icons on Command Center model bar rows and token table rows while keeping pie chart labels text-only.
- Cover overview, token, and ecosystem model-icon surfaces with tests and add a changeset.

Files changed:
 .changeset/fn-6969-provider-icons.md               |   7 ++
 .../components/command-center/CommandCenter.tsx    |  15 ++-
 .../__tests__/CommandCenter.test.tsx               |  33 ++++++-
 .../command-center/areas/EcosystemArea.tsx         |  15 ++-
 .../components/command-center/areas/TokensArea.tsx |  37 +++++++-
 .../areas/__tests__/TokensArea.test.tsx            | 105 +++++++++++++++++++++
 .../command-center/areas/__tests__/areas.test.tsx  |  42 ++++++++-
 .../app/components/command-center/charts/Bar.tsx   |  25 ++++-
 .../components/command-center/charts/charts.css    |  42 +++++++++
 .../app/utils/__tests__/providerIconKey.test.ts    |  32 +++++++
 packages/dashboard/app/utils/providerIconKey.ts    |  45 +++++++++
 11 files changed, 377 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-6969

Fusion-Task-Lineage: 6caf8864-1ecc-46e3-b7fa-bfa8e9a70aaa
2026-06-25 23:34:07 -07:00
gsxdsm
1ebb518698 fix(review): resolve PR feedback on global concurrency hook
- 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>
2026-06-25 23:05:56 -07:00
gsxdsm
7b358b74b5 feat(FN-7039): drive progress bar + Workflow tab from graph-written results
getUnifiedTaskProgress reads task.workflowStepResults (graph-written in U2) and
no longer needs workflowStepNameLookup — names come from result.workflowStepName.
Removed the lookup prop + fetchWorkflowSteps-name plumbing end-to-end (App,
MainContent, RightDock, Board, Column, Lane, WorktreeGroup, TaskCard). Added the
running state (pending + startedAt) and a distinct advisory_failure (amber, non-
blocking) vs failed (red) treatment; advisory_failure counts as complete.

Plan U3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:48:50 -07:00
gsxdsm
1d860ec310 feat: global concurrency slider (footer + dashboard) and scoped settings
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>
2026-06-25 22:19:24 -07:00
gsxdsm
dd1b9603bc fix(FN-7039): run enabled optional workflow steps via builtin:coding resolution
optionalGroupIdSet falls back to builtin:coding (mirroring the executor's
unselected-task resolution) so a toggled built-in group id like
browser-verification is no longer downgraded to a legacy WS-xxx step row the
graph executor never matches. Create-time optional-step controls resolve
builtin:coding when no project default workflow is set so the toggles render.

First unit of the graph-native workflow-step refactor (see
docs/plans/2026-06-25-001-refactor-workflow-steps-graph-native-plan.md).

Fusion-Task-Id: FN-7039

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 21:47:03 -07:00
gsxdsm
b663eebcb3 FN-7035: split oversized test suites
Split oversized ChatView and notifier suites while updating the line-count baseline.

- Move ChatView core contract and interaction coverage into focused sibling test files.
- Move notifier runtime coverage into its own suite and share setup through a test harness.
- Document the line-count guard decision and ratchet baseline entries for existing growth.

Files changed:
 .../__tests__/ChatView.core-contracts.test.tsx     |  623 ++++++++
 .../__tests__/ChatView.core-interactions.test.tsx  | 1261 +++++++++++++++
 .../components/__tests__/ChatView.core.test.tsx    | 1652 +-------------------
 .../engine/src/__tests__/notifier.runtime.test.ts  |  810 ++++++++++
 .../engine/src/__tests__/notifier.test-harness.ts  |   71 +
 packages/engine/src/__tests__/notifier.test.ts     |  847 +---------
 scripts/check-file-line-count.mjs                  |    3 +
 scripts/line-count-baseline.json                   |   12 +-
 8 files changed, 2778 insertions(+), 2501 deletions(-)

Fusion-Task-Id: FN-7035
Fusion-Task-Lineage: 14cebb57-925b-41c7-9c8b-472f34b76fe2
2026-06-25 20:50:30 -07:00
gsxdsm
6415eed0c1 FN-7034: Align steps dropdown trigger styling
Align the optional steps dropdown trigger with shared task creation button styling.

- Reuse the dashboard btn btn-sm classes for the workflow optional steps trigger.
- Remove bespoke trigger button styling so shared button tokens control padding, border, radius, and states.
- Extend dropdown tests to cover shared classes across empty, selected, and disabled states.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7034-steps-dropdown-style.md         |  7 +++
 .../components/WorkflowOptionalStepsDropdown.css   | 14 ------
 .../components/WorkflowOptionalStepsDropdown.tsx   |  9 +++-
 .../WorkflowOptionalStepsDropdown.test.tsx         | 50 ++++++++++++++++++++--
 4 files changed, 61 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-7034

Fusion-Task-Lineage: 3ca2a726-2c67-44a0-9a88-467e4fc1ad6b
2026-06-25 20:28:38 -07:00
gsxdsm
0ae44992df FN-7030: route graph tasks to shared pop-out
Route dependency Graph task opens through the shared movable task pop-out.\n\n- Send dependency-graph plugin task opens and rendered graph task cards to popOutTaskDetail.\n- Preserve fixed modal behavior for non-graph plugin dashboard views.\n- Document the Graph behavior and add regression coverage for desktop, mobile, and pop-out deduping.\n- Add a patch changeset for the published CLI package.\n\nFiles changed:\n .changeset/fn-7030-graph-task-popout.md            |   7 +\n docs/dashboard-guide.md                            |   4 +-\n .../app/components/dashboard/MainContent.tsx       |  15 +-\n .../__tests__/MainContent.graph-popout.test.tsx    | 274 +++++++++++++++++++++\n 4 files changed, 296 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7030

Fusion-Task-Lineage: 83008d81-218e-49ce-9aff-cb6b51d84dba
2026-06-25 20:03:53 -07:00
gsxdsm
45727f1459 FN-7019: fix Command Center range filtering
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
2026-06-25 19:57:49 -07:00
gsxdsm
e48f80b764 FN-7028: split AgentLogViewer tests by concern
Split the large AgentLogViewer suite into focused, line-count-friendly test files.

- Move header, layout, markdown, and rendering coverage into separate test modules.
- Add a shared AgentLogViewer test helper for reusable setup.
- Remove the oversized combined AgentLogViewer test and update the line-count baseline.

Files changed:
 .../__tests__/AgentLogViewer.header.test.tsx       |  490 +++++
 .../__tests__/AgentLogViewer.layout.test.tsx       |  367 ++++
 .../__tests__/AgentLogViewer.markdown.test.tsx     |  797 ++++++++
 .../__tests__/AgentLogViewer.rendering.test.tsx    |  410 ++++
 .../__tests__/AgentLogViewer.test-helpers.ts       |   16 +
 .../components/__tests__/AgentLogViewer.test.tsx   | 2010 --------------------
 scripts/line-count-baseline.json                   |    1 -
 7 files changed, 2080 insertions(+), 2011 deletions(-)

Fusion-Task-Id: FN-7028

Fusion-Task-Lineage: 5ef134c7-0969-4b9b-908c-9713daa9d0d2
2026-06-25 19:51:21 -07:00
gsxdsm
ea3cfeeac4 FN-7027: constrain skill list row text
Keep discovered skill rows within the left pane by truncating long text values.

- Wrap skill names in a truncatable text span while keeping chevrons fixed-size.
- Add ellipsis rules and compact font sizing for skill names, paths, and sources.
- Cover long, short, and empty metadata skill rows with a dashboard test.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7027-skill-list-truncation.md        |  7 +++
 packages/dashboard/app/components/SkillsView.css   | 28 ++++++++++
 packages/dashboard/app/components/SkillsView.tsx   |  2 +-
 .../app/components/__tests__/SkillsView.test.tsx   | 64 ++++++++++++++++++++++
 4 files changed, 100 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7027

Fusion-Task-Lineage: ae50f1aa-e58b-4374-abae-38ca28e4073a
2026-06-25 19:35:47 -07:00
gsxdsm
775a1f8e9a FN-7020: compact AI session input banner
Make the dashboard AI session needs-input banner less prominent while preserving visibility rules.

- Reduce the session notification banner spacing, text scale, max heights, and mobile density.
- Cover banner visibility on missions, planning, hidden, empty, and board-session states.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7020-session-banner-compact.md       |   7 +
 .../app/components/SessionNotificationBanner.css   |  47 +++--
 .../dashboard/__tests__/DashboardBanners.test.tsx  | 227 +++++++++++++++++++++
 3 files changed, 263 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-7020
Fusion-Task-Lineage: bd48da60-29ef-4871-ae27-8a1a48f744ea
2026-06-25 19:35:05 -07:00
gsxdsm
541f1f6533 FN-7017: expose optional workflow steps in task creation
Surface active workflow optional steps on task creation surfaces so users can opt into workflow-specific steps before creating tasks.

- Add optional-step dropdown state and creation payload handling to quick entry.
- Move New Task optional-step controls into the inline quick-button row.
- Cover default-on, workflow selection, duplicate-confirmed create, empty-step rendering, and mobile touch-target behavior with tests.
- Document create-time optional-step controls and add the published package changeset.

Files changed:
 .../fn-7017-optional-steps-quick-dropdown.md       |   7 +
 docs/dashboard-guide.md                            |   4 +-
 docs/workflow-steps.md                             |   2 +
 .../dashboard/app/components/QuickEntryBox.css     |   6 +-
 .../dashboard/app/components/QuickEntryBox.tsx     |  65 ++++++++-
 packages/dashboard/app/components/TaskForm.tsx     |  34 ++---
 .../app/components/__tests__/NewTaskModal.test.tsx |  21 ++-
 .../components/__tests__/QuickEntryBox.test.tsx    | 145 ++++++++++++++++++++-
 .../app/components/__tests__/TaskForm.test.tsx     |   1 +
 9 files changed, 258 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-7017

Fusion-Task-Lineage: 1b7d21e6-ff7f-4d27-b285-4fd865eafce6
2026-06-25 19:35:05 -07:00
gsxdsm
f9f767c46a FN-7007: speed up SettingsModal interaction tests
Optimize the split SettingsModal test suite to avoid default user-event overhead while preserving interaction coverage.

- Add a shared no-delay SettingsModal test user with pointer-event tree checks disabled.
- Route split SettingsModal tests through the shared fast user and use fireEvent for simple form mutations.
- Shorten modal readiness checks to wait on settings loading instead of querying Save repeatedly.

Files changed:
 .../__tests__/SettingsModal.general.test.tsx       | 124 +++++++--------
 .../__tests__/SettingsModal.models-auth.test.tsx   | 136 ++++++++--------
 .../SettingsModal.remote-notifications.test.tsx    |  61 ++++----
 .../SettingsModal.scheduling-merge.test.tsx        | 174 ++++++++++-----------
 .../__tests__/SettingsModal.test-harness.tsx       |  32 ++--
 .../__tests__/SettingsModal.testMode.test.tsx      |   5 +-
 .../__tests__/SettingsModal.worktrunk.test.tsx     |   5 +-
 .../__tests__/SettingsModalNodeRouting.test.tsx    |   7 +-
 8 files changed, 273 insertions(+), 271 deletions(-)

Fusion-Task-Id: FN-7007

Fusion-Task-Lineage: 42cf8ce2-3da7-4607-8790-5bf46c07b417
2026-06-25 19:35:05 -07:00
gsxdsm
90c0e9936e FN-7009: update dashboard tests for current labels
Refresh dashboard test expectations so they follow current project setup and theme metadata.

- Assert setup wizard registration payloads include workspace and task-prefix fields.
- Resolve default theme assertions through shared theme metadata instead of hardcoded labels.
- Update Command Center theme dropdown coverage to use the current default theme label.

Files changed:
 .../app/components/__tests__/SetupWizardModal.test.tsx   | 16 +++++++++-------
 .../app/components/__tests__/ThemeSelector.test.tsx      | 11 ++++++-----
 .../__tests__/CommandCenterControls.test.tsx             | 12 +++++++-----
 3 files changed, 22 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7009
Fusion-Task-Lineage: 1255f1b5-b63d-4366-afe6-5d72ca15cb1a
2026-06-25 19:35:04 -07:00
gsxdsm
977000ca99 FN-7012: restore mobile task tab scrolling
Restores mobile access to all task detail tabs by making the tab strip the horizontal scroller.

- Allow the task-detail content, body, modal tabs, tablet tabs, and embedded tabs to shrink within narrow containers.
- Preserve touch horizontal panning and momentum scrolling on tab strips without moving horizontal overflow to the detail body.
- Cover the Board modal, List embedded pane, and complete tab label set with responsive CSS regression tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-7012-task-detail-mobile-tabs-scroll.md      |  7 +++
 .../dashboard/app/components/TaskDetailModal.css   | 25 +++++++-
 ...etailModal.responsive-and-dependencies.test.tsx | 67 +++++++++++++++++++++-
 3 files changed, 96 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7012

Fusion-Task-Lineage: 06b06a81-b9ec-4058-879f-2f5e187a63a4
2026-06-25 17:26:16 -07:00
gsxdsm
65a2b3bc72 feat: add test-free verify:fast (typecheck + build + boot-smoke) (#1777)
## What this adds

A **test-free verification command** — `pnpm verify:fast`
(`scripts/verify-fast.mjs`) — that gives deterministic, flake-free
signal without running the test suite. It is fully **additive**: `pnpm
test`, the merge gate (`test:gate`), and CI are untouched.

`docs/testing.md` observes the broad test gate "caught no recalled real
bugs while consuming ~70% of shipping time in flake triage."
`verify:fast` is the opt-in path for non-test verification, suitable as
a project `testCommand`/verification command.

## What verify:fast runs

1. **typecheck — scoped to the changed packages** (each package's
`typecheck` script, or `pnpm --filter <pkg> exec tsc --noEmit -p .` when
none exists).
2. **build — scoped to the changed packages** (`pnpm --filter <pkg>
build`, only for packages that declare a build script).
3. **boot smoke once** (`scripts/boot-smoke.mjs`: CLI `--help` + a real
`fn serve` answering `GET /api/health`), after builds so it runs against
fresh artifacts.

Change-detection **reuses `scripts/test-changed.mjs`** (`getBaseBranch`
/ `detectComparisonBase` / `changedFilesSince` /
`resolveAffectedPackages` / workspace resolution — newly `export`ed)
instead of reinventing git-diff, so it scopes to exactly the packages a
changed-only test run would. With no affected package (root/docs-only
diff) it runs the boot smoke only. Each step is bounded by the existing
`runWithWatchdog` (class `changed`) so a hung tsc/build/serve fails
fast; it streams progress and exits nonzero on the first failing step.
`@fusion/desktop` and `@fusion/mobile` are skipped, mirroring the root
`build`/`typecheck` exclusions.

## Measured wall-time

On this branch's diff (which resolves to the heaviest package,
`@fusion/dashboard`), end-to-end:

```
[verify:fast] plan: typecheck:@fusion/dashboard -> build:@fusion/dashboard -> boot-smoke
[verify:fast]    OK typecheck @fusion/dashboard (~44s)
[verify:fast]    OK build @fusion/dashboard (26.2s)
[verify:fast]    OK boot smoke (CLI --help + real serve /api/health) (19.6s)
[verify:fast] PASS — 3 step(s) green in 90.3s (no tests run).
```

**~90s total**, deterministic and flake-free. By contrast a typical
**scoped test run for the same package** is far heavier and flake-prone:
`docs/testing.md` notes a dashboard task "otherwise re-ran all 822
dashboard test files (~5-8 min)", and `pnpm test` additionally runs the
merge-gate suite first. verify:fast trades that test-suite cost (and its
flake-triage tax) for a typecheck+build+boot signal in ~1.5 min.

## Doc additions

- `AGENTS.md` + `docs/testing.md` testing-commands lists now include
`pnpm verify:fast`, described as the recommended **test-free
verification** (typecheck + build + boot-smoke), suitable as a project
`testCommand`/verification command; the full suite stays available and
runs non-blocking.

## Tests / verification

- New `scripts/__tests__/verify-fast.test.mjs` (11 tests) pins the pure
planning / arg-construction logic — scoped typecheck/build selection,
build-script gating, desktop/mobile exclusion, boot-smoke-only fallback,
and reuse of `resolveAffectedPackages`. It never spawns real
tsc/build/vitest.
- `pnpm verify:fast` runs end-to-end and exits 0 (output above).
- Lint clean on all new/changed files; `agents-md-invariants`,
`check-test-inventory`, `verify-fast`, and `test-changed` script tests
all green (132 tests).

No changeset (scripts + docs + CI-tooling, behavior-additive;
`@runfusion/fusion` runtime unaffected).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1777">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->
2026-06-25 17:24:25 -07:00
gsxdsm
2306fe67f3 test: split giant ChatView.test.tsx into 3 parallel files + fix FN-4327 isolation bug
Split packages/dashboard/app/components/__tests__/ChatView.test.tsx (231 tests,
~24s, one sequential worker) into 3 sibling files sharing ChatView.test-harness,
mirroring the SettingsModal split, so the dashboard chat project parallelizes them:

  - ChatView.core.test.tsx            (140 tests)
  - ChatView.sessions-rooms.test.tsx  (40 tests)
  - ChatView.mobile.test.tsx          (51 tests)
  sum = 231 (unchanged)

vi.mock factories stay inline & self-contained per file (delegating them to a
harness export triggers a TDZ ReferenceError because the harness imports
ChatView/../../api). The harness exports fixtures, helpers, the vi.mocked handles,
and installChatViewEnv() (former file-level beforeEach/afterEach).

Fix latent isolation bug in the FN-4327 re-anchor test: the Direct<->Rooms toggle
swaps subtrees in ChatView's render, so `.chat-messages` REMOUNTS on the round
trip. The re-anchor effect correctly targets the freshly-mounted node, whose jsdom
scrollHeight is 0. The pre-split file mocked geometry on the pre-toggle node and
only passed via a timing race against the remount; standalone/split it fails
"expected 500 to be 1200". Install scroll geometry at the prototype level (restored
in finally) so the remounted node reports scrollHeight 1200, making the re-anchor
deterministically observable without weakening the assertion.

vitest.config.ts: repoint dashboard-app-quality-chat to the 3 new files, drop bare
"ChatView" from qualityAppComponentTests/isolatedQualityAppComponentTests, and spread
qualityAppChatOnlyTests into backfillAppExclude (mirroring the settings split) so the
files aren't double-collected by the app backfill lane.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:43:54 -07:00
gsxdsm
a0954c7f27 FN-6975: make mission planning modal movable and resilient
Make the AI mission planning workspace movable on desktop and safer when streams fail.

- Host the Plan Mission with AI modal in FloatingWindow with desktop drag/resize geometry and mobile full-screen preservation.
- Normalize terminal mission interview stream failures, close SSE/keepalive once, and suppress duplicate late terminal events.
- Cover modal geometry and stream-error behavior with dashboard tests and document the operator-facing behavior.

Files changed:
 .changeset/fn-6975-mission-modal-stream.md         |   7 ++
 docs/dashboard-guide.md                            |   7 ++
 .../api/__tests__/mission-interview-stream.test.ts |  98 ++++++++++++++++++
 packages/dashboard/app/api/legacy.ts               |  66 ++++++++++---
 .../app/components/MissionInterviewModal.css       |  51 ++++++++++
 .../app/components/MissionInterviewModal.tsx       |  37 ++++---
 .../__tests__/MissionInterviewModal.test.tsx       | 110 ++++++++++++++++++++-
 7 files changed, 344 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-6975

Fusion-Task-Lineage: b2ffa558-8b7e-4a46-8882-f2c4f6189831
2026-06-25 16:31:10 -07:00
gsxdsm
3513d5f6f8 FN-7002: fix mobile New Task dialog affordances
Keep mobile New Task dialog controls reachable and tappable under keyboard-constrained viewports.

- Re-enable hit testing on the New Task sheet while preserving desktop overlay click-through behavior.
- Bound GitHub, dependency, and agent picker popups so mobile users can scroll them inside the sheet.
- Add regression coverage for mobile dialog affordances and document the mobile behavior.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7002-mobile-new-task-affordances.md  |  7 ++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/NewTaskModal.css | 18 +++++
 .../app/components/__tests__/NewTaskModal.test.tsx | 87 +++++++++++++++++++++-
 .../__tests__/core-modals-mobile.test.tsx          | 32 ++++++++
 5 files changed, 144 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7002

Fusion-Task-Lineage: 31c2504e-56fd-4395-bbe3-e753aab04e23
2026-06-25 16:11:45 -07:00
gsxdsm
b293525751 fix(dashboard): repair CSS token/contrast regressions and stale tests
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>
2026-06-25 14:37:52 -07:00
gsxdsm
c202053725 fix(dashboard): make embedded Planning view scroll on mobile
The global mobile fullscreen modal rule (`.modal-lg`, `.modal:not(.confirm-dialog)`)
forced the embedded Planning shell to 100dvh, overflowing its bounded `.planning-view`
pane. `overflow:hidden` then clipped the footer action buttons and blocked scrolling.
Qualify the mobile embedded override as `.planning-view.open .planning-modal--embedded`
so it outranks the global rule, and re-pin `max-height:100%` so the inner flex scroll
chain works. Adds a CSS regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:27:37 -07:00
gsxdsm
ad246e8bd2 FN-7001: repair dashboard changed-test expectations
Repair dashboard changed-test expectations for graduated navigation and workflow behavior.

- Update App tests to use the left-sidebar default and keep graduated Todo/Goals destinations available when stale flags are false.
- Align route tests with workflow-column graduation and live promote branches.
- Adjust dashboard test fixtures for command-center pricing settings and current spinner/viewport listener contracts.

Files changed:
 .../app/components/__tests__/App.test.tsx          | 43 +++++++++++++++++++---
 .../__tests__/PlanningModeModal.initial.test.tsx   |  6 ++-
 .../__tests__/board-mobile-initial-render.test.tsx | 12 +++++-
 .../register-command-center-routes.auth.test.ts    | 10 +++++
 .../routes/__tests__/board-workflows-route.test.ts | 19 ++++++----
 .../src/routes/__tests__/promote-route.test.ts     | 13 ++-----
 6 files changed, 77 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-7001

Fusion-Task-Lineage: 23c0b18d-6895-4a94-a77a-17c7438f477a
2026-06-25 13:27:37 -07:00
gsxdsm
6c51bd1d44 FN-6989: make workflow editor float
Make workflow editing open in the shared floating window shell.

- Replace the workflow editor modal overlay with FloatingWindow drag, resize, and geometry persistence.
- Let graph and header workflow switcher callbacks forward the selected workflow id into the editor.
- Update workflow editor sizing styles and mobile full-screen behavior for the floating shell.
- Add regression coverage for floating-window behavior, resize ownership, and workflow id forwarding.

Files changed:
 .../app/components/GraphWorkflowSwitcherSlot.tsx   |   6 +-
 .../app/components/HeaderWorkflowSwitcherSlot.tsx  |   6 +-
 .../app/components/WorkflowNodeEditor.css          |  51 +++++++--
 .../app/components/WorkflowNodeEditor.tsx          |  33 +++---
 .../__tests__/GraphWorkflowSwitcherSlot.test.tsx   |  11 ++
 .../__tests__/HeaderWorkflowSwitcherSlot.test.tsx  |  10 ++
 .../__tests__/WorkflowNodeEditor.css.test.ts       |  21 ++--
 .../__tests__/WorkflowNodeEditor.test.tsx          | 126 +++++++++++++++++----
 8 files changed, 208 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-6989

Fusion-Task-Lineage: cf762608-37d5-43be-8cbe-20fd1ae56296
2026-06-25 13:27:28 -07:00
gsxdsm
893c1dfa27 test(dashboard): fix 30 pre-existing pnpm-test failures on main (#1765)
## What & why

`pnpm test` on `main` failed **30 tests** across 5 dashboard files. All
ran in the **non-blocking full-suite lane** (not the merge gate), so
they went unnoticed despite being deterministic. Every one is a **stale
test trailing an intentional product change** — fixes are **test-only**,
with **no product code changed** and **no appeasement** (no widened
timeouts, no `.skip`, no weakened assertions).

## Root causes & fixes

| File | Failures | Root cause | Fix |
|---|---:|---|---|
| `App.test.tsx` | 26 | Sidebar-destination tests (view switching, chat
unread, GitHub import, board branch filters) never set `leftSidebarNav:
true`; the shared `defaultSettings` keeps it `false` to preserve legacy
header-nav tests, so the sidebar never rendered. The backend-unreachable
recovery test asserted a setup wizard that **intentionally no longer
auto-opens** on zero projects (`useViewState` FNXC:Onboarding
2026-06-22-05:06) with `modelOnboardingComplete: true`. | Opt each
sidebar describe/test into `leftSidebarNav: true`; assert recovery to
the dashboard shell instead of the retired auto-wizard. |
| `board-workflows-route.test.ts` | 1 | `workflowColumns` flag
**graduated to always-on** (`isWorkflowColumnsEnabled` returns `true`;
stale persisted `false` treated as enabled) — the flag-OFF empty-shape
branch is retired. | Assert the graduation invariant (persisted `false`
→ `flagEnabled: true`). |
| `promote-route.test.ts` | 1 | Same graduation: the flag-OFF → `400`
branch is dead, so the route proceeds and 500s on the incomplete mock. |
Assert persisted `false` proceeds to the engine (no legacy 400). |
| `register-command-center-routes.auth.test.ts` | 1 |
`/command-center/tokens` now reads `modelPricingOverrides` via
`getGlobalSettingsStore()`; `MockStore` lacked it → 500. | Add the
`getGlobalSettingsStore()` stub. |
| `PlanningModeModal.initial.test.tsx` | 1 | The shared `.spin` loader
keyframe was renamed `spin` → `fusion-spinner-spin` for
collision-proofing. | Update the CSS regex to the current keyframe. |

## Verification
- All 5 files together: **161 passed / 0 failed** (`App.test.tsx`
128/128).
- ESLint on all 5 files: exit 0.
- `git diff` touches **test files only** — confirmed no product/source
file changed, and no `timeout:`/`.skip`/removed-`expect` introduced.

## Notes
- No changeset (test-only).
- Diagnosis confirmed by instrumenting `App.tsx` (reverted): after
settings load, `leftSidebarNavEnabled` flipped to `false` because the
fixture set `leftSidebarNav: false`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1765">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Dashboard navigation now consistently follows the new default sidebar
layout.
* Restored dashboard recovery flow after a backend outage so the normal
shell returns cleanly when service resumes.
* Workflow-related actions and board views now behave as enabled even
when older saved settings say otherwise.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 13:17:35 -07:00
gsxdsm
bdd0bed4bd test(dashboard): fix 30 pre-existing pnpm-test failures on main
These deterministic failures lived in the non-blocking full-suite lane
(App.test.tsx + three API-backfill route tests + one modal test), so the
merge gate never surfaced them. All are stale tests trailing intentional
product changes — fixes are test-only; no product code and no appeasement
(no widened timeouts, no skips, no weakened assertions).

App.test.tsx (26): sidebar-destination tests (view switching, chat unread,
GitHub import, board branch filters) never opted into leftSidebarNav:true,
so with the shared defaultSettings keeping it false (to preserve legacy
header-nav tests) the sidebar never rendered. Enable leftSidebarNav per
sidebar describe/test. The backend-unreachable recovery test asserted a
setup wizard that intentionally no longer auto-opens on zero projects
(useViewState FNXC:Onboarding 2026-06-22-05:06) with modelOnboardingComplete
true — assert recovery to the dashboard shell instead.

board-workflows-route + promote-route: the workflowColumns flag graduated to
always-on (isWorkflowColumnsEnabled returns true; stale persisted false is
treated as enabled), retiring the flag-OFF 400/empty-shape branches. Update
both "flag OFF" tests to assert the graduation invariant.

register-command-center-routes.auth: the /command-center/tokens handler now
reads modelPricingOverrides via getGlobalSettingsStore(); MockStore lacked it,
yielding a 500. Add the stub.

PlanningModeModal.initial: the shared .spin loader keyframe was renamed
spin -> fusion-spinner-spin for collision-proofing; update the CSS regex.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 12:44:20 -07:00
gsxdsm
2669bb17e7 FN-6980: fix inherited workflow details
Fix task workflow details so inherited board defaults render consistently in the live Workflow tab.

- Resolve null task workflow selections through board workflow mappings or the project default for read-only detail surfaces.
- Load workflow graphs and optional steps from the effective workflow while preserving explicit selector state.
- Add coverage for default inheritance, explicit custom workflows, cleared selections, stale workflow ids, and task detail progress fixtures.

Files changed:
 .../app/components/WorkflowResultsTab.tsx          |  60 ++++++++---
 ...skDetailModal.models-progress-workflow.test.tsx |  63 +++++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |  23 ++++
 .../__tests__/WorkflowResultsTab.test.tsx          | 118 ++++++++++++++++++++-
 4 files changed, 243 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-6980

Fusion-Task-Lineage: 2ee9ca68-4053-4d69-a4da-e2bfc22cfe43
2026-06-25 12:25:14 -07:00
gsxdsm
4880a0f857 FN-6970: fix live token usage refreshes
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
2026-06-25 12:25:14 -07:00