Commit Graph

4655 Commits

Author SHA1 Message Date
gsxdsm
fb6b441fbe FN-5960: add unlinked mission advisory reporting
Add explicit visibility for active missions that remain intentionally unlinked to goals.

- document the no-backfill decision with an engine-emitted unlinked mission advisory
- add a scheduler reporter that emits one deduped workflow insight for active missions without goal links and falls back to task logs when insight storage is unavailable
- cover the advisory reporter and scheduler integration with focused tests
- clear PR remediation errors when changing the Create Pull Request base branch

Files changed:
 docs/missions.md                                   |   2 +
 .../dashboard/app/components/PrCreateModal.tsx     |   2 +
 packages/engine/src/__tests__/scheduler.test.ts    |   8 +
 .../unlinked-missions-advisory-reporter.test.ts    | 170 +++++++++++++++++++++
 packages/engine/src/scheduler.ts                   |  18 +++
 .../src/unlinked-missions-advisory-reporter.ts     | 117 ++++++++++++++
 6 files changed, 317 insertions(+)

Fusion-Task-Id: FN-5960

Fusion-Task-Lineage: efdbb4f5-fbd5-4ed7-9b9e-58706041d993
2026-06-07 18:51:46 -07:00
gsxdsm
ba16805ce6 Merge pull request #1466 from Runfusion/gsxdsm/issue-1454-manage-projet-bug
fix: empty folder selection reverts in DirectoryPicker + add create-folder button
2026-06-06 09:24:31 -07:00
gsxdsm
d92ad82e0c fix: disable Create button when currentPath is empty 2026-06-06 07:01:48 -07:00
gsxdsm
163332c6cc fix: localize create-folder validation error and add missing i18n keys
- Add dirPicker.createFolderError to all locale files (en, es, fr, ko, zh-CN, zh-TW)
- Use t() for the folder name validation error in DirectoryPicker
- Add missing dirPicker keys: cancel, createFolder, createFolderAria,
  createFolderConfirm, createFolderTitle, newFolderPlaceholder
2026-06-06 06:59:25 -07:00
gsxdsm
a87c7d72cd fix: remove invalid eslint-disable comment for non-existent react-hooks rule 2026-06-06 06:52:43 -07:00
gsxdsm
ee5f5e84ac Address PR review feedback (#1466)
- routes.ts: use isAbsolute() before resolve() for proper path validation
- routes.ts: wrap mkdir() in try/catch to map EEXIST/ENOENT/ENOTDIR to 4xx
- DirectoryPicker.tsx: use !browser.currentPath guard to prevent re-fetch loop
- DirectoryPicker.tsx: disable Create button during in-flight requests
- DirectoryPicker.tsx: add fetchEntries to useEffect dependency array
- DirectoryPicker.tsx: client-side validation for folder names
- Add changeset for the new create-folder feature
2026-06-06 06:31:44 -07:00
gsxdsm
d8e325b17e fix: empty folder selection reverts in DirectoryPicker + add create-folder button
Fix bug where navigating into an empty folder in the DirectoryPicker
would automatically revert to the previous folder. The useEffect that
auto-fetches on open was using the stale 'value' prop instead of
'browser.currentPath' after navigation.

Also adds a 'New folder' button to the DirectoryPicker toolbar so users
can create folders directly when setting up a project.

- DirectoryPicker.tsx: fix useEffect to use browser.currentPath || value
- DirectoryPicker.tsx: add create folder UI state and handlers
- DirectoryPicker.css: styles for create folder input and actions
- routes.ts: add POST /api/create-directory endpoint
- legacy.ts: add createDirectory API client
- DirectoryPicker.test.tsx: add tests for empty folder nav and create folder
2026-06-06 01:32:06 -07:00
gsxdsm
f49ab4946a Merge pull request #1463 from Runfusion/gsxdsm/issue-1455-initialize-git-repository
fix(FN-1455): initialize git during project registration
2026-06-06 01:08:31 -07:00
gsxdsm
62f60364f2 Merge pull request #1465 from Runfusion/gsxdsm/node-editor-fix
fix(node-editor): auto-layout on load + viewport to top-left
2026-06-06 01:07:50 -07:00
gsxdsm
8543e139a3 Merge pull request #1464 from Runfusion/gsxdsm/compound-debug
fix(dashboard): add missing vite alias for compound-engineering plugin
2026-06-06 01:06:17 -07:00
gsxdsm
d521661862 fix(node-editor): auto-layout on load + viewport to top-left
Run auto-layout automatically when a workflow is loaded so nodes are
tidily positioned instead of scattered at persisted positions. Position
the viewport at (0,0) with zoom 1 so the laid-out nodes are visible in
the top-left corner.

- workflow-auto-layout.ts: change ORIGIN_X/Y from 40 to 0
- WorkflowNodeEditor.tsx: apply autoLayout on load, setViewport to top-left
- WorkflowNodeEditor.test.tsx: update test to verify layout runs on load
2026-06-06 00:56:12 -07:00
gsxdsm
e941cb61cb fix(dashboard): add missing vite alias for compound-engineering plugin 2026-06-06 00:46:20 -07:00
gsxdsm
db971a91ea fix(FN-1455): initialize git during project registration
Fusion-Task-Id: FN-1455
2026-06-06 00:38:28 -07:00
gsxdsm
854b6a30c9 fix(lint): empty-interface PrSourceDescriptor → type alias, drop unused eslint-disable directives
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:15:28 -07:00
gsxdsm
841ff9d838 Address PR review feedback (#1461)
- pr-nodes: forward post-increment entity to deps.respond (responseRounds off-by-one); branch-group entity fallback now keys on task.branchContext.groupId, not task.id
- core: hoist shared autoMergeGateReason into @fusion/core pr-entity.ts; CLI + dashboard import the single definition (R13)
- cli: fn pr create also writes the unified PR entity (ensure → open), keeping legacy prInfo; resolveBranchHeadOid uses argv-safe execFileAsync (injection fix)
- changeset: fn-pr-commands bumped minor → major (breaking CLI removal per AGENTS.md)
- tests: bin.test.ts daemon fixture off reserved port 4040; lazy-loaded-views title 19 → 20 views

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:09:53 -07:00
gsxdsm
1922b5efc2 merge: main (workflow editor 109 / cli_sessions 110-111 / workflow_settings 112) — renumber PR-entity migration to 113, union core exports, TaskCard prNode + cliSessionState badges, executor PrNodeDeps + CliAgentRuntime options 2026-06-05 23:06:46 -07:00
gsxdsm
8a6a67a305 feat(pr): dashboard PR view, routes, node-state UI + user controls (U7)
Adds /api/pull-requests routes (list, detail, merge/approve/retry/close/
automerge — all re-fetch authoritative state before acting), a
PullRequestView rendering every entity state distinctly (creating/failed/
unverified/responding/await-review/conflict) with the action bar, live
auto-merge gate reason, and conflict CTA; TaskCard PR node-state badge +
link; and the R16 column-move-backward guard. User actions route through
the existing releaseHeldTaskByEvent primitives. Maps the new PR node kinds
in the workflow editor's kind resolver. 13 route tests + lazy-view guard
green; component test runs in CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 22:18:34 -07:00
gsxdsm
31d4b5335b feat(pr): security-hardened review-response run — pr-respond body (U5)
Implements the fix-or-disagree agent loop behind pr-respond: batched
one-run-per-cycle over actionable threads (filtering resolved/outdated/
self/bot), with prompt-injection delimiting of untrusted comment bodies,
viewer-authenticated anti-spoof markers, a pre-push secret scan, fast-
forward-only push (no force-push path) with non-ff abort+re-batch, reply+
resolve, commit-last thread-state persistence with marker+SHA crash
recovery (R15), and an iteration cap on responseRounds (R8). GitHub/git/
agent ops injected; engine stays dashboard-import-free. Adds GraphQL
getPrReviewThreadsDetailed + getViewerLogin to the client. 23 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 20:20:25 -07:00
gsxdsm
b871046ad2 feat(pr): GitHub primitives — thread reply/resolve, ETag probe, expectedHeadOid merge (U2)
Adds the net-new GitHub primitives the PR nodes need: replyToReviewThread
and resolveReviewThread (GraphQL mutations, dual gh/API), an ETag-conditional
probePrChanged (304 is rate-limit-free, gates the reconcile deep-fetch), and
expectedHeadOid on mergePr (--match-head-commit / REST sha) raising a typed
PrStaleHeadError on a head-moved race so pr-merge can re-evaluate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 19:37:59 -07:00
gsxdsm
72e320aab4 Address PR review feedback (#1445)
- applyRemoteSettings now applies the stripped global payload (moved keys can't resurrect)
- resolver error path keeps effective workflowId so builtin fallback survives identity failure
- updateWorkflowSettingValues read-merge-upsert wrapped in transactionImmediate (lost-update race)
- MergeSection directMergeCommitStrategy UI fallback aligned to schema default (always-squash)
- save-split section-routing test asserts the positive case
- setting-values routes 404 on unknown workflow ids (+ tests)
2026-06-05 16:46:04 -07:00
gsxdsm
1f68348441 merge: main (CLI agent interface #1446) — renumber workflow_settings migration to 112 behind main's cli_sessions(110)/adapter(111), full-workspace literal sweep, i18n union 2026-06-05 16:18:39 -07:00
gsxdsm
693ed6290a Merge remote-tracking branch 'origin/main' into gsxdsm/cli-agent-interface
# Conflicts:
#	CONCEPTS.md
#	packages/core/src/__tests__/db-migrate.test.ts
#	packages/core/src/__tests__/db.test.ts
#	packages/core/src/__tests__/goals-schema.test.ts
#	packages/core/src/__tests__/insight-store.test.ts
#	packages/core/src/__tests__/merge-request-record.test.ts
#	packages/core/src/__tests__/mission-store.test.ts
#	packages/core/src/__tests__/run-audit.test.ts
#	packages/core/src/__tests__/store-merge-queue.test.ts
#	packages/core/src/__tests__/task-documents.test.ts
#	packages/core/src/db.ts
#	packages/dashboard/src/__tests__/agent-onboarding.test.ts
#	packages/dashboard/src/__tests__/ai-refine.test.ts
#	packages/dashboard/src/__tests__/chat-attachment-routes.test.ts
#	packages/dashboard/src/__tests__/experiment-routes.finalize.test.ts
#	packages/dashboard/src/__tests__/milestone-slice-interview.test.ts
#	packages/dashboard/src/__tests__/mission-interview.test.ts
#	packages/dashboard/src/__tests__/pr-metadata-generator.test.ts
#	packages/dashboard/src/__tests__/project-pause-resume-routes.test.ts
#	packages/dashboard/src/__tests__/routes-approval-sandbox-provisioning.test.ts
#	packages/dashboard/src/__tests__/routes-approval-secrets.test.ts
#	packages/dashboard/src/__tests__/routes-approval.test.ts
#	packages/dashboard/src/__tests__/routes-worktrunk.test.ts
#	packages/dashboard/src/__tests__/session-error-recovery.test.ts
#	packages/dashboard/src/__tests__/session-persistence-roundtrip.test.ts
#	packages/dashboard/src/__tests__/session-reconnect.test.ts
#	packages/dashboard/src/__tests__/session-resume-history.test.ts
#	packages/dashboard/src/__tests__/setup-routes.test.ts
#	packages/dashboard/src/__tests__/subtask-breakdown.test.ts
#	packages/dashboard/src/routes/__tests__/agent-avatar-routes.test.ts
#	packages/dashboard/src/routes/__tests__/custom-providers.test.ts
#	packages/dashboard/src/routes/__tests__/docker-node-routes.test.ts
#	packages/i18n/locales/en/app.json
#	plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts
2026-06-05 15:30:59 -07:00
gsxdsm
6d16c07197 merge: main (editor consolidation #1433, fast-tests, learnings) — renumber workflow_settings migration to 110, settings panel joins the sidebar disclosures, full-workspace literal sweep 2026-06-05 15:23:15 -07:00
gsxdsm
11fb9f1325 merge main: per-column agent assignment (binding validation, policy-escalation handshake, override notes) into workflow editor consolidation
Resolved 4 conflicts preserving both feature sets:
- WorkflowNodeEditor.tsx: kept card-node/edge/dialog/dirty-guard/auto-layout/
  onboarding/template/AI-edit features; wired main's columnAgentsEnabled flag
  gate, override-column agent registry load, and policy-escalation save retry
  (finishSave helper wraps both update payloads).
- WorkflowNodeEditor.test.tsx: kept U2/U4/AI-design describes plus main's U6
  column-agent describe; merged api mock + import lists.
- register-workflow-routes.ts: merged import sets (design DI seam + column-agent
  validators).
- agent-tools.ts: strip-approval-flags and column-agent binding assertion now
  both run in create/update tools.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:43:02 -07:00
gsxdsm
b7fa21c25e merge: main (column-agent assignment #1432) into workflow-settings — union executor/agent-tools/routes imports, both tool-description texts, both route helpers 2026-06-05 14:41:43 -07:00
gsxdsm
60f1b7fa39 Merge remote-tracking branch 'origin/main' into gsxdsm/cli-agent-interface
# Conflicts:
#	packages/dashboard/app/components/__tests__/ListView.test.tsx
2026-06-05 14:36:42 -07:00
gsxdsm
b8eea85dc9 Merge pull request #1432 from Runfusion/feat/column-agent-assignment
feat: per-column agent assignment for workflow columns
2026-06-05 14:19:53 -07:00
gsxdsm
59364e7c58 Address PR review feedback round 2 (#1432)
- R10 kill-switch: workflowColumns flag now gates the execution path (resolver
  installation + resume pass 2), making the documented rollback real
- resolver: skip parse candidates whose templateNodeId doesn't exist under the
  foreach (disambiguation guard)
- editor: reset the project-scoped agents cache on projectId change
- tests: kill-switch inertness, defer→own-settings release, candidate skip
2026-06-05 13:59:50 -07:00
gsxdsm
563cb5b372 Address PR review feedback (#1433)
- always dispose AI design session (try/finally) + rejecting-agent test
- prune expired design rate-limit entries per check
- apply workflowId precedence in createTaskWithReservedId
- compare-and-set migrated project default (no pre-transaction snapshot)
- reject fragment ids in setDefaultWorkflowId at the write boundary
- guard stripApprovalBypassFlags against malformed template nodes
- hoist duplicate stepToFragmentIr call in migration loop
- auto-layout preserves unplaced nodes (strictColumnForY)
- second same-pair connection births a failure edge for condition-capable sources
- insertFragment expands foreach templates into child nodes (lossless round-trip)
- copyIrWithFreshIds remaps namespaced foreach child layout keys
- discard stale AI-edit results after workflow switch
- i18n: returnEmptyString:false so empty locale placeholders fall back to en
- test fixes: schema-version titles, migrate idempotency assertion, TaskForm post-resolve + cross-mode regression, deterministic waits
2026-06-05 13:56:05 -07:00
gsxdsm
4209195743 fix(ci): deflake foreach palette test — wait for graph hydration before the palette click, extend node waitFor timeout 2026-06-05 09:44:45 -07:00
gsxdsm
2a0223472e Address PR review feedback (#1432)
- delimiter-safe foreach instance-id resolution via IR-validated candidates
- restart watcher handles binding removal/defer-flip and re-keys the reverse
  heartbeat guard on agent change/delete
- governing-node stamp owned by the pass-initiating foreach instance (race fix)
- editor: policy-escalation confirm/retry handshake on save; foreach children
  inherit the override note; project-scoped agent fetches; picker disabled on
  registry fetch error; column-agent strings in the canonical i18n catalog
- tests: update-tool escalation surface, PATCH escalation route, parity bound
  to run-derived stages, try/finally cleanup, deterministic event waits,
  symmetric defer surfaces, binding-release regression
2026-06-05 09:29:04 -07:00
gsxdsm
cfd1e2bf8f fix(ci): repair dashboard tests broken by cli-agent feature
- TaskFieldsSection.css: restore the toggle knob fill to the themed
  var(--card) token (was hardcoded to #fff on this branch), which the
  AgentListModal theme-token guard scans all app CSS for and rejects.
- ListView.test.tsx: add fetchBoardWorkflows + api to the ../../api mock;
  TaskDetailModal (rendered via the embedded detail) now calls both at mount
  for board workflows and the cli-sessions lookup, so the object-literal mock
  must provide them ("No X export is defined on the ../../api mock").
- auto-merge-toggle-blank.mobile.test.tsx / board-mobile-initial-render.test.tsx:
  revert the runOnlyPendingTimers→runAllTimers change; with the installed rAF
  shim that re-schedules itself, runAllTimers loops forever and trips vitest's
  10000-timer infinite-loop abort.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 04:19:33 -07:00
gsxdsm
5d4733e054 fix(ci): align engine/schema test stubs with cli-agent surface
The cli-agent executor feature added engine.getCliAgentRuntime() (called by
the CLI dashboard command at load) and bumped @fusion/core SCHEMA_VERSION
108→110. Update the stale test stubs:

- cli dashboard.test.ts: add getCliAgentRuntime() to the mock FnAgent class
  (returns undefined; runDashboard handles the no-runtime path). Fixes 52
  failures all rooted at `cwdEngine?.getCliAgentRuntime is not a function`.
- roadmap-store.test.ts: the roadmap store layers on core's Database, so its
  schema version tracks core; assert 110 instead of 108.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 04:19:21 -07:00
gsxdsm
79d6c6a667 fix(ci): resolve lint errors (useless-escape, prefer-const, unused param) 2026-06-05 03:56:29 -07:00
gsxdsm
b9afce306e fix(review): schema-version gate, output-filter escape-bypass, generic double-wrap, follow-up resolution
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:41:54 -07:00
gsxdsm
58723312d8 feat: bootstrap cli-agent runtime and wire executor, transport, chat, and recovery seams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:24:41 -07:00
gsxdsm
85f70148a1 feat(dashboard): wire cli-agent chat surface and runner glue; fix stale engine mocks (U12 completion)
Mount CliChatSurface in ChatView for cli-backed chat sessions (sessions carrying
cliExecutorAdapterId): the message-pane + composer region is delegated to the
surface (transcript/raw-terminal toggle for hybrid/native adapters, terminal-only
for the generic adapter), while regular sessions keep the standard composer. The
existing message list and composer JSX are captured once as render thunks and
passed through, so there is no parallel message/composer UI.

Add a narrow telemetry seam: TelemetryHub gains an optional onEvent tap (also
settable post-construction via setEventListener) invoked with each sanitized
event after routing — best-effort, a throwing listener never breaks ingest. This
is the seam the CliChatSessionRunner uses to build the durable transcript from
the same sanitized events the hook route already feeds the hub, without the hub
becoming a general subscriber bus.

Fix the stale @fusion/engine vi.mocks across dashboard tests: object-literal
mocks that fully replace the module now also return listCliAdapterDescriptors
(added by U15's cli-agent-settings route, evaluated at module load). Mocks that
spread importOriginal/importActual already pick it up.

Tests: new ChatView.cli-mount.test.tsx (cli session → CliChatSurface, regular
session → normal composer, generic → terminal-only); telemetry-hub onEvent tap
coverage. chat-attachment-routes, chat-cli-sessions, cli-agent-hooks-route,
ChatView.cli-toggle all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:02:27 -07:00
gsxdsm
d30e29fe6a Merge U12: cli-agent hybrid chat transcript with raw-terminal toggle 2026-06-05 02:39:51 -07:00
gsxdsm
ace710633c feat(dashboard): cli-agent hybrid chat transcript with raw-terminal toggle (U12)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 02:38:38 -07:00
gsxdsm
7a80d29d4c feat(dashboard): mobile terminal input bar with sticky Ctrl accessory keys (U13)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 02:27:46 -07:00
gsxdsm
58902ae38c fix(ci): use defined space tokens and drop raw rgba box-shadow fallback in editor CSS 2026-06-05 02:16:34 -07:00
gsxdsm
6c9a81a05f fix(review): apply autofix feedback 2026-06-05 01:53:42 -07:00
gsxdsm
dfe8dfd70a fix(ci): add createWorkflowAuthoringTools to partial engine mocks; bump roadmap schema assertion to 109 2026-06-05 01:45:48 -07:00
gsxdsm
e10db81393 feat(dashboard): cli-agent terminal UI, task-card states, and notification banner support (U11)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 01:16:13 -07:00
gsxdsm
1dbb7052ae refactor(dashboard): extract all remaining Project sections — SettingsModal is now a shell (7,883 → 2,905 lines) 2026-06-05 01:10:35 -07:00
gsxdsm
a47ea3f7a1 fix(review): strip approval-bypass flags in agent workflow authoring for chat/planning lanes 2026-06-05 01:05:51 -07:00
gsxdsm
d05d5f575f fix(review): apply autofix feedback 2026-06-05 00:57:49 -07:00
gsxdsm
968e9a45fc feat(dashboard): node editor becomes the primary workflow surface; retire WorkflowStepManager 2026-06-05 00:48:24 -07:00
gsxdsm
580120e5d5 test(dashboard): revert unrelated board-mobile mock tweak — failure is pre-existing on main (infinite-timer abort, FN-4574 suite) 2026-06-05 00:47:52 -07:00
gsxdsm
3a33604159 feat(dashboard): remove moved settings from SettingsModal with workflow-editor redirect stubs, target-IA regroup, secrets/prompts extraction 2026-06-05 00:46:59 -07:00