Commit Graph

2644 Commits

Author SHA1 Message Date
gsxdsm
f3de45b050 fix(teardown): improve cleanup logic to avoid shared directory deletion 2026-04-19 01:03:36 -07:00
Fusion
9d9f0ac3bd Cleanup and fix transient error detection in review 2026-04-19 01:03:36 -07:00
gsxdsm
48b53d1bdb Cleanup and fix transient error detection in review 2026-04-18 23:47:05 -07:00
gsxdsm
bc841e9bf6 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
c77a4a572e feat(FN-2088): merge fusion/fn-2088 2026-04-18 23:22:26 -07:00
gsxdsm
456c8ed6e6 feat(FN-2017): merge fusion/fn-2017 2026-04-18 23:22:20 -07:00
gsxdsm
83458f1eca feat(FN-2108): merge fusion/fn-2108 2026-04-18 22:53:07 -07:00
gsxdsm
ecafaf496c feat(FN-2086): merge fusion/fn-2086 2026-04-18 22:52:33 -07:00
Fusion
d642af311d 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
63ecb21c39 feat(FN-2106): merge fusion/fn-2106 2026-04-18 22:37:29 -07:00
gsxdsm
18d2634dbe feat(FN-2103): merge fusion/fn-2103 2026-04-18 22:37:20 -07:00
gsxdsm
614f9b4ddd feat(FN-2082): merge fusion/fn-2082 2026-04-18 22:22:20 -07:00
Fusion
89cc85a499 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
e1171ba24c feat(FN-2101): merge fusion/fn-2101 2026-04-18 22:09:32 -07:00
gsxdsm
4e3e2ca7fe feat(FN-2092): merge fusion/fn-2092 2026-04-18 22:07:20 -07:00
gsxdsm
b0028c077f Remove moshi skills 2026-04-18 22:07:07 -07:00
Fusion
ff59470b03 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
5d65667a5a feat(FN-2081): merge fusion/fn-2081 2026-04-18 21:52:21 -07:00
Fusion
dc9f5c68f9 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
643010d708 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
b1d9d43d2e fix(FN-000): harden mobile terminal focus capture for soft keyboard 2026-04-18 21:17:01 -07:00
gsxdsm
14cf34bef2 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
Fusion
0904760f5e fix(FN-2077): use no-task prompt for ambient heartbeat runs
- Add HEARTBEAT_NO_TASK_SYSTEM_PROMPT for no-task heartbeat sessions with only non-task-scoped tooling guidance
- Switch heartbeat session setup to choose the no-task base prompt when executing without task context
- Keep agent instruction and memory enrichment on top of the selected base prompt for both task and no-task runs
- Extend heartbeat tests to verify no-task prompts exclude task-scoped tool references and are passed into createKbAgent
2026-04-18 20:56:13 -07:00
Fusion
4941023006 fix(FN-2058): handle symlinked markdown directory scanning
- Follow symlink entries that resolve to directories so linked markdown trees are discovered
- Add guarded scan diagnostics for non-ENOENT directory read failures without noisy missing-dir logs
- Expand markdown scanner regression tests for symlinks, empty roots, deep nesting, and .md-like directory names
- Clarify the Documents view empty-state copy to say no Markdown files were found in the project
2026-04-18 20:56:13 -07:00
gsxdsm
e271f68a4c feat(FN-2085): merge fusion/fn-2085 2026-04-18 20:56:13 -07:00
gsxdsm
d559e790a2 feat(FN-2083): merge fusion/fn-2083 2026-04-18 20:56:13 -07:00
gsxdsm
f2e5f803ea fix(FN-000): improve mobile terminal helper textarea focus target 2026-04-18 20:56:13 -07:00
gsxdsm
77fa635345 feat(FN-2076): merge fusion/fn-2076 2026-04-18 20:56:12 -07:00
gsxdsm
ba58095165 feat(FN-2071): merge fusion/fn-2071 2026-04-18 20:56:12 -07:00
Fusion
453076f666 feat(FN-2075): merge fusion/fn-2075 2026-04-18 20:56:12 -07:00
Fusion
898d4d70a5 fix(FN-2060): preserve quick chat state on streaming errors
- Trigger onError for unexpected AbortError failures in streamChatResponse while ignoring user-initiated closes
- Keep quick chat user messages on send errors, reset streaming state, and reload messages from the server
- Persist partial assistant output (including thinking-only fallbacks) when AI processing fails mid-stream
- Add regression coverage for stream abort handling, quick chat error UX, and partial-response persistence
2026-04-18 20:56:12 -07:00
gsxdsm
a32cdd829b feat(FN-2073): merge fusion/fn-2073 2026-04-18 20:56:12 -07:00
Fusion
5ae81f6d72 docs(FN-2063): refresh dashboard guide screenshots
- Replace outdated dashboard screenshots across the guide and demo asset
- Add new view screenshots for chat, documents, list, mailbox, memory, nodes, roadmaps, and skills
- Update docs/dashboard-guide.md to reference the new visuals for current UI flows
2026-04-18 20:56:12 -07:00
Fusion
2f138cdf61 fix(FN-2116): restore agent run logs 2026-04-18 20:56:12 -07:00
gsxdsm
8e75c39353 fix(FN-2116): restore agent run logs 2026-04-18 17:59:42 -07:00
gsxdsm
cb7f050070 feat(FN-2068): merge fusion/fn-2068 2026-04-18 17:52:12 -07:00
gsxdsm
31b88cdad3 fix(FN-2116): allow two vitest workers 2026-04-18 17:48:22 -07:00
gsxdsm
e70f9aebc0 fix(FN-2116): show paused agents and cap vitest workers 2026-04-18 17:34:44 -07:00
gsxdsm
301faefbd6 fix(FN-2116): use sqlite-backed agent storage 2026-04-18 17:25:17 -07:00
Fusion
e7a09c77a8 docs(FN-2067): expand CLI docs for skills and command flags
- Add fn skills quick-start examples to the README command snippets
- Add a dedicated fn skills section in the CLI reference with search/install usage and option docs
- Document --interactive support for daemon and desktop command usage and option tables
- Expand settings export/import flag documentation and refresh the option cross-reference matrix
2026-04-18 17:07:02 -07:00
gsxdsm
99999e5c3e fix(dashboard): keep previous tasks visible during project switch
Dropping the render-phase setTasks([]) on projectId change avoids the
blank flash and full empty→populated Board reconcile that made project
switches feel like a multi-second hang. The existing fetch/version
guards already reject late responses and stale SSE events, so the
previous project's rows safely stay on screen until the new fetch lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:57:58 -07:00
Fusion
8435b685cf fix(FN-2065): log final merge cleanup reset failures
- Log final-path git reset --merge cleanup failures in aiMergeTask with task-scoped warning details
- Preserve the original "all 3 attempts exhausted" merge error even when cleanup reset fails
- Add merger retry tests covering successful final cleanup and failed final cleanup logging behavior
- Add a patch changeset for @gsxdsm/fusion documenting the improved merger diagnostics
2026-04-18 16:39:34 -07:00
Fusion
5f04cf05b2 fix(FN-2061): remove agents tab from mobile nav
- Remove the agents tab button and showAgentsTab prop from MobileNavBar.
- Stop passing showAgentsTab from App to keep mobile navigation aligned with current feature exposure.
- Update MobileNavBar and mobile regression tests to remove agents-tab assertions and verify agents access via header fallback when mobile nav is disabled.
2026-04-18 16:12:30 -07:00
Fusion
60877e2991 fix(FN-2057): move DocumentsView base styles outside mobile media query
- Move the core DocumentsView, document group, and document card styles to global scope so they apply on desktop and tablet
- Keep the max-width: 768px block focused on mobile-only agent and skills layout overrides
- Preserve existing design tokens and interaction states while restoring expected non-mobile DocumentsView styling
2026-04-18 16:01:23 -07:00
Fusion
7a230cfd3d feat(FN-2049): expand memory view with multi-file editing and retrieval controls
- Extend useMemoryData with multi-file memory documents, settings state, and retrieval test helpers
- Upgrade MemoryView working memory tab to manage multiple files with file switching and editor actions
- Add configuration controls for dreams mode and auto-summarize behavior in memory settings
- Integrate qmd retrieval testing in the engines tab and surface retrieval results in dedicated cards
- Add styles for memory settings panels and retrieval result cards to match dashboard UI patterns
2026-04-18 15:07:39 -07:00
Fusion
f14dec5770 fix(FN-2013): flush buffered SSE events at stream end
- Remove the trailing-newline guard when flushing pending SSE buffer data in streamChatResponse
- Re-enable the regression test covering final done events without a trailing blank line
- Add parser coverage for chunk-split events, newline-terminated streams, and incomplete trailing fragments
- Add a patch changeset for @gsxdsm/fusion documenting the SSE final-buffer flush fix
2026-04-18 14:55:20 -07:00
Fusion
72f3d04d09 feat(FN-1980): add project markdown files to Documents view
- Add backend Markdown scanner and /project-files/md endpoint with directory exclusions, depth/size limits, and search filtering
- Extend dashboard API and useDocuments hook to fetch task documents and project markdown files in parallel with resilient partial-failure handling
- Update Documents view with a collapsible Project Files section, inline metadata previews, and on-demand file content expansion from workspace API
- Add and refresh hook and file-service tests to cover markdown scanning, query propagation, project scoping, and fetch error behavior
- Add token-based styles for project file cards and responsive mobile adjustments in the documents panel
2026-04-18 14:32:42 -07:00
Fusion
1851469575 feat(FN-1986): improve skills content loading and mobile detail UX
- Normalize GET /api/skills/:id/content handling by decoding encoded IDs and returning consistent invalid-id and not-found responses
- Update readSkillContent to use stat-based file vs directory detection, read SKILL.md robustly, and list non-SKILL.md entries
- Refine SkillsView interactions to ignore toggle clicks, support explicit retry of failed content fetches, and show a SKILL.md fallback placeholder
- Add/adjust dashboard route, component, and mobile CSS tests to cover content route behavior, retry flow, and touch-friendly detail panel styles
2026-04-18 14:09:47 -07:00
Fusion
44caaa45d9 fix(FN-2055): harden node test utilities and import resolution
- Convert seed-sample-nodes into a test-only helper and remove direct execution against the real central database
- Replace private-looking host examples with RFC 5737 test-net addresses in node connection docs and ConnectNodeModal expectations
- Add Vitest aliases for @fusion/core and @fusion/engine to stabilize cross-package test imports
- Load AgentReflectionService via local engine source path in in-process runtime to avoid alias resolution failures
2026-04-18 12:21:14 -07:00
Fusion
de674b1844 refactor(FN-2056): replace agent preset emojis with symbol glyphs
- Replace emoji role icons in AgentListModal, AgentsView, and NewAgentDialog with consistent geometric symbols
- Update agent preset catalog icons, including reviewer and template agent presets, to professional symbol-based glyphs
- Change the default unknown-role icon fallback from a robot emoji to a neutral symbol
- Update NewAgentDialog and agent-presets tests to assert symbol icons and broaden icon validation beyond emoji ranges
2026-04-18 12:14:43 -07:00