Commit Graph

1752 Commits

Author SHA1 Message Date
gsxdsm
425f398e15 fix(dashboard): start engine for every registered project on first access
Tasks in projects other than the primary (cwd) project were never triaged
because only one ProjectEngine was started. When a project is accessed via
?projectId= API/SSE, getOrCreateProjectStore created a TaskStore but left
the Scheduler, TriageProcessor, and TaskExecutor unstarted.

Fix: introduce setOnProjectFirstCreated callback in project-store-resolver
so the dashboard server is notified when any new project is first accessed.
dashboard.ts creates a ProjectManager that lazily starts an InProcessRuntime
(Scheduler + TriageProcessor + TaskExecutor) for each project the first time
it is accessed — works for any number of registered projects.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:58:19 -07:00
gsxdsm
bb5b5266f2 fix(FN-1606): constrain task detail dropdown menus to viewport on mobile
- Add mobile CSS rules for .detail-actions-menu and .detail-move-menu dropdowns
- Position dropdowns above action bar with bottom: calc(100% + 4px)
- Constrain max-height to calc(100dvh - 120px) for viewport fit
- Enable overflow scrolling with -webkit-overflow-scrolling: touch
- Fix test assertion to match multi-selector CSS format
2026-04-12 21:57:00 -07:00
gsxdsm
51e23786c0 fix(dashboard): ensure file/import API calls are project-scoped in tests
Update 4 test files to pass projectId="project-1" to hooks/components
and assert it flows through to the API layer:
- useFileBrowser: fetchFileList receives (taskId, path, projectId)
- useFileEditor: fetchFileContent/saveFileContent receive projectId
- FileBrowser: deleteFile/renameFile/copyFile/moveFile receive projectId
- GitHubImportModal: apiImportGitHubIssue/Pull receive projectId

All 6653 tests pass across 242 test files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:40:34 -07:00
gsxdsm
52329095de fix(cli): remove obsolete engine-internal tests from dashboard __tests__
Tests for MissionAutopilot wiring, semaphore boundaries, CronRunner,
syncInsightExtraction, and internal subsystem constructors are now
handled by ProjectEngine internally. Replace with a single test
verifying `engine` is passed to createServer in non-dev mode.

All 636 CLI tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:16:13 -07:00
gsxdsm
2793da84bd feat: multi-project engine runtime improvements
- Update project manager and runtime interfaces for multi-project coordination
- Add project engine configuration to core types and settings schema
- Enhance child-process worker tests for signal handling coverage
- Extend in-process runtime with per-project engine lifecycle hooks

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 19:59:12 -07:00
gsxdsm
415f636056 feat(FN-1604): merge fusion/fn-1604 2026-04-12 19:46:06 -07:00
gsxdsm
4d1f6c2c57 fix: add projectId to remaining unscoped API functions
- GitHub import functions: apiImportGitHubIssue, apiBatchImportGitHubIssues, apiImportGitHubPull
- Task file operations: fetchFileList, fetchFileContent, saveFileContent
- AI title summarization: summarizeTitle
- Terminal command execution: execTerminalCommand
- Wire projectId through GitHubImportModal, AppModals, useFileBrowser, useFileEditor hooks

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 19:34:22 -07:00
gsxdsm
b467be1308 feat(FN-1657): merge fusion/fn-1657 2026-04-12 19:31:13 -07:00
gsxdsm
c9c5bbf788 feat(FN-1621): merge fusion/fn-1621 2026-04-12 19:16:21 -07:00
gsxdsm
2797ea3777 feat(FN-1602): merge fusion/fn-1602 2026-04-12 19:16:15 -07:00
gsxdsm
7624d6e76a feat(FN-1601): merge fusion/fn-1601 2026-04-12 19:01:06 -07:00
gsxdsm
cd0ada5ad3 fix(companies.sh): navigate into slug subdirectory for multi-company repos
When importing from companies.sh, the repo may be a multi-company monorepo
(e.g. paperclipai/companies) where each company is a subdirectory. The code
was parsing the repo root which has no COMPANY.md, resulting in 'no agents
found'. Now detects this and descends into the slug-matched subdirectory.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 19:00:51 -07:00
gsxdsm
c9cd9284d7 fix: project-scope terminal, file browser, agent execution, and heartbeat monitor
- TerminalService: use per-project instance map instead of destructive singleton
- File browser: thread projectId through API functions, hooks, and components
- Workspace file editor: pass projectId to read/write operations
- Agent heartbeat: guard execution with project scope validation
- Agent runs/stop: validate heartbeatMonitor matches scoped project
- CLI dashboard/serve: pass rootDir to heartbeatMonitor via server options
- Add getRootDir() to HeartbeatMonitor for scope comparison

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 18:38:26 -07:00
gsxdsm
936f71aa20 feat(FN-1479): restore projectId on subtask session rehydration
- Restore projectId field when rehydrating subtask sessions from SQLite via buildSubtaskSessionFromRow()
- Add regression tests for projectId forwarding in subtask start-streaming route
- Add documentation note in memory.md for durable subtask session context propagation
2026-04-12 18:25:01 -07:00
gsxdsm
e06bb6525e feat(FN-1647): merge fusion/fn-1647 2026-04-12 18:21:24 -07:00
gsxdsm
684762e3e9 feat(FN-1493): add directory browsing UX to plugin install flow
- Add DirectoryPicker component for browsing filesystem to select plugin source
- Add dist-folder and package-root install-source resolution in backend
- Wire frontend installPlugin to mode-discriminated endpoint (/plugins/install-local)
- Add comprehensive regression tests for browse-driven plugin install workflow
- Update PluginManager UI with directory picker integration and CSS styles
2026-04-12 18:10:39 -07:00
gsxdsm
0489f035b5 fix: scope all git, activity, webhook, and summarize-title routes to correct project store
- Fix 30 git routes to use getScopedStore(req) instead of global store
- Fix activity GET/DELETE routes to use scoped store
- Fix POST /api/github/webhooks to use scoped store for badge updates
- Fix POST /api/ai/summarize-title to use scoped store for settings
- Fix GET /api/git/worktrees to use scoped store for task listing
- Add projectId parameter to all git and activity frontend API functions
- Update useActivityLog hook to pass projectId through

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 17:55:07 -07:00
gsxdsm
db6e51d58c feat(FN-1646): add stale-spec guard to prevent execution of outdated tasks
- Add spec-staleness evaluator to check task specification age before execution
- Guard executor startup and resume to prevent running tasks with stale specs
- Guard scheduler dispatch to skip stale tasks and move them back to triage
- Add comprehensive tests for spec staleness detection (7d/14d thresholds)
- Add getFusionDir mock for executor staleness check tests
2026-04-12 17:49:22 -07:00
gsxdsm
bf5ce66a07 feat(FN-1656): complete Step 1 — implement canonical node-project counting rules 2026-04-12 17:36:18 -07:00
gsxdsm
b958f12d8f feat(FN-1596): increase width of quick-add task text entry box
- Add CSS rule to override padding-right for QuickEntryBox textarea
- The .description-with-refine textarea rule was adding 70px padding that wasn't needed in QuickEntryBox (refine button is in controls panel)
- Add regression tests for textarea width contract
- Add mockDesktopViewport helper for viewport-specific tests
- Keep max-width: 800px constraint in list view (design decision)
2026-04-12 17:31:51 -07:00
gsxdsm
afafd26e92 fix(FN-1619): convert remaining engine execSync calls to async execAsync
- Replace blocking execSync calls with async execAsync in executor.ts for user-configured commands
- Convert self-healing.ts worktree status checks to async to avoid blocking the event loop
- Update step-session-executor.ts to use async worktree operations
- Refactor worktree-pool.ts for fully async worktree creation, cleanup, and listing
- Convert pi.ts agent session handling to async execution
- Update all corresponding tests with async/await patterns
- Add changeset for @gsxdsm/fusion patch release
2026-04-12 17:21:24 -07:00
gsxdsm
5ced23e1e4 fix: fix companies.sh catalog browsing and import, constrain mission interview options height
- Handle { items: [...] } response format from companies.sh API
- Parse installs field as both string and number
- Accept owner/repo shorthand in addition to full GitHub URLs
- Replace broken Web Streams pipeTo with Node stream/promises.pipeline
- Add max-height with scroll to planning-options to prevent overflow

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 17:07:12 -07:00
gsxdsm
9d83ed7efd feat(FN-1652): add compose action from Agents tab with deterministic state behavior
- Add compose button to Agents tab for composing messages to agents
- Compose pre-fills recipient when agent is selected, shows dropdown otherwise
- After send, user stays on Agents tab and selected agent is preserved
- Add 4 regression tests for new compose contract
- Add CSS for mailbox-agents-header layout
2026-04-12 16:34:56 -07:00
gsxdsm
e1cc62e94f 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
b40bba7b45 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
597685e892 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
961bf4b34e 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
3675173801 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
6fe1d01f70 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
e14491fabf feat(FN-1637): merge fusion/fn-1637 2026-04-12 15:58:10 -07:00
gsxdsm
551caf0e9b feat(FN-1643): add context-limit recovery for step-session execution
- Add context-overflow detection and recovery in step-session executor with same parity as single-session
- Implement step resumption from overflow checkpoints with accumulated context replay
- Add overflow state tracking and recovery logging for diagnostics
- Harden single-session executor overflow recovery with improved state management
- Update appendAgentLog parameter signatures across executors
- Add comprehensive tests for context overflow scenarios in both execution modes
- Add memory entry documenting the unified context-limit recovery approach
2026-04-12 15:50:09 -07:00
gsxdsm
23ef4faa20 feat(FN-1645): merge fusion/fn-1645 2026-04-12 15:28:52 -07:00
gsxdsm
d57f11a39d feat(FN-1632): merge fusion/fn-1632 2026-04-12 15:28:10 -07:00
gsxdsm
60aba38816 feat(FN-1607): add process lifecycle diagnostics and fix resource leaks
- Add process lifecycle diagnostics for dashboard and serve commands
- Add SQLite database health check to diagnostics endpoint
- Add store listener count diagnostics for debugging subscription leaks
- Audit and fix SSE connection management to prevent connection leaks
- Audit and fix timer/interval cleanup in engine and CLI shutdown handlers
- Fix res.on() call guard for test mocks compatibility
- Fix variable declaration ordering in serve.ts
- Update memory with diagnostic findings for future debugging
2026-04-12 15:27:50 -07:00
gsxdsm
22c19ca299 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
428b8f7b17 Harden architecture hot paths 2026-04-12 15:13:27 -07:00
gsxdsm
476ef812dc 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
6ddca7ce9b fix(FN-1623): add eslint-disable comments for kept functions
- Add eslint-disable comments for unused parameters in truncateVerificationOutput and summarizeVerificationOutput
- Preserve functions that may be useful for future diagnostics while silencing no-unused-vars warnings
2026-04-12 13:56:11 -07:00
gsxdsm
41ac7c7cc3 ci: disable automatic workflow triggers 2026-04-12 13:48:13 -07:00
gsxdsm
e4b05b1c4f 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
0334f09d6f test: reduce default runner noise and contention 2026-04-12 13:41:10 -07:00
gsxdsm
c42ea664f8 feat(FN-1617): add verification output summarization for concise test failure reports
- Add summarizeVerificationOutput helper function to condense test output
- Update runVerificationCommand to use summarization for cleaner merge reports
- Improve readability of test failure summaries in the dashboard
2026-04-12 13:31:27 -07:00
gsxdsm
2fc4fccd00 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
7fcb37fa47 test: close store handles in slow suites 2026-04-12 13:03:28 -07:00
gsxdsm
055e7d84f0 test: remove waits from slow tests 2026-04-12 12:52:32 -07:00
gsxdsm
94996e204d feat(FN-1594): merge fusion/fn-1594 2026-04-12 12:33:05 -07:00
gsxdsm
ee4e3598cd test: speed up slow dashboard and tui tests 2026-04-12 12:28:29 -07:00
gsxdsm
a9214d42de fix(FN-1600): complete async conversion of hasRecoverableGitWork
- Convert hasRecoverableGitWork from sync execSync to async execAsync
- Update recoverNoProgressNoTaskDoneFailures caller to await the method
- Update self-healing tests to work with async method and execAsync mock
- Add exec and promisify imports to self-healing.ts
- Fix mock to include exec export for promisify compatibility
2026-04-12 12:24:54 -07:00
gsxdsm
b2e25c08b2 fix(FN-1473): recover no-progress task_done failures 2026-04-12 12:13:06 -07:00
gsxdsm
f915764e80 feat(FN-1612): merge fusion/fn-1612 2026-04-12 12:03:08 -07:00