Commit Graph

2622 Commits

Author SHA1 Message Date
Fusion
b4e604688c fix(FN-2137): right-align usage modal footer actions
- Wrap the Refresh and Close footer buttons in a dedicated right-aligned action group
- Preserve existing refresh/close behavior while improving footer layout consistency
- Add .usage-actions-right styles with token-based spacing and margin-left auto
2026-04-19 10:13:34 -07:00
gsxdsm
85be92f294 feat(FN-2135): merge fusion/fn-2135 2026-04-19 10:13:34 -07:00
Fusion
9d53ae1143 refactor(FN-2129): route agent-instructions warnings through structured logger
- Replace direct console.warn calls in agent-instructions with createLogger("agent-instructions") warnings
- Keep existing truncation and path-validation safeguards while standardizing diagnostic output format
- Add focused diagnostics tests that verify single warning emission for truncation and invalid instructionsPath scenarios
- Add coverage for missing instructions files and project memory read failures to ensure graceful fallback behavior
2026-04-19 10:13:34 -07:00
Fusion
8958d84fb6 fix(FN-2124): harden swallowed project-engine error paths
- Replace previously silent catch blocks in auto-merge and settings-listener flows with runtimeLog.warn messages
- Add warning logs for startup and periodic auto-merge sweeps plus poll interval fallback when settings reads fail
- Add regression tests that force each swallowed-error path and assert structured warnings are emitted
- Cover global/engine unpause resumeOrphaned failures and stuck-detector checkNow failures in project-engine tests
2026-04-19 10:13:34 -07:00
Fusion
5b74a4d531 fix(FN-2111): select no-task heartbeat prompt by run type
- Promote HEARTBEAT_NO_TASK_SYSTEM_PROMPT as the primary no-task heartbeat constant while keeping a backward-compatible alias.
- Refine no-task heartbeat guidance for lightweight ambient coordination and explicit tool usage.
- Select the no-task prompt for heartbeat runs without task context before appending instruction/rating overlays.
- Update heartbeat regression tests to assert the renamed no-task prompt constant and prompt/tool expectations.
2026-04-19 10:13:34 -07:00
Fusion
9d943f850a test(FN-2125): add refresh fetch rejection regression coverage
- Add a useBackgroundSessions test for refresh fetch rejection after initial sessions load
- Assert the hook logs the expected warning with the thrown refresh error
- Verify existing sessions remain intact when refresh fails to prevent state regression
2026-04-19 10:13:34 -07:00
Fusion
fc723ce1ba test(FN-2122): isolate HOME for core and CLI vitest runs
- Add test setup files in core and CLI that override HOME to a per-worker temp directory
- Wire the new isolation setup into core and CLI vitest setupFiles before existing test bootstrap
- Add a core canary test to verify HOME, homedir(), and defaultGlobalDir() resolve under isolated temp paths
- Document how global HOME isolation complements per-fixture isolation in test-project utilities
2026-04-19 10:13:34 -07:00
Fusion
bade52f5bc feat(FN-2121): introduce structured logging in plugin loader
- Add a reusable createLogger utility in @fusion/core for prefixed log/warn/error output
- Replace plugin-loader console logging with structured logger calls across load, reload, stop, and hook paths
- Route plugin-scoped logger methods through createLogger, including debug gating on DEBUG=plugins
- Add regression tests that mock logger.js and verify key structured log emissions and error logging flows
2026-04-19 10:13:34 -07:00
gsxdsm
b4e67b4223 feat(FN-2120): merge fusion/fn-2120 2026-04-19 10:13:34 -07:00
gsxdsm
bbc0ce89be feat(FN-2119): merge fusion/fn-2119 2026-04-19 10:13:34 -07:00
Fusion
3f8a2e9442 fix(FN-2107): normalize task ID handling for task creation tools
- Return the created task ID directly from runTaskPlan and propagate it through fn_task_plan
- Remove hardcoded FN-### log parsing so CLI extension supports structured IDs like PROJ-042
- Add heartbeat fallback parsing from task_create text output when details.taskId is absent
- Expand engine and CLI tests to cover structured task IDs and updated task-plan return behavior
2026-04-19 10:13:34 -07:00
Fusion
e0f6647d11 feat(FN-2118): merge fusion/fn-2118 2026-04-19 10:13:33 -07:00
Fusion
f7bd321d42 fix(FN-2117): log swallowed engine runtime errors
- Add structured warning logs in silent catch paths for IPC worker shutdown, plugin unregistration cleanup, child runtime metrics polling, and merger build rollback reset
- Improve merger rollback warning context to make build-verification reset and retry failures easier to diagnose
- Add regression tests covering each new warning path to ensure errors are surfaced without changing existing control flow
- Add StepSessionExecutor test coverage for cherry-pick abort logging when conflict cleanup fails
2026-04-19 10:13:33 -07:00
Fusion
12f1e7fa32 feat(FN-2116): add start action for terminated agent cards
- Add a Start button for terminated agents in board cards alongside Delete
- Add a Start action for terminated agents in list cards with icon + label
- Reuse the existing state transition handler to move terminated agents back to active
- Extend AgentListModal tests to cover Start button visibility and start action behavior
2026-04-19 10:13:33 -07:00
gsxdsm
bbeb7183e4 feat(FN-2110): merge fusion/fn-2110 2026-04-19 10:13:33 -07:00
gsxdsm
beff7e2679 feat(FN-2105): merge fusion/fn-2105 2026-04-19 10:13:33 -07:00
gsxdsm
149134aafd feat(FN-2104): merge fusion/fn-2104 2026-04-19 10:13:33 -07:00
Fusion
6e3503b811 feat(FN-2030): add project markdown explorer to Documents view
- Add recursive markdown file discovery in file-service with excluded directories and sorted metadata output
- Expose GET /api/files/markdown and wire a frontend API client plus useProjectMarkdownFiles hook
- Redesign DocumentsView with project/task tabs, search, task grouping, and desktop/mobile file preview flows
- Add coverage for markdown scanning and DocumentsView behaviors, and update useDocuments tests for new API usage
2026-04-19 10:13:33 -07:00
gsxdsm
97eb3c2c8b feat(FN-2112): merge fusion/fn-2112 2026-04-19 10:13:33 -07:00
gsxdsm
3c80b8028e feat(FN-2109): merge fusion/fn-2109 2026-04-19 10:13:33 -07:00
Fusion
91abafc11c docs(FN-2097): clarify layered memory layout and legacy fallback semantics
- Update memory architecture and contributing docs to describe .fusion/memory/ as the canonical layered workspace
- Reframe .fusion/memory.md references as a deprecated legacy fallback used only for migration/alias compatibility
- Expand the memory plugin contract with explicit layered layout, migration behavior, and invariant language
- Align settings reference memory-insight file descriptions with the canonical long-term memory model
2026-04-19 10:13:33 -07:00
gsxdsm
d7943e87b2 feat(FN-2099): merge fusion/fn-2099 2026-04-19 10:13:33 -07:00
Fusion
5f89c64194 feat(FN-2102): merge fusion/fn-2102 2026-04-19 10:13:33 -07:00
Fusion
58bb0d41b7 fix(FN-2098): align no-task heartbeat guidance and stabilize flaky tests
- Update HEARTBEAT_NO_TASK_SYSTEM_PROMPT copy to emphasize inbox, memory, delegation, and heartbeat_done usage
- Expand heartbeat monitor tests to assert no-task prompt/tool alignment and preserve task-scoped prompt behavior
- Harden first-run and App view tests by using a safe cwd fallback and more robust async UI waits
- Add best-effort dashboard performance reporting hooks in App and useProjects via a new reportDashboardPerf API helper
2026-04-19 10:13:33 -07:00
Fusion
c920ecb6e5 docs(FN-2094): align memory plugin contract with OpenClaw layout
- Rewrite memory backend contract docs to match shipped MemoryBackend interfaces, capabilities, and registry behavior
- Clarify .fusion/memory/ as the canonical layered workspace and keep .fusion/memory.md compatibility-only
- Document backend resolution through memoryBackendType with qmd as the default and qmd-to-file search fallback behavior
- Synchronize architecture, contributing, and settings reference docs with the updated memory model terminology
2026-04-19 10:13:33 -07:00
Fusion
7cb9fd61ba Remove dashboard-load timing instrumentation
The perf logs were temporary diagnostics used to identify that slow
reloads were caused by a registered remote node timing out in
/projects/across-nodes. Root cause is resolved and the short-circuit
for zero-remote setups (already committed in 7ea60382a) remains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:13:33 -07:00
gsxdsm
af833c3264 Remove dashboard-load timing instrumentation
The perf logs were temporary diagnostics used to identify that slow
reloads were caused by a registered remote node timing out in
/projects/across-nodes. Root cause is resolved and the short-circuit
for zero-remote setups (already committed in 7ea60382a) remains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 01:03:36 -07:00
Fusion
f528b379c3 feat(FN-2089): merge fusion/fn-2089 2026-04-19 01:03:36 -07:00
gsxdsm
a2d0711c33 fix(teardown): improve cleanup logic to avoid shared directory deletion 2026-04-19 01:03:36 -07:00
Fusion
7cc4563a1f Cleanup and fix transient error detection in review 2026-04-19 01:03:36 -07:00
gsxdsm
4bd3dc5c26 Cleanup and fix transient error detection in review 2026-04-18 23:47:05 -07:00
gsxdsm
1cbf9e1015 test: enforce test-directory isolation across all packages
Introduce a shared test-utils module and global vitest setup that
guarantee tests never write to the real .fusion directory or leak temp
directories under /tmp.

Infrastructure:
- packages/core/src/__test-utils__/workspace.ts — tempWorkspace(),
  useIsolatedCwd(), trackForCleanup(), assertOutsideRealFusion() with
  auto-cleanup in afterEach.
- packages/core/src/__test-utils__/vitest-setup.ts — per-worker guard:
  chdirs each worker into an isolated tmp dir, wraps process.chdir to
  refuse the real .fusion, scopes tmp dirs under fusion-test-workers/
  (skips cwd change in thread-pool workers where chdir isn't supported).
- packages/core/src/__test-utils__/vitest-teardown.ts — globalSetup
  hook that wipes the shared parent even when workers are SIGKILLed.
- scripts/check-test-isolation.mjs + `test:isolated` / `test:check-
  isolation` scripts for CI.
- @fusion/test-utils alias + setupFiles + globalSetup wired into core,
  cli, engine, dashboard, tui vitest configs; matching tsconfig paths.

Test refactors (no behavior change):
- cli provider-settings, auth-paths, provider-auth — switch leaking
  mkdtempSync calls to tempWorkspace().
- core migration, first-run, store-backward-compat — replace manual
  process.chdir save/restore with useIsolatedCwd().
- tui fusion-context — replace 9 hardcoded tmp paths (collision-prone
  under parallelism) with tempWorkspace().
- dashboard useTheme, FileBrowser, TaskCard — resolve source-file reads
  against a PACKAGE_ROOT computed from import.meta.url instead of cwd,
  so tests don't depend on the process working directory.

Verified: full suite (~15,500 tests across 8 packages + plugins) passes
and the orphan-detector reports zero leaked temp directories after a
complete run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 23:41:47 -07:00
gsxdsm
cae24ce600 feat(FN-2088): merge fusion/fn-2088 2026-04-18 23:22:26 -07:00
gsxdsm
49fea9ede7 feat(FN-2017): merge fusion/fn-2017 2026-04-18 23:22:20 -07:00
gsxdsm
e77226099f feat(FN-2108): merge fusion/fn-2108 2026-04-18 22:53:07 -07:00
gsxdsm
00a01de81c feat(FN-2086): merge fusion/fn-2086 2026-04-18 22:52:33 -07:00
Fusion
049f356f88 feat(FN-2087): finalize canonical memory path migration
- Remove legacy .fusion/memory.md fallback references and normalize prompts/docs to .fusion/memory/MEMORY.md
- Stop legacy mirror writes and fallback reads in core memory backend and project memory flows
- Update engine worktree boundary checks and tests for canonical memory file handling
- Align dashboard memory/settings surfaces and route tests with canonical memory behavior
- Add model-favorites persistence test coverage for mission interview and new agent dialogs
2026-04-18 22:47:17 -07:00
gsxdsm
3cb7c226ec feat(FN-2106): merge fusion/fn-2106 2026-04-18 22:37:29 -07:00
gsxdsm
9307dc2249 feat(FN-2103): merge fusion/fn-2103 2026-04-18 22:37:20 -07:00
gsxdsm
b71ffac4a9 feat(FN-2082): merge fusion/fn-2082 2026-04-18 22:22:20 -07:00
Fusion
d1c097e825 fix(FN-2090): log and cover engine warning fallbacks
- Add structured warning logs for plugin-runner fallback paths instead of silent catches
- Add warning telemetry in agent-tools for agent-memory directory, QMD search, and index refresh failures
- Log cron-runner session disposal failures and update agent-logger persistence warnings to use logger output
- Expand engine tests to cover warning behavior across plugin-runner, agent-tools, cron-runner, and agent-logger
2026-04-18 22:18:55 -07:00
Fusion
fce07dacbc feat(FN-2101): merge fusion/fn-2101 2026-04-18 22:09:32 -07:00
gsxdsm
3a05ea0198 feat(FN-2092): merge fusion/fn-2092 2026-04-18 22:07:20 -07:00
gsxdsm
c89da44125 Remove moshi skills 2026-04-18 22:07:07 -07:00
Fusion
53cad3ba9d fix(FN-2078): adopt canonical .fusion/memory paths
- Update core and engine prompt text to reference .fusion/memory/ with MEMORY.md and daily-note guidance
- Allow worktree tool boundary access to .fusion/memory/ files while preserving legacy .fusion/memory.md compatibility
- Revise memory compaction/insight extraction messaging and related type/docs comments to use canonical memory paths
- Refresh dashboard and test expectations across core/engine/dashboard/docs for the new memory path wording
2026-04-18 22:02:46 -07:00
gsxdsm
94bbca31da feat(FN-2081): merge fusion/fn-2081 2026-04-18 21:52:21 -07:00
Fusion
76d318ca5e fix(FN-2091): improve reset-cleanup diagnostics in merger retries
- Add context-rich warning messages for git reset --merge failures in merge-cleanup, build-retry, and merge-retry paths
- Log reset cleanup failures during build-verification rollback in executeMergeAttempt
- Add targeted merger tests covering reset cleanup failures across retry and verification error scenarios
- Update retry-logic assertions to validate the new diagnostic message formats
2026-04-18 21:50:31 -07:00
Fusion
891c95bf89 fix(FN-2084): improve auto-merge error recovery observability
- Add runtimeLog.error diagnostics when auto-merge recovery updates fail after conflict, non-conflict, or strategy errors
- Keep recovery behavior best-effort while surfacing concrete failure reasons from thrown exceptions
- Add merge-error-recovery tests for conflict retry exhaustion, non-conflict/strategy failures, and verification-error rollback to in-progress
- Verify recovery paths do not crash merge draining when persistence calls fail
2026-04-18 21:30:30 -07:00
Fusion
7a33b5c1dd fix(FN-000): harden mobile terminal focus capture for soft keyboard 2026-04-18 21:17:01 -07:00
gsxdsm
806f8ab042 fix(FN-000): restore Claude usage dashboard after Anthropic OAuth changes
Anthropic now requires `anthropic-beta: oauth-2025-04-20` on /api/oauth/usage
for OAuth-scoped tokens; without it the endpoint returns 401 "OAuth
authentication is currently not supported" and the dashboard falls back to
a PTY-based CLI parser that times out at 75s. Mirrors the header the Claude
CLI (2.1.114) sends from `claude /usage`, and also aligns the refresh call
with the CLI's JSON body + `scope` field so token refresh keeps working.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 20:56:13 -07:00