Commit Graph

3421 Commits

Author SHA1 Message Date
github-actions[bot]
23ea4275f5 Version Packages 2026-04-23 19:40:55 +00:00
gsxdsm
7d31b21c77 fix(FN-000): skip iOS gesture focus handler so typed keys reach xterm
On iOS Safari/PWA, tapping the terminal opened the on-screen keyboard but
keystrokes were silently dropped. After the earlier CSS fix (c7266b7f) the
helper textarea now covers the terminal surface and iOS focuses it natively
on tap — but the bubble-phase onPointerDown/onTouchStart handler kept
re-focusing xterm + the textarea and calling setSelectionRange during the
touch gesture. That is the same class of re-focus-mid-gesture that the
prior commit identified as disrupting iOS input attribution; moving from
capture to bubble phase wasn't enough.

- Early-return from handleTerminalGestureFocus on
  (hover: none) and (pointer: coarse), so iOS handles focus with no JS
  interference.
- Desktop (fine pointer) keeps the existing behavior because the textarea
  stays 1x1 off-screen and still needs programmatic focus on canvas click.
- Add a regression test covering the no-op path with the media query mocked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 12:38:13 -07:00
Fusion
c6842c9bab fix(FN-2326): harden TaskStore observability logging paths
- Add a task-store logger and funnel activity listeners through a shared helper that logs source-event failures
- Replace silent catches with structured warn/error logs for workflow default resolution, title summarization, fs.watch, and polling paths
- Preserve best-effort behavior for activity recording and async summarization while attaching actionable error context
- Expand TaskStore tests to validate logging behavior for activity insert failures, listener rejections, workflow fallback, and watch/poll error handling
2026-04-23 12:36:52 -07:00
Fusion
445bdb2eea feat(FN-2328): add manager dropdown for agent reports-to setting
- Replace free-text Reports To input with a manager select populated from fetched agents
- Exclude the current agent from manager candidates and preserve unknown manager IDs as a fallback option
- Save selected manager IDs through updateAgent, including clearing reportsTo when No manager is selected
- Expand AgentDetailView settings tests for manager selection behavior and increase task document cascade test timeout stability
2026-04-23 12:23:56 -07:00
gsxdsm
bc0f776359 chore: remove unused test_file.txt
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 12:08:31 -07:00
gsxdsm
39f7709b47 fix: surface engine logs in dashboard TUI via console capture
The dashboard TUI Logs tab only showed the handful of lines emitted
through DashboardLogSink directly. Everything from @fusion/engine
(scheduler, executor, triage, merger, PR monitor, heartbeat, etc.)
logs via createLogger() which writes straight to console.error —
bypassing the sink. Under the TUI's alt screen those writes either
overdrew the frame or scrolled off, leaving the Logs tab near-empty.

DashboardLogSink now offers captureConsole() / releaseConsole():
while the TUI is running, console.log/warn/error are intercepted
and routed into the ring buffer. A leading `[prefix]` tag is
extracted so entries carry the subsystem name. Original console
functions are restored (by identity) on TUI shutdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 12:05:48 -07:00
gsxdsm
bbdd11aab3 fix: guard SQLite FTS5 at runtime and fall back to LIKE search
On Node builds whose bundled node:sqlite was compiled without
SQLITE_ENABLE_FTS5 (older 22.x LTS), `fn dashboard` crashed on first
run with `Error: no such module: fts5` during schema migration 21.

Database and ArchiveDatabase now probe FTS5 at startup via a disposable
virtual table. When unavailable, migrations 21 and 35 skip the tasks_fts
DDL, ArchiveDatabase skips the archived_tasks_fts block, and
TaskStore.searchTasks / ArchiveDatabase.search fall back to LIKE scans
over id/title/description/comments with ESCAPE-aware patterns.

Set FUSION_DISABLE_FTS5=1 to force the fallback on runtimes where FTS5
is available but undesirable (e.g. reproducing fresh-install behavior
in tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 12:05:35 -07:00
gsxdsm
01e24dfbdb feat(FN-2298): merge fusion/fn-2298 2026-04-23 12:00:05 -07:00
Fusion
df2836c01d fix(FN-2312): stabilize dashboard TUI log navigation and merge log streaming
- Keep the Logs tab viewport anchored to selection so users can navigate the full in-memory ring buffer with arrow keys and Home/End
- Route streamed merge agent text through the dashboard log sink via a buffered line assembler to avoid raw fragment writes in TTY mode
- Expand dashboard and dashboard-tui command tests to cover viewport behavior, expanded log interactions, and streamed merge log handling
- Update CLI reference docs and add a @runfusion/fusion patch changeset describing the TUI log behavior fixes
2026-04-23 11:32:26 -07:00
Fusion
e77dfffc9b feat(FN-2296): move project management into selector dropdown
- Move the project management entry into the desktop project selector dropdown UI
- Simplify Header rendering and remove redundant standalone project management navigation controls
- Update Header and multi-project flow tests to validate the new dropdown interaction pattern
- Refresh header styles to support the revised selector layout and menu behavior
2026-04-23 11:16:11 -07:00
gsxdsm
807c1f6137 feat(FN-2317): merge fusion/fn-2317 2026-04-23 11:00:04 -07:00
Fusion
879f8a2e04 fix(FN-2313): make PR auth checks gh-first across settings UI
- Replace the server-computed settings flag with prAuthAvailable and document it in shared Settings types
- Compute PR auth availability from gh CLI auth first, with GITHUB_TOKEN as fallback in GET /api/settings
- Rename dashboard settings state/props/hooks from githubTokenConfigured to prAuthAvailable and strip server-owned auth fields on save
- Update PR section messaging to guide users to run 'gh auth login' and refresh related route/component tests
2026-04-23 10:58:36 -07:00
Fusion
d8e86ba4c4 fix(FN-2321): standardize loopback-gated integration test labeling
- Refine the dashboard loopback integration helper with documented helper contracts and centralized skipped-name formatting
- Keep loopback bind detection memoized so all gated integration suites share one environment probe
- Update loopback-gated dashboard suites to use consistent, explicit scope labels in skip output
- Refresh skipped-test inventory docs with the new audit commands and loopback helper usage details
2026-04-23 10:50:44 -07:00
Fusion
86fd24e1d0 feat(FN-2311): default dashboard TUI to system section
- Reorder dashboard TUI sections so System is tab [1] and the initial active view
- Update header rendering across wide, medium, and narrow terminal layouts to reflect the new tab order
- Expand dashboard TUI tests to assert system-first labels and default active section behavior
- Document system-first startup behavior in CLI reference and add a patch changeset for @runfusion/fusion
2026-04-23 10:43:45 -07:00
Fusion
187e5fccf0 feat(FN-2306): add fresh quick-chat thread creation flow
- Add startFreshSession to useQuickChat so users can explicitly create a new persisted session for the current agent/model target
- Refactor session creation into a shared helper and track current session target to support fresh-thread creation without changing selection
- Add a New chat action to the QuickChatFAB header that starts a fresh thread while preserving active model/agent context
- Update quick chat hook/component tests to verify new-session behavior and message streaming targets
- Add header action styling for the new quick-chat controls
2026-04-23 10:24:19 -07:00
Fusion
c7f7ac722a feat(FN-2322): centralize loopback integration test gating
- Add a shared createLoopbackIntegrationTest helper that probes 127.0.0.1 binding once and caches the result
- Use the helper in webhook, websocket, and static asset integration tests to replace duplicated loopback detection logic
- Improve skip diagnostics by including a consistent skip reason and integration scope in skipped test names
2026-04-23 10:09:26 -07:00
gsxdsm
29056b412d fix(FN-2251): default durable agent heartbeats on 2026-04-23 09:42:54 -07:00
Fusion
e655277bf4 feat(FN-2307): merge fusion/fn-2307 (auto-resolved)
- docs(FN-2307): complete Step 3 — document Hermes runtime selection
- test(FN-2307): complete Step 2 — add Hermes runtime compatibility tests
- feat(FN-2307): complete Step 1 — align Hermes runtime metadata
2026-04-23 09:26:24 -07:00
Fusion
44961caeea fix(FN-2292): increase mobile toast clearance and stabilize related tests
- Raise mobile .toast-container bottom offset by adding --space-2xl to clear footer/nav overlap
- Update utility-mobile CSS regression assertion to match the new toast offset formula
- Extend build-exe test timeout from 20s to 90s to reduce flaky CLI packaging failures
2026-04-23 09:03:41 -07:00
Fusion
ff5df16928 fix(FN-2302): honor project default executor model precedence
- Add shared executor model pair resolution in task executor and step-session executor to apply lane hierarchy consistently
- Prefer project defaultProviderOverride/defaultModelIdOverride before global defaults when execution lanes are unset
- Update hot-swap model resolution to use the same precedence logic as runtime session creation
- Add regression tests for runtime, hot-swap, and step-session precedence/fallback behavior
- Add a changeset for @runfusion/fusion describing the executor model precedence fix
2026-04-23 08:57:16 -07:00
Fusion
6f26bc5d51 fix(FN-2297): remove duplicate mobile chat access path
- Remove the Chat action from the mobile More sheet and drop the unused onOpenQuickChat prop wiring
- Keep chat access through the dedicated mobile Chat tab and update helper copy in Settings to match
- Update MobileNavBar and mobile feature-access regression tests to assert chat is not listed in More
- Stabilize MissionManager activity pagination test by adding an explicit waitFor timeout
2026-04-23 08:45:53 -07:00
Fusion
4bccf3c2b4 fix(FN-2278): align Pi extensions source badges and toggle styling
- Add "package" as a supported Pi extension source type and show a human-readable label in the manager
- Extend PiExtensionsManager tests to cover package-sourced extensions in name, source, path, and toggle assertions
- Add an accessible aria-label to each extension toggle control
- Resolve toggle switch CSS conflict by adopting token-based sizing, stronger focus styling, and disabled-state visuals
2026-04-23 08:24:13 -07:00
Fusion
c04c5386b6 feat(FN-2294): merge fusion/fn-2294 2026-04-23 08:09:54 -07:00
gsxdsm
70ad1836d0 fix(FN-2293): increase task_done retries and requeue immediately 2026-04-23 08:03:28 -07:00
Fusion
93ccc8d1d0 feat(FN-2290): correct mobile ChatView header and back-button behavior
- Render the thread header on mobile only when a session is active while keeping desktop behavior unchanged
- Show the mobile back button only in active thread view and route it back to session list state
- Add comprehensive ChatView tests covering mobile list/thread states and desktop header visibility
2026-04-23 07:47:50 -07:00
gsxdsm
9cd881e618 feat(FN-2289): merge fusion/fn-2289 2026-04-23 07:41:11 -07:00
Fusion
2f5df0fea3 fix(FN-2278): move Pi Extensions base styles outside mobile block and fix focus tokens
- Move Pi Extensions Manager package UI base styles outside the mobile media query so desktop/tablet renders correctly
- Fix focus-visible rules from outline: 2px solid var(--focus-ring-strong) to box-shadow: var(--focus-ring-strong)
- Keep only mobile-specific overrides (gap, padding, max-width) inside @media (max-width: 768px)
- Remove duplicate CSS sections that resulted from previous edits
2026-04-23 06:49:39 -07:00
Fusion
6b30ef3184 fix(FN-2278): move Pi Extensions base styles out of mobile media query and fix focus styling
- Move base styles for package manager UI (add form, package list, source badges, etc.)
  out of @media (max-width: 768px) so they apply on desktop
- Keep only true mobile overrides (form row stacking, button width, reduced padding)
  inside the mobile media query
- Fix focus styling: change 'outline: 2px solid var(--focus-ring-strong)' to
  'outline: none; box-shadow: var(--focus-ring-strong)' since the token is a
  shadow value, not a color
- Tokenize spacing values (padding, gaps) to use CSS variables

This fixes the workflow feedback from quality gates.
2026-04-23 06:00:38 -07:00
Fusion
a332c8f7dc feat(FN-2271): optimize chat sidebar layout for mobile and desktop
- Add explicit sidebar section class names in ChatView for header, search, list, and footer layout control
- Add a mobile-only footer New Chat action while keeping the desktop header button to avoid duplicate desktop CTAs
- Update mobile chat sidebar CSS to use full-height layout with hidden header/search and a scrollable session list
- Expand ChatView tests to validate sidebar structure, mobile New Chat behavior, and mobile CSS contract rules
2026-04-23 05:38:23 -07:00
Fusion
585e48041d feat(FN-2284): enhance dashboard TUI log navigation and inspection
- Add rich Logs tab keyboard controls including arrow/j-k movement, Home/End jumps, and Enter/Space/e expansion toggles
- Introduce expanded log inspection view with escape-to-close behavior and wrap mode support for long entries
- Improve log wrapping to hard-wrap long unbroken tokens like URLs and stack traces at terminal width
- Expand dashboard TUI command tests and document the new interactive log navigation shortcuts in CLI reference
- Add two patch changesets for @runfusion/fusion covering log inspection and navigation fixes
2026-04-23 04:06:52 -07:00
Fusion
bfc89081c2 test(FN-2249): add fast mode execution regression coverage
- Add executor regression tests for fast-mode completion paths, including tool injection, workflow-step bypass, and completion enforcement checks
- Expand dashboard API tests to verify executionMode payload behavior for createTask and updateTask requests
- Document fast-mode behavior across architecture, task management, and workflow-step docs with explicit gate bypass/enforcement details
2026-04-23 03:55:32 -07:00
gsxdsm
2511711a4a feat(FN-2287): merge fusion/fn-2287 2026-04-23 03:43:34 -07:00
Fusion
84330812b0 feat(FN-2283): align dashboard TUI help overlay borders
- Add buildHelpLines() to construct box and compact help overlay rows from shared width-safe logic
- Replace manual padRight-based row padding with visibleLength-driven padding for consistent right border alignment
- Compute overlay centering from raw uncolored line widths and apply coloring during render
- Add targeted tests validating box row geometry, border width consistency, and padding calculations
2026-04-23 03:29:37 -07:00
Fusion
f5507e6046 fix(FN-2236): standardize settings pane heading spacing
- Replace inline heading margin styles in SettingsModal with reusable settings-section-heading--spaced class
- Tokenize settings pane horizontal spacing and margins in styles.css
- Add symmetric gutters so section headings align consistently across the settings modal
2026-04-23 02:50:17 -07:00
Fusion
214d8d0c46 feat(FN-2236): scope settings-section-heading margin reset to plugin detail only
The Plugin Manager section had a global .settings-section-heading { margin: 0; }
rule that was unintentionally removing margins from all settings pane headings,
not just plugin detail headings. Scoped the rule to .plugin-settings-form so
other settings panes inherit the base spacing again.
2026-04-23 02:27:10 -07:00
Fusion
216d2bb05d feat(FN-2235): align Settings Plugins UI with tokenized dashboard styles
- Replace remaining hardcoded spacing and transition values in plugin-related CSS with dashboard design tokens
- Refine plugin manager layout states by reusing shared settings empty-state styling and removing redundant local heading markup
- Show the project scope banner in the Plugins settings tab for consistency with other project-scoped sections
- Add PluginManager and SettingsModal test coverage for empty/loading class conventions, header structure, and scope banner rendering
2026-04-23 01:57:13 -07:00
Fusion
954fa1cd62 feat(FN-2222): move heartbeat multiplier control to Agents screen
- Add heartbeat multiplier global control UI to AgentsView with supporting behavior and tests
- Remove heartbeat multiplier field from Settings modal scheduling section and update related test coverage
- Add mobile-specific CSS adjustments for agent global controls and extend mobile view assertions
- Update docs to reflect the new heartbeat multiplier location in agents and settings references
2026-04-23 00:57:10 -07:00
Fusion
5621334d02 feat(FN-2280): improve agent heartbeat interval selection and validation
- Expand heartbeat interval presets to enforce a 5-minute minimum and include extended 48h/72h/1w options
- Add custom heartbeat entry in AgentsView with typed minute input, save/cancel actions, and validation/clamp behavior
- Show the Custom option only when the current interval is a preset, while preserving explicit custom interval labels when needed
- Update dashboard tests and heartbeat utility tests to cover new preset boundaries, custom option behavior, and health staleness expectations
- Document the 5-minute minimum heartbeat clamp behavior in agents documentation
2026-04-23 00:06:03 -07:00
Fusion
0bb0100072 feat(FN-2285): rebrand dashboard TUI header to Fusion
- Update dashboard TUI header copy from "fn board" to "fusion" branding
- Add CLI tests that validate the new header text and related rendering behavior
- Include a changeset documenting the published @runfusion/fusion patch for the branding update
2026-04-22 23:49:49 -07:00
Fusion
b5129ff968 fix(FN-2223): keep Git Manager modal fully visible on mobile
- Add .gm-modal to the shared mobile modal sizing rule used at the main mobile breakpoint
- Apply full-width and full-height viewport constraints so the modal no longer renders off-screen
- Add CSS coverage assertions in core-modals-mobile tests for Git Manager modal mobile sizing behavior
2026-04-22 23:41:44 -07:00
gsxdsm
780ccac95a chore(release): v0.1.0
Version bump via changesets.
2026-04-22 23:36:22 -07:00
gsxdsm
a2ed6d0c86 chore(release): add changeset for self-healing fix + heartbeat/Stop-button changes
Covers the self-healing merge-recovery fix and the bundled
heartbeat/AgentDetailView changes so the next release PR picks them up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:35:37 -07:00
Fusion
25d44e1b5c feat(FN-2270): add interactive TUI mode for fn dashboard
- Add a new dashboard TUI renderer with logs, system, utilities, stats, and settings sections
- Wire runDashboard to auto-enable TUI in TTY sessions with reactive task/agent updates and utility keybindings
- Keep non-TTY behavior unchanged by falling back to the existing plain-text startup output
- Add CLI tests and docs for TUI behavior, keyboard shortcuts, and auth/usage guidance
- Ensure dashboard WebSocket auth checks respect --no-auth consistently
2026-04-22 23:34:18 -07:00
Fusion
6886825898 fix(self-healing): recover merge when baseCommitSha was advanced past landed commit
findLandedTaskCommit only fell back to scanning all of HEAD on git-log
exceptions. When the bounded base..HEAD range is valid but empty — e.g.
the merger fast-forward-rebased the task branch and set baseCommitSha
to the new HEAD, or later commits moved HEAD past the merge — recovery
silently returned null and re-queued the merge even though the commit
had already landed. Add an empty-stdout fallback that re-scans HEAD,
with a regression test covering the FN-2221 scenario.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:34:18 -07:00
gsxdsm
14328185dd fix(self-healing): recover merge when baseCommitSha was advanced past landed commit
findLandedTaskCommit only fell back to scanning all of HEAD on git-log
exceptions. When the bounded base..HEAD range is valid but empty — e.g.
the merger fast-forward-rebased the task branch and set baseCommitSha
to the new HEAD, or later commits moved HEAD past the merge — recovery
silently returned null and re-queued the merge even though the commit
had already landed. Add an empty-stdout fallback that re-scans HEAD,
with a regression test covering the FN-2221 scenario.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:11:57 -07:00
gsxdsm
fe75af172a Fix node-pty terminal spawn recovery 2026-04-22 23:10:37 -07:00
gsxdsm
0538331c34 feat(FN-2279): merge fusion/fn-2279 2026-04-22 23:01:34 -07:00
gsxdsm
2f90889723 chore(release): v0.0.6
Version bump via changesets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:22:58 -07:00
gsxdsm
b72ff64a67 feat(merger): rebase task branch onto remote before merge
Adds a new worktree setting that fetches the configured remote and rebases
the task branch onto the latest default-branch tip before the merger attempts
to merge it back. Catches concurrent pushes from other collaborators or
fusion workers on other hosts before they surface as merge conflicts —
anything the rebase can't fast-forward flows into the existing smart/AI
resolve pipeline (attempts 1–3) rather than needing new handling.

- `settings.worktreeRebaseBeforeMerge` (bool, default true) — gates the step.
- `settings.worktreeRebaseRemote` (string, default "") — which remote to
  fetch; empty falls back to git's configured remote for the default branch,
  then to the sole remote if there's only one, then to "origin".
- Rebase runs inside the task's worktree; failure aborts and falls through
  to the merge cascade. Rebase errors are warn-logged but never throw.
- Dashboard SettingsModal Worktrees section now has a toggle for the setting
  plus a remote dropdown populated from `/api/git/remotes/detailed`. The
  dropdown defaults to "Use git default" so no explicit selection is needed
  on first configure.

Also aligns the Last/Next heartbeat spans on the agent list card — both now
share the `.agent-heartbeat-last, .agent-heartbeat-next, .agent-heartbeat-saving`
font-size rule with a consistent line-height and inline-flex alignment so
the labels don't drift vertically when they share a row.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:17:33 -07:00
gsxdsm
22d31c4cac fix: --no-auth override, workflow revision in-place fix, state-driven heartbeats
Three orthogonal fixes bundled together so they re-land as a unit after
earlier worktree-based reverts kept wiping them individually.

1. `--no-auth` flag now actually disables auth. Previously a stale
   FUSION_DAEMON_TOKEN in .env silently re-armed bearer-token auth despite
   the CLI flag. Added a `noAuth` option to ServerOptions; auth-middleware's
   isDaemonAuthActive/getDaemonToken short-circuit to false/undefined when
   set; CLI plumbs opts.noAuth through both createServer call sites.

2. Workflow review failures no longer reset every completed step. Previously
   a single CSS nit from a workflow reviewer could drag 5+ already-approved
   steps back through plan review, code review, and re-execution because
   determineRevisionResetStart fuzzy-matched feedback tokens against step
   names. handleWorkflowRevisionRequest, handleWorkflowStepFailure, and
   sendTaskBackForFix now call a new reopenLastStepForRevision helper that
   flips only the last non-pending step back to pending (with currentStep
   rewind via a newly-accepted updateTask field) — all earlier done steps
   stay done, and the agent applies the feedback as an in-place patch per
   the updated PROMPT.md instructions. determineRevisionResetStart stays
   exported as @deprecated so existing unit tests still link.

3. Heartbeat scheduling is now state-driven. Previously a non-ephemeral
   agent with a stale runtimeConfig.enabled=false on disk would never tick
   and the Pause/Resume button couldn't arm the timer without also flipping
   that hidden flag. HeartbeatTriggerScheduler's watchAgentLifecycle now
   registers on transitions into active/running and clears on transitions
   out; the tick and assignment-trigger guards key off state + ephemeral
   classification. InProcessRuntime's created/updated listeners and startup
   scan mirror the same semantics. runtimeConfig.enabled is only retained
   for ephemeral (task-worker) opt-out.

Tests updated: agent-heartbeat.test.ts — one test renamed from "skips
registration when enabled is false" (obsolete behavior) to
"registers regardless of the legacy enabled flag"; 4 assignment-watching
tests now pass a realistic `state: "active"` on mock agents. 207 heartbeat
tests + 330 executor tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:12:19 -07:00