Commit Graph

1043 Commits

Author SHA1 Message Date
gsxdsm
73e51b2033 fix: make running count slash and total same size in status bar
Apply consistent font-family, font-weight, and line-height to count,
separator, and max elements.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 16:21:26 -07:00
gsxdsm
9292681234 feat(FN-1649): remove Kimi from usage indicator flow
- Remove Kimi provider from usage tracking module
- Clean up unused Kimi-related code in usage.ts (225 lines removed)
- Remove Kimi-specific tests from usage.test.ts (686 lines removed)
- Add tests for usage routes (routes.test.ts)
- Add new usage API routes for usage data endpoints
- Fix planning resume state mismatch in PlanningModeModal
- Add PlanningModeModal tests for state consistency
2026-04-12 16:20:51 -07:00
gsxdsm
e9a17c9554 fix: align running count label with numbers in executor status bar
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 16:18:30 -07:00
gsxdsm
4f662cc56f feat: change default max turns for new agents from 10 to 1000
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 16:14:54 -07:00
gsxdsm
f154f688cf fix: prevent planning mode dialog from overflowing viewport
Remove min-height: 300px from .planning-loading and add overflow: hidden
to .planning-initial so the modal stays within 80vh bounds.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 16:11:46 -07:00
gsxdsm
01b57927b9 fix: improve mission interview UX — banner, dismiss, modal height, multiple choice, resume prompt
- Hide session notification banner on mission/planning screens
- Fix dismissed banner persisting across remounts with module-level Set
- Fix mission interview modal buttons cut off (overflow: hidden)
- Default mission interview questions to multiple choice with options
- Add resume prompt for pending mission interviews in MissionManager

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 16:01:40 -07:00
gsxdsm
1b9421561a feat(FN-1450): Add companies.sh catalog browse mode for agent import
- Add backend API routes for companies.sh catalog with pagination and search
- Wire frontend API client with browse mode endpoints (search, list agents)
- Build Agent Import modal with tabbed interface (URL input + browse mode)
- Add browse mode styling with search results grid and agent cards
- Include UI and route test coverage for browse flow
- Update in-UI help text with browse mode usage instructions
2026-04-12 15:20:57 -07:00
gsxdsm
a34ba41ad1 Harden architecture hot paths 2026-04-12 15:13:27 -07:00
gsxdsm
7b78963a4c feat(FN-1636): fix thinking level default to respect global setting
- Fix thinking level selector to default to 'off' when no global default is configured
- Add 'Using default' badge when thinking level falls back to global setting
- Show explicit thinking level badge only when a non-default value is selected
- Add comprehensive tests for thinking level selector behavior
- Add tests for resolved model display with global settings fallback
2026-04-12 14:05:56 -07:00
gsxdsm
51f31f099a fix(FN-1620): show error sessions in notification banner
- Update BackgroundTasksIndicator to display error sessions count alongside active sessions
- Include error sessions in App filter for notification banner visibility
- Add session cancellation for mission interviews on banner dismiss
- Add comprehensive test coverage for SessionNotificationBanner component
- Update useBackgroundSessions hook to expose error session counts
2026-04-12 13:46:32 -07:00
gsxdsm
18b78886d0 feat(FN-1271): add Documents tab to task detail modal
- Add task document API routes for listing, viewing, and downloading task files
- Create TaskDocumentsTab component with file browser UI
- Integrate Documents tab into TaskDetailModal alongside existing tabs
- Add frontend API functions for task document operations
- Add CSS styles for document list, file icons, and download actions
- Add comprehensive route tests for task document endpoints
2026-04-12 13:20:37 -07:00
gsxdsm
52f1f77369 test: remove waits from slow tests 2026-04-12 12:52:32 -07:00
gsxdsm
231c984a27 feat(FN-1594): merge fusion/fn-1594 2026-04-12 12:33:05 -07:00
gsxdsm
29bb15e0ee feat(FN-1593): merge fusion/fn-1593 2026-04-12 10:55:53 -07:00
gsxdsm
5caaead7a0 fix(FEAT-009-FIX-002): correct MilestoneValidationRollup field names and tooltip
The dashboard used incorrect field names (passedCount/failedCount/blockedCount/pendingCount)
that don't exist on the type. The backend returns passedAssertions/failedAssertions etc.
Fixed MissionManager.tsx to use correct field names with ?? 0 fallback for tooltip text.
2026-04-12 10:12:45 -07:00
gsxdsm
f7f69b5ae6 fix(FEAT-009-FIX-001): resolve 3 blocking issues from integration user testing
1. Fix TypeError in run history: fetchValidationRuns now correctly
   destructures .runs from paginated API response {runs, total, offset}

2. Fix assertions panel rendering: inline fetch calls in loadMissionDetail
   and toggleMilestoneExpanded to avoid forward-reference of callback hooks.
   Added Array.isArray guard to prevent .map on undefined state values.

3. Add missing UI components:
   - Clickable lineage indicator for fix features (navigates to source)
   - Retry budget 'Attempt X of Y' display on feature cards
   - 'No fix features generated' empty state
   - Milestone validation state badge in header (already existed, now
     loads correctly)
   - Validation rollup badge with coverage bar in milestone header

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 09:37:05 -07:00
gsxdsm
28e0061b2f feat(FN-1613): merge fusion/fn-1613 2026-04-12 08:25:17 -07:00
gsxdsm
8f0bcf7f00 feat(FN-1465): merge fusion/fn-1465 2026-04-12 07:00:49 -07:00
gsxdsm
bab269dada feat(FN-1586): update ChatView with model selector
- Add model selector to ChatView component for AI model selection
- Update ChatView tests to cover model selector functionality
- Add styles for model selector in chat interface
2026-04-11 20:48:48 -07:00
gsxdsm
9b56460ac4 feat(FN-1449): complete agent UI field parity with Agent Companies
This change aligns agent editing surfaces across dashboard UI, API payloads,
and import/template flows so every first-class editable agent field is
round-trippable.

Backend changes:
- Add memory and bundleConfig fields to POST/PATCH /api/agents routes
- Fix agent-companies-parser to use first-class fields (title, icon, role,
  reportsTo, instructionsText) instead of metadata fallbacks
- Update import dry-run preview to show more manifest fields

UI changes:
- Enable identity field editing (name, title, icon, role, reportsTo) in
  AgentDetailView ConfigTab
- Add instruction bundle configuration (mode, entry file, files, external
  path) to ConfigTab
- Add memory field to NewAgentDialog
- Fix AI generation mapping to preserve systemPrompt as instructionsText
- Update AgentImportModal preview to show icon, reportsTo, and instructions

Test fixes:
- Update parser tests for new first-class field behavior
- Add MissionExecutionLoop mock for serve tests

Documentation:
- Add agent field parity matrix to docs/agents.md
- Create changeset for @gsxdsm/fusion
2026-04-11 19:02:32 -07:00
gsxdsm
b76a1011b6 feat(FN-1445): add project-scoping and fallback handling for AI routes and missions
- Add projectId parameter to refineText API and TaskForm for proper scoping
- Update mission routes to require projectId and add regression tests
- Add mission interview fallback to mission-level context when target not found
- Add AI refine route scoping tests for project isolation
- Update component tests to expect projectId argument
- Update prompt-keys test counts for new system prompts
2026-04-11 15:23:03 -07:00
gsxdsm
98dc20b3d3 feat(FN-1584): add step-change dependency and polling to useTaskDiffStats
- Add step-based dependency to useTaskDiffStats hook to trigger refetch when task steps change
- Implement 5-second polling interval for live diff statistics updates
- Add comprehensive test coverage for polling behavior and step-change detection
- Update TaskCard to pass step information to useTaskDiffStats
- Add TaskCard unit tests for diff statistics display
2026-04-11 11:27:32 -07:00
gsxdsm
03d72f06b1 feat(FN-1545): fix mobile More sheet safe-area padding
- Fix More sheet content padding on iOS devices with notched screens
- Add CSS regression tests for safe-area-inset-* rules in mobile nav bar
- Ensure consistent padding for content area across different device safe areas
2026-04-11 11:00:52 -07:00
gsxdsm
84ae3e0163 feat(FN-1501): enhance workflow step output rendering
- Add expanded view modal for workflow step output with full-screen display
- Add markdown/plain text toggle for output rendering in WorkflowResultsTab
- Add output rendering CSS styles with markdown and code block styling
- Update workflow steps documentation with output rendering features
- Add comprehensive tests for WorkflowResultsTab component (259 tests)
2026-04-11 09:39:32 -07:00
gsxdsm
05a310dc07 feat(FN-1495): merge fusion/fn-1495 2026-04-11 09:01:29 -07:00
gsxdsm
b40c9b5406 feat(FN-1433): wire prompt overrides into mission interview service
- Import resolvePrompt and PromptOverrideMap from @fusion/core
- Add promptOverrides parameter to all agent creation paths:
  - createMissionInterviewSession
  - submitMissionInterviewResponse
  - retryMissionInterviewSession
  - initializeAgent
  - createMissionInterviewAgent
  - ensureMissionInterviewAgent
- Use resolvePrompt('planning-system', promptOverrides) for effective prompt
- Fall back to MISSION_INTERVIEW_SYSTEM_PROMPT when override absent
- Update module docs to reflect prompt override behavior
2026-04-11 08:52:39 -07:00
gsxdsm
29a09d697f test: fix mission manager icon mock 2026-04-11 07:03:07 -07:00
gsxdsm
302394b5f5 feat(FN-1489): reorganize Task Detail modal footer with split menus
- Add SplitMenu component for reusable dropdown menus in modal footers
- Update TaskDetailModal footer to use LeftMenu (Plan, Subtask, Models) and RightMenu (Save, Close)
- Add comprehensive tests for dropdown menu behavior in modal footers
- Update QuickEntryBox and NewTaskModal tests to match new menu patterns
- Add testing patterns for modal dropdown menus to project memory
2026-04-11 06:51:20 -07:00
gsxdsm
afa2e153ee fix(FN-1488): add showQuickChatFAB setting to control Quick Chat FAB visibility
- Add showQuickChatFAB boolean setting to ProjectSettings type
- Add useAppSettings hook function for accessing the setting
- Wire QuickChatFAB visibility in App.tsx based on setting
- Hide QuickChatFAB in MobileNavBar when setting is false
- Add Settings UI toggle for the new setting
- Add CSS for hiding QuickChatFAB on mobile when disabled
- Add comprehensive tests for all affected components
- Fix QuickChatFAB onOpenChange test to use controlled mode
- Update settings reference documentation
2026-04-11 00:18:22 -07:00
gsxdsm
5efe862c68 feat(FN-1413): merge fusion/fn-1413 2026-04-10 23:20:39 -07:00
gsxdsm
33cfef2592 feat(FN-1426): add tests for prompt override edit/reset/save behavior 2026-04-10 22:33:29 -07:00
gsxdsm
72d7de1835 feat(FN-1426): add Prompts section to Settings modal with per-prompt editor UI 2026-04-10 22:27:41 -07:00
gsxdsm
3fdd04d6cb feat(FN-1583): merge fusion/fn-1583 2026-04-10 22:20:39 -07:00
gsxdsm
05229a5c0f fix(FN-1567): fix plugin loader type and ntfy events test
- Fix ConstructorParameters type in plugin loader
- Update ntfy events test to expect awaiting-user-review event
2026-04-10 21:52:58 -07:00
gsxdsm
34b2af26a7 Fix task card step progress 2026-04-10 21:46:06 -07:00
gsxdsm
39ffb4b456 feat(FN-1562): merge fusion/fn-1562 2026-04-10 21:22:59 -07:00
gsxdsm
7be8c17279 feat(FN-1490): merge fusion/fn-1490 2026-04-10 21:22:50 -07:00
gsxdsm
1a3ff011d3 chore: snapshot WIP across dashboard, engine, and core
Bundles staged work-in-progress modifications across multiple packages
(routes, store, agent-instructions, self-healing, QuickEntryBox, etc.)
plus the dashboard theme-data.css preload fix.

Note: an unstaged 621-line deletion in .fusion/memory.md was deliberately
NOT committed — it appears to be an accidental overwrite of architecture
notes and is left in the working tree for review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 21:12:40 -07:00
gsxdsm
37c91e806d fix(dashboard): restore step/comment fields on slim list and detail tabs
The previous slim listing dropped log, comments, steps,
workflowStepResults, and steeringComments from the board task payload.
Of those, only `log` is actually heavy (~60 MB across 1200 tasks);
everything else combined is under 500 KB and is needed by the board UI:

- TaskCard step progress badge reads task.steps
- TaskCard comment count badge reads task.comments
- Workflow status indicators read task.workflowStepResults

Slim mode now drops *only* log. The other JSON columns stay in board
payloads, so progress bars and badges render again without forcing a
full per-task fetch.

Also fix the TaskDetailModal regression where the Activity tab and the
Step Progress section read task.log/task.steps from the slim board prop
instead of workingTask (the full row loaded via fetchTaskDetail). The
prop is the cached slim row from the board, so the activity tab was
empty until the user scrolled — now both tabs read workingTask.

Updated the slim listTasks regression test to assert the new contract:
log is dropped, but steps/comments/workflowStepResults/steeringComments
match the full row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 20:46:04 -07:00
gsxdsm
5984584d22 perf(dashboard): slim task list + auto-archive stale done tasks
GET /api/tasks was returning ~69 MB of JSON per call (67.9 MB of agent
logs across 1199 tasks), causing the dashboard to hang for 2+ minutes.

- core: extend listTasks() with slim and includeArchived options
- dashboard: GET /api/tasks now uses slim mode and excludes archived
  by default; ?includeArchived=1 opts in
- frontend: lazy-load archived tasks when the archived column is first
  expanded via new useTasks.loadArchivedTasks()
- engine: self-healing maintenance now auto-archives done tasks older
  than 48h (data stays in SQLite, column flips done -> archived)
- tests: slim mode + includeArchived coverage in store.test.ts;
  routes.test.ts assertion updated for new args

Also bundles in-progress test-setup noise filters and pre-existing
QuickEntryBox/routes test work that was already modified locally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 20:16:20 -07:00
gsxdsm
c9a1e94bbe fix(FN-1446): improve test reliability and git command TTY handling
- Fix QuickEntryBox focus restoration after task creation with proper submission state tracking
- Improve QuickEntryBox tests by using explicit promise resolution and proper afterEach cleanup with act() wrappers
- Fix TaskCard tests to use proper act() wrappers for async operations
- Add stdio: 'pipe' to all git execSync calls to prevent TTY interaction issues in CI environments
- Add test log suppression for noisy subagent and pi-claude-cli output in vitest setup
2026-04-10 19:49:05 -07:00
gsxdsm
b8a0b6ccbf feat(FN-1446): wire planning + subtask prompt override resolution with regression tests 2026-04-10 19:32:22 -07:00
gsxdsm
2713616c7d feat(FN-1559): recover orphaned features in autopilot reconciliation
- Add tryRelinkOrphanedFeature() to find and link matching tasks
- Normalize titles (trim, lowercase, collapse whitespace) for matching
- Only relink when exactly one task matches (ambiguous = no action)
- Sync feature status from task state on successful relink
- Normalize to 'defined' when no safe relink exists
- Add 7 tests for orphaned feature relink scenarios
- All 57 tests passing
2026-04-10 19:14:23 -07:00
gsxdsm
f7322ab541 fix: improve merge verification and dashboard behavior 2026-04-10 18:30:23 -07:00
gsxdsm
c56e44bff8 feat(FN-1480): merge fusion/fn-1480 2026-04-10 18:09:00 -07:00
gsxdsm
775defd1eb feat(FN-1558): add dedicated Instructions tab in Agent Detail view
- Add InstructionsTab component for editing agent system instructions directly in the dashboard
- Include validation (character count, preview section) and reset to default functionality
- Add 82 regression tests covering Instructions tab editing flows
- Update agents.md documentation with Instructions tab usage guide
- Add changeset for @gsxdsm/fusion package
2026-04-10 13:30:37 -07:00
gsxdsm
40676e657c fix(FN-1564): remove duplicate Retry button in task detail modal
- Fix duplicate Retry button appearing in task detail modal header
- Add test coverage for Retry button visibility conditions
- Clean up conditional logic for Retry button rendering
2026-04-10 13:02:51 -07:00
gsxdsm
e54867d746 feat(FN-1555): remove quick-entry textarea expand/fullscreen affordance
- Remove expand/compress chevron button from QuickEntryBox
- Remove isExpanded state and resize logic
- Remove fullscreen toggle functionality
- Remove related test cases for expand/collapse behavior
2026-04-10 12:34:38 -07:00
gsxdsm
05bb51fe21 feat(FN-1464): merge fusion/fn-1464 2026-04-10 12:07:01 -07:00
gsxdsm
d693e45f2b fix: resolve dashboard performance bottlenecks causing sporadic hangs
The dashboard was sporadically hanging for several seconds during task
creation and settings loading due to multiple compounding issues:

- checkForChanges() polled every 1s with SELECT * FROM tasks + full
  JSON.stringify comparison, blocking the Node.js event loop. Now uses
  incremental polling (only changed tasks via updatedAt filter).
- allocateId() called readConfig() which always ran listWorkflowSteps(),
  adding unnecessary DB queries while holding the serialization lock.
  Now uses readConfigFast() that skips workflow steps.
- Task creation triggered listWorkflowSteps() up to 3 times per request.
  Added in-memory cache with invalidation on create/update/delete.
- Route handlers used getSettings() (slow path) where getSettingsFast()
  suffices (POST /tasks, GET /config).
- SSE effect in useTasks had searchQuery and refreshTasks in its
  dependency array, causing EventSource teardown/rebuild on every search
  change. Moved to refs since the EventSource URL doesn't use searchQuery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 11:01:15 -07:00