Commit Graph

40 Commits

Author SHA1 Message Date
Fusion
1ce47fd870 feat(FN-3580): restore canonical agent lifecycle and remove terminated agen
This merge restores the canonical agent lifecycle with termination scoped at the run level (FN-3580, 4 steps), adds sender-side wake recipient override for messages, and introduces test isolation CI enforcement with a stuck-requeue race fix. UI changes remove terminated-agent indicators from AgentDe

Fusion-Task-Id: FN-3580
2026-05-06 10:18:27 -07:00
Fusion
94a5dca53c feat(FN-3535): restore terminated agent state and align lifecycle controls
This merge completes the agent terminated state alignment (FN-3535), adding "running → terminated" transition support with consistent styling and lifecycle controls across the heartbeat engine, agent store, and dashboard UI, plus plugin author documentation improvements (FN-3537) and plugin loader t

Fusion-Task-Id: FN-3535
2026-05-06 03:07:27 -07:00
gsxdsm
1f1096efb8 fix(dashboard): drop terminated-state leftovers and AgentListModal duplicate Resume
Removes no-op `agents.filter((a) => true)` calls (a leftover from the
terminated AgentState refactor) flagged by eslint and updates affected
tests and fixtures so `terminated` is no longer referenced. Also:

- Deletes the duplicate `state === "paused"` render branch in
  AgentListModal list view that produced two "Resume" buttons.
- Updates the AgentDetailView help text to reflect the current
  deletable states ("idle or paused").
- Aligns the bundled-plugin-install test with the new auto-load
  behavior for already-installed enabled plugins.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:47:38 -07:00
gsxdsm
202f88b80f refactor(agents): remove terminated AgentState; collapse to paused/error
Drops "terminated" from AGENT_STATES. The agent lifecycle now runs through
idle | active | running | paused | error. paused (carrying a pauseReason)
absorbs every former terminated use case — manual stop, heartbeat run
termination, spawned-child cleanup. Run status (agentRuns.status) is
unchanged: "terminated" stays a valid run-status value.

AGENT_VALID_TRANSITIONS allows direct any→idle transitions so resetAgent
no longer needs the intermediate hop.

Stack-wide:
- core/agent-store: lastError clearing + resetAgent simplified.
- engine/agent-heartbeat, executor, in-process-runtime: terminated state
  writes → paused; halt-state listener fires on paused/error.
- dashboard: AgentsView/AgentListModal/AgentDetailView lose the Terminated
  badge/option/state-block; agent pickers no longer filter terminated;
  agentHealth drops the Terminated branch; routes/state cast widened to
  the new AgentState union.

Tests across core and engine updated to assert paused for AgentState and
left "terminated" intact for run-status assertions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:47:38 -07:00
Fusion
43f120eaef feat(FN-3530): add modal-based agent error details and UI/docs updates
- Add AgentErrorDetailsModal and wire agent list/detail views to open full error diagnostics while keeping inline errors compact
- Add line-number gutter toggle in FileEditor and Files modal with dashboard persistence coverage
- Align project memory scope guidance across core logic, CLI tool docs, and dashboard docs
- Add regression coverage for runtime plugin alias behavior and update related engine/heartbeat tests
- Include changesets for FN-3530 UI improvements and FN-3485 memory guidance updates

Fusion-Task-Id: FN-3530
2026-05-05 20:47:37 -07:00
Fusion
964e111f8b feat(FN-3118): document avatar storage in agents and architecture
Added avatar storage and field documentation to the agents guide, with a minor reference added to the architecture docs.

Fusion-Task-Id: FN-3118
2026-05-05 20:47:37 -07:00
Fusion
9a238c077a feat(FN-3322): allow deletion of paused agents across dashboard views
This merge enables deletion of paused agents across the dashboard UI — adding delete controls to the AgentDetailView, AgentListModal, and AgentsView, with tests covering all three flows and a final typecheck compatibility fix.

Fusion-Task-Id: FN-3322
2026-05-04 23:47:26 -07:00
Fusion
c47e684b52 feat(FN-3342): add collapsible agent error UI and related runtime fixes
- Add a collapsible agent error display in agent views, including modal integration, styling updates, and larger touch targets for action controls
- Expand dashboard test coverage for agent error rendering/collapse behavior plus board/list/task card sorting and merge-active state regressions
- Fix skill name/path resolution and align Fusion two-segment skill naming with bare pi-coding-agent skill names
- Harden runtime and route behavior across engine/dashboard/droid flows with added regression and e2e test coverage

Fusion-Task-Id: FN-3342
2026-05-04 07:26:11 -07:00
Fusion
a1b74de12b feat(FN-3319): enrich agent heartbeat callbacks with reason in UI
Enriched agent heartbeat callbacks with a `reason` parameter propagated through the engine, in-process runtime, and dashboard components (AgentDetailView, AgentListModal, AgentsView). Added a new `agentHealth.tsx` utility and corresponding test file to surface the reason in UI health status, with te

Fusion-Task-Id: FN-3319
2026-05-03 12:47:08 -07:00
Fusion
6e65786bc5 fix(plugins): re-export probe symbols + declare plugin deps in dashboard
- Hermes / OpenClaw plugin index.ts now re-export `probeHermesBinary` /
  `probeOpenClawBinary` and their status types so the dashboard's
  `runtime-provider-probes.ts` façade can import them via the public
  package entry instead of deep paths.
- Dashboard `package.json` adds `@fusion-plugin-examples/hermes-runtime`,
  `…/openclaw-runtime`, `…/paperclip-runtime` as workspace deps so
  pnpm symlinks them into `packages/dashboard/node_modules/`. Without
  these, the new probe imports failed with "Cannot find module" during
  `pnpm typecheck`.

This clears 6 of the 9 outstanding typecheck errors. The remaining 3 are
in the in-flight Hermes plugin rewrite (runtime-adapter still imports
from a deleted `./pi-module.js`; the new `index.ts` calls a factory
with the wrong arg type) and should be resolved by the same change set
that landed the rewrite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 22:17:54 -07:00
Fusion
410a438a7f feat(FN-2639): replace native confirms with dashboard confirm dialog
- Add reusable ConfirmDialog component, styles, and useConfirm hook to provide async confirmation flows
- Wire ConfirmProvider at app level and migrate confirm call sites across task, agent, roadmap, plugin, and settings UI actions
- Update modal interaction patterns to support dialog reentry and consistent destructive-action confirmations
- Expand dashboard tests with confirm dialog and hook coverage plus migrated component test assertions
2026-04-27 04:05:25 -07:00
Fusion
ddf5b13c00 feat(FN-2635): add optimistic agent state updates across dashboard
- Apply optimistic start/stop state transitions in AgentsView and AgentDetailView action handlers
- Add optimistic behavior to AgentListModal while preserving rollback on API failure
- Expand unit test coverage for optimistic transitions and failure recovery in all three agent views
- Update dashboard TUI test expectation to align with the new agent state update flow
2026-04-26 22:59:45 -07:00
gsxdsm
c3d1716fdd refactor(dashboard): split monolithic styles.css into per-component files
Split app/styles.css from ~40k lines down to ~4.5k. Created 56 co-located
component CSS files in app/components/, each imported by its owning .tsx.
The remainder of styles.css holds genuinely global rules (design tokens,
.btn/.card/.modal/.form-input primitives, cross-component @media overrides).

- Lazy-load 13 heavy views (AgentsView, RoadmapsView, NodesView, etc.) via
  React.lazy + Suspense; prefetch all chunks on idle so first navigation is
  instant. Initial JS bundle: 1.58 MB → 1.16 MB (-26%). Initial CSS bundle:
  635 kB → 471 kB (-26%); the rest splits into 13 per-view chunks.

- Add app/test/cssFixture.ts exposing loadAllAppCss() + loadAllAppCssBaseOnly()
  so CSS regression tests load the full per-component bundle (mirroring Vite
  source order). Migrate 30+ tests off direct readFileSync('../styles.css').

- Enable test.css: { include: [/.+/] } in vitest.config.ts so component CSS
  imports actually inject styles in jsdom (fixes getComputedStyle assertions).

- Add ESLint rule (no-restricted-syntax) banning direct styles.css reads in
  dashboard test files; points at loadAllAppCss() instead.

- Restore lost utility classes (.text-muted, .text-secondary, .text-dim,
  .form-input) and rescue dropped chat tool-call rules into QuickChatFAB.css.

- Mobile fixes along the way: scroll containment for view containers
  (min-height:0 + -webkit-overflow-scrolling), QuickChatFAB full-screen on
  mobile (with safe-area-inset for iOS home bar), AgentsView single-row
  header layout, ActivityLogModal close button on right, model-combobox
  z-index above the mobile quick-chat panel.

- Bug fix: SkillsView toggle was display:none which hid the input from the
  accessibility tree; replaced with the visually-hidden pattern so screen
  readers + getByRole still find the checkbox.

- Bug fix: standalone Delete button in TaskDetailModal for triage-column
  tasks (Actions dropdown is hidden in triage state, so previously no way
  to delete a freshly-created task without status change first).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 19:39:20 -07:00
gsxdsm
3fbb7c47cf refactor: eliminate ~400 no-explicit-any warnings across the workspace
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.

Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
  using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
  .all()/.get() results via `as unknown as XxxRow[]` (the double cast is
  required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
  React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
  pi-ai concrete shapes; typed Claude stream event message fields.

72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:36 -07:00
gsxdsm
200ebfcd39 refactor(dashboard,desktop,engine): remove unused imports, props, and locals
Clears the remaining no-unused-vars warnings across the dashboard app and
server, desktop main, and engine sources. Dead React state destructures are
collapsed to setter-only, unused props are underscore-prefixed to preserve
API shape, and unreferenced catch bindings are dropped. No behaviour change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:35 -07:00
Fusion
2873bc0388 refactor(FN-2206): centralize agent modal styling in dashboard CSS
- Move inline styles from AgentListModal and AgentGenerationModal into token-based stylesheet classes
- Polish NewAgentDialog step-zero layout, role grid, and AI generation button/summary presentation
- Improve AgentImportModal result stat visual hierarchy and semantic status coloring
- Expand dashboard modal CSS coverage with sectioned rules and mobile-specific refinements
- Update component and stylesheet tests to assert new class usage and modal responsive behavior
2026-04-22 11:43:26 -07:00
Fusion
148a2ad017 feat(FN-2211): suppress redundant agent health labels
- Add stateDerived metadata to AgentHealthStatus to indicate when health text only mirrors agent.state
- Update getAgentHealthStatus to set stateDerived consistently across terminated, error, paused, running, heartbeat, idle, and disabled paths
- Update AgentDetailView, AgentListModal, and AgentsView to render icon-only health badges when labels are state-derived while preserving full labels via title tooltips
- Expand agentHealth tests with explicit stateDerived assertions and a table-driven semantics suite for representative states
2026-04-21 08:05:20 -07:00
Fusion
19d62b41f5 refactor(FN-2162): rename kb-agent identifiers to fn-agent
- Rename core loader, dashboard server chat/planning routes, and frontend agent IDs/storage keys from kb-agent to fn-agent naming
- Update dashboard hooks and components (agent list, chat view, quick chat) to use the new fn agent key prefixes consistently
- Refresh engine, dashboard, core, and CLI tests/mocks to remove remaining kb-agent route and temp prefix references
- Update storage/gap-analysis docs to reflect fn agent key names and add a @gsxdsm/fusion patch changeset for the rename
2026-04-19 20:48:14 -07:00
Fusion
eccaed9e69 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
Fusion
f33f15a98f style(FN-1847): unify dialog overlay styling and add accessibility attributes
- Add role=dialog and aria-modal attributes to all modal dialogs for accessibility
- Standardize close button aria-labels across all modals
- Unify overlay backdrop-filter, z-index, and background styles in styles.css
- Add light theme overrides for non-standard overlay backgrounds
- Update AgentListModal tests to reflect new aria attributes
- Add changeset for @gsxdsm/fusion package
2026-04-15 20:44:40 -07:00
Fusion
123ec5949f feat(FN-1862): add completion state tracking for onboarding
- Add markOnboardingCompleted() to set completedAt timestamp when user finishes onboarding
- Add isOnboardingCompleted() to check if onboarding was completed (vs dismissed)
- Update ModelOnboardingModal to call markOnboardingCompleted on successful completion
- Skip onboarding auto-open when already completed locally
- Add completion state tracking tests in ModelOnboardingModal.test.tsx
- Add model-onboarding-state unit tests
- Update useAuthOnboarding to check local completion state before auto-opening
- Document localStorage completion state tracking pattern in .fusion/memory.md
2026-04-14 23:44:40 -07:00
gsxdsm
2800f57d78 feat(FN-1748): merge fusion/fn-1748 2026-04-14 22:45:59 -07:00
gsxdsm
794d541b0b feat(FN-1698): merge fusion/fn-1698 2026-04-13 16:05:12 -07:00
gsxdsm
9544a79290 feat(FN-1491): add centralized agent health status utility
- Create agentHealth.tsx utility with consistent health status logic
- Update AgentDetailView, AgentListModal, and AgentsView to use centralized utility
- Add comprehensive tests for health status edge cases
- Update agents.md documentation with health status reference
- Add changeset for @gsxdsm/fusion patch release
2026-04-09 22:58:47 -07:00
gsxdsm
8acc369ebf fix(FN-1349): add resume/start button for terminated agents in AgentListModal 2026-04-09 10:12:58 -07:00
gsxdsm
0cdc163a67 feat(FN-1178): harden mobile responsiveness across agent modals
- Add mobile full-screen and safe-area CSS rules for agent dialogs, including touch-friendly inputs and footer actions
- Remove hardcoded inline width constraints from AgentGenerationModal so mobile styles can fully apply
- Fill AgentListModal mobile gaps with improved control sizing, wrapped layouts, and single-column behavior at small breakpoints
- Add agent modal mobile regression tests covering responsive classes, breakpoints, and dialog sizing expectations
2026-04-08 12:18:55 -07:00
gsxdsm
0359166b6c feat(FN-1276): scope dashboard persistence by project
- Add a project storage utility with scoped key helpers and key inventories for global vs project state
- Scope dashboard/task view, list preferences, quick-entry drafts, agent/tree state, terminal tabs, usage view, and modal draft persistence to projectId
- Reload persisted UI state when project context changes so per-project settings and drafts do not leak across projects
- Update and expand dashboard tests, including new projectStorage coverage and scoped persistence regression fixes
2026-04-08 10:39:38 -07:00
gsxdsm
f07dd85129 feat(FN-1035): replace hardcoded colors with theme-aware CSS variables in agent UI
- Replace hardcoded color values in AgentDetailView with --in-progress CSS variable
- Fix card size badges to use theme-aware CSS variables
- Replace hardcoded log entry colors with CSS variables in AgentLogViewer
- Remove duplicate CSS variable definitions from AgentListModal
- Update central styles.css with proper CSS variable declarations for agent UI
- Update AgentListModal tests to reflect removed duplicate CSS variables
2026-04-06 16:12:11 -07:00
gsxdsm
d408cdb862 feat(FN-862): polish AgentListModal styling with responsive layout and tests
- Refactor AgentListModal with improved responsive layout, cleaner spacing, and polished visual design
- Add comprehensive test suite for AgentListModal covering rendering, interactions, and edge cases
- Update documentation to reflect modal styling improvements
2026-04-04 17:52:33 -07:00
gsxdsm
357086ab61 fix(FN-834): fix branch prefix drift, add merger branch guard, and fix test OOM
- Fix resolveBaseBranch to use stored branch name and consistent fusion/ prefix
  for both explicit deps and blockedBy paths (was using kb/ for blockedBy)
- Add main branch checkout verification in merger before squash merge to prevent
  feature code from landing on wrong branch lineage
- Align all branch prefix references from stale kb/ to fusion/ across executor,
  merger, store, and routes
- Fix executor test OOM by mocking merger fully, adding fake timers to retry
  tests, and switching vitest pool to vmThreads
- Update all test assertions to use fusion/ branch prefix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 11:11:59 -07:00
gsxdsm
ee74c78422 feat(FN-864): add delete action for idle and terminated agents
- Expose delete action on idle and terminated agents in AgentsView and AgentListModal
- Update AgentDetailView to support delete with confirmation
- Update agent-related documentation in README.md and dashboard README
- Add/update tests for AgentDetailView, AgentListModal, and AgentsView delete behavior
- Remove outdated TaskDetailModal test
2026-04-04 06:14:35 -07:00
gsxdsm
127b98e7f5 feat(FN-863): tokenize create-row input and select styling in Agents View
- Add tokenized input styling to AgentListModal create-row with themed placeholder and chip-like tokens
- Add custom select dropdown styling to AgentsView with color-matched appearance
- Add comprehensive tests for both AgentListModal and AgentsView token/select behavior
- Update Agents View README with tokenized input/select styling documentation
2026-04-04 06:01:35 -07:00
gsxdsm
0ed3c84cf0 feat(FN-849): normalize agent UI theme consistency and simplify workflow step API
- Fix AgentListModal create-row and control styling to use token-based design tokens
- Normalize AgentDetailView theme consistency with shared token-based styling
- Simplify WorkflowStepManager by removing server-side CRUD, using local state only
- Remove unused store methods and types (workflowStep CRUD) from core package
- Remove server-side workflow step API routes and their tests
- Update dashboard README with shared token-based styling notes
- Add tests for AgentDetailView and extend AgentListModal tests
2026-04-04 05:33:23 -07:00
gsxdsm
0509dc4e90 fix(FN-711): add missing 'open' class to modal overlays
- Add 'open' class to modal overlays in AgentListModal, MissionManager, ScriptsModal, and WorkflowStepManager
- Add Header component tests for overflow menu callbacks and modal visibility
2026-04-02 18:34:48 -07:00
gsxdsm
1f8465342c fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
7f1a924a36 Fix broken build. 2026-03-31 19:42:07 -07:00
gsxdsm
204604ec43 feat(KB-644): add list/board view toggle to agent list modal
- Add view state management and toggle UI for switching between list and board views
- Implement board view layout with card-based agent display
- Update TaskCard component for board view compatibility with new props
- Add comprehensive tests for view toggle and both AgentListModal view modes
- Remove unused CSS styles now handled by view-specific layouts
2026-03-31 19:21:03 -07:00
gsxdsm
21d2649574 fix(KB-605): add CSS variables for agent badges and AgentListModal tests
- Add missing CSS variables for agent state badges in AgentListModal
- Add comprehensive test suite for AgentListModal component (754 lines)
- Include changeset documenting the CSS fix
2026-03-31 17:17:19 -07:00
gsxdsm
fc0411713c feat(KB-330): rename internal packages from @kb/* to @fusion/*
- Rename @kb/core, @kb/dashboard, @kb/engine to @fusion/* namespace
- Update all import statements across 143+ files to use new package names
- Update workspace dependencies and root package.json references
- Fix bundler configurations (tsup, vite) for new package names
- Update test files and fix typecheck issues
- Add changeset file documenting the package rename
2026-03-31 13:33:44 -07:00
gsxdsm
9af06c81dc test(KB-323): add end-to-end verification test for steering comments injection
- Add comprehensive e2e test for steering comments injection in executor
- Verify system prompt steering comments are correctly injected
- Test covers executor initialization and prompt construction
2026-03-31 12:51:06 -07:00