Commit Graph

2713 Commits

Author SHA1 Message Date
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
Fusion
3b212b9286 feat(FN-2221): constrain setup wizard modal shell and add CSS regression test
- Add display:flex and flex-direction:column to .setup-wizard-modal for scroll containment
- Ensure .setup-wizard-content has flex:1, min-height:0, overflow-y:auto for internal scrolling
- Protect header/footer with flex-shrink:0 to prevent collapse
- Add regression test coverage for viewport-safe layout contract
- Preserve mobile full-screen modal behavior
2026-04-22 21:53:10 -07:00
Fusion
9cb131cc70 feat(FN-2276): merge fusion/fn-2276 2026-04-22 21:53:07 -07:00
gsxdsm
780bb21fa3 fix(dashboard): state-drive agent health + remove Stop buttons from detail view
agentHealth.tsx:
- Drop the "Disabled" label and isHeartbeatEnabled helper. Server-side
  heartbeat scheduling is driven by agent.state (active/running = armed),
  not by the legacy runtimeConfig.enabled flag, so surfacing "Disabled" for
  agents with a stale flag on disk was misleading.
- Replace the elapsed > heartbeatTimeoutMs check with elapsed > 2× effective
  interval (with a 60s floor). heartbeatTimeoutMs is the per-run work budget,
  not a between-tick freshness window; using it made any agent configured
  with a multi-minute+ interval show Unresponsive the moment it got more
  than 60s old. The effective interval resolver now falls back to the
  server-side 1h default, so agents never configured via the dropdown and
  agents with an explicit interval get consistent treatment, differing only
  by scheduled cadence.

AgentDetailView.tsx:
- Remove Stop buttons from active/paused/running/error (mirrors the earlier
  AgentsView cleanup — Pause/Resume/Retry cover reversible transitions,
  Delete stays on idle/terminated for teardown).
- Add a "Next Heartbeat" info row alongside "Last Heartbeat" for ticking
  agents (active/running), computed as lastHeartbeatAt + effective interval.

Tests rewritten to cover the new semantics; dropped 14 obsolete cases that
were pinned to the old heartbeatTimeoutMs-based check and the "Disabled"
branch. 42 agentHealth tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:46:37 -07:00
gsxdsm
55921c60e7 refactor(dashboard): remove board/card agent view
The compact board view was a duplicate of the list view with fewer affordances
— no heartbeat dropdown, no Last/Next indicators, and its own copy of the
action buttons that kept drifting out of sync with the list view's. Drop it
entirely and migrate any saved "board" preference to "list" on load.

- Remove Board toggle button (LayoutGrid icon) and the "board" state value.
- Remove the entire board rendering branch.
- Simplify getStateCardClass to the single "agent-card" prefix.
- Remove unused LayoutGrid import.

Tree and Org Chart views remain unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:39:44 -07:00
gsxdsm
dd6c6a0cd9 test(cli): retry build-exe --help once on SIGTERM
On loaded CI hosts the bundled binary occasionally takes longer than the
15s timeout to warm up, causing a SIGTERM and a flaky failure even though
the build is healthy. Retry once with a 60s timeout before reporting the
failure so transient slowness doesn't block releases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:33:48 -07:00
gsxdsm
7e57ee48ef feat(dashboard): unify agent lifecycle controls in AgentsView
- Remove Stop buttons from active/paused/running/error in both grid and list
  views; Pause/Resume/Retry cover the reversible transitions and Delete stays
  available on idle/terminated for teardown. Matches the existing shape of
  AgentDetailView after the earlier cleanup.
- Drop the redundant interval badge next to the heartbeat dropdown — the
  selected <option> already shows the current value.
- Add a "Next: HH:MM:SS" indicator alongside "Last:" for active/running
  agents, derived from lastHeartbeatAt + configuredIntervalMs (full timestamp
  in the tooltip). Paused/idle/error/terminated agents show Last only since
  there's no scheduled next tick.
- Remove now-unused Square and Heart icon imports.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:33:42 -07:00
gsxdsm
d72153620b chore(release): v0.0.5
Version bump via changesets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:26:23 -07:00
gsxdsm
41553a506b chore(release): add changeset for stale-task safeguards + heartbeat-on-creation
Covers the three FN-2274 commits (engine guard, dashboard preflight, docs) plus
the AgentStore default-heartbeat-interval fix. Bumps @runfusion/fusion one
patch so the Version Packages PR opens automatically on main.

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