Commit Graph

2543 Commits

Author SHA1 Message Date
gsxdsm
c79e9369b5 fix(FN-1485): complete Step 1 — harden chat SSE parsing 2026-04-13 13:05:46 -07:00
gsxdsm
ccb5ef8ce4 feat(FN-1451): complete Step 5 — document hierarchy resolution 2026-04-13 13:00:05 -07:00
gsxdsm
c26afccd0c feat(FN-1451): complete Step 3 — align CLI hierarchy imports 2026-04-13 12:55:30 -07:00
gsxdsm
324783bf9c feat(FN-1451): complete Step 2 — resolve hierarchy in dashboard imports 2026-04-13 12:51:59 -07:00
gsxdsm
9a69ef9365 feat(FN-1451): complete Step 1 — add core hierarchy import planning 2026-04-13 12:49:29 -07:00
gsxdsm
4e4dbc92c1 Fix stranded task retry and respec reset 2026-04-13 11:10:17 -07:00
gsxdsm
2a4e5df3fc fix(lint): resolve pre-existing lint errors and merge conflicts
- Remove unused imports/vars from routes.ts (VALID_TRANSITIONS, AUTOMATION_PRESETS, ChatStore, FileListResponse, etc.)
- Prefix unused destructured error vars with _ convention
- Fix prefer-const for summary variable
- Add _ ignore pattern to eslint.config.mjs
- Include test files in tsconfig.app.json to fix @testing-library/jest-dom types
- Resolve GitManagerModal.test.tsx merge conflict (take fn-1626 expectLatestCallStartsWith style)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:31:15 -07:00
gsxdsm
86ed4689d5 fix(respecify): skip stale spec enforcement for in-progress/in-review/done tasks
Background stale spec checks now skip tasks that are already in an
active work state (in-progress, in-review, done, merging, merging-pr)
to avoid interrupting work that is underway or complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:08:25 -07:00
gsxdsm
e5d6cc7d27 fix mobile task action menu positioning 2026-04-13 10:04:14 -07:00
gsxdsm
d88fd25460 fix(milestone-interview): reconnect SSE stream after submitting response
Same bug as MissionInterviewModal: handleSubmitResponse was calling the
API without first reconnecting to the SSE stream. The stream's complete
event closes the connection after each question delivery, so after the
user submits an answer, a fresh connection is needed to receive the
next question or summary.

Also cleans up the stream on API error, matching MissionInterviewModal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 09:58:21 -07:00
gsxdsm
5df0aad253 fix(mission): reconnect SSE stream after submitting interview response
After handleSubmitResponse posted an answer, the stream connection was
never re-established, so the next question from the server was never
received. The modal would stay on the loading spinner until the user
closed and reopened it (which triggered the resume-session reconnect).

Fix: call connectToMissionInterviewStream(sessionId) before the API
call, matching the pattern used by handleRetryFromError. Also close
the stream on API error to match the error-recovery path, and add
connectToMissionInterviewStream to the useCallback dependency array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 09:53:07 -07:00
gsxdsm
e1ff4018d8 fix(settings): fix Zai API key clear/save and update GitManagerModal tests
- hasApiKey now only returns true for stored api_key credentials; previously
  it fell back to hasAuth() which includes env vars, causing Clear to appear
  to do nothing and Save to never appear
- Save button now shows when user types into the key input even if already
  authenticated, allowing key updates without clearing first
- Remove unused importFile state variable (TS 6133 lint error)
- Update GitManagerModal tests to pass undefined as projectId argument to
  all API mocks, matching the component's project-aware API signatures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 09:48:59 -07:00
gsxdsm
f3d365ecc0 feat(FN-1667): merge fusion/fn-1667 (auto-resolved)
- test(FN-1667): complete Step 4 — verify roadmap model
- feat(FN-1667): complete Step 3 — document roadmap model
- feat(FN-1667): complete Step 2 — add roadmap ordering helpers
- feat(FN-1667): complete Step 1 — define roadmap contracts
2026-04-13 08:57:48 -07:00
gsxdsm
d4f42787d1 feat(FN-1661): merge fusion/fn-1661 (auto-resolved)
- feat(FN-1661): complete Step 4 — document task-worker health fix
- feat(FN-1661): complete Step 3 — verify task-worker agent health fix
2026-04-13 08:54:19 -07:00
gsxdsm
c5e8fc7633 fix(dashboard): make GitManagerModal project-aware
GitManagerModal was not receiving projectId from AppModals, causing all
git operations to run against the default repo instead of the active
project's repo. Threads projectId through all git API calls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:27:09 -07:00
gsxdsm
f80a68ab1e fix(dashboard): use ProjectEngine for secondary projects
Secondary projects were started via ProjectManager (bare InProcessRuntime)
which lacks auto-merge queue, startup sweep, periodic retry, PR monitor,
and settings listeners. Tasks reaching in-review in secondary projects
would never be auto-merged. Now all projects use ProjectEngine for the
full subsystem set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:58:20 -07:00
gsxdsm
c5d10c5085 fix(engine): recover already-merged tasks stuck in in-review
When a merge completes but auto-recovery moves the task back to
in-review, the retry gating (mergeRetries >= 3) blocked re-processing.
Now canMergeTask always accepts mergeConfirmed tasks and drainMergeQueue
fast-paths them directly to done without re-running the merge agent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:49:54 -07:00
gsxdsm
c86d85202d Fix Zai and Minimax auth for usage 2026-04-13 07:38:38 -07:00
gsxdsm
45c68d39bd Read provider settings from fusion fallback 2026-04-13 07:05:01 -07:00
gsxdsm
e74076c83f feat(FN-1664): merge fusion/fn-1664 (auto-resolved)
- docs(FN-1664): add changeset for Active Agents card selection fix
- test(FN-1664): add regression tests for active agent card selection
- feat(FN-1664): wire ActiveAgentsPanel selection to open AgentDetailView
2026-04-13 00:31:54 -07:00
gsxdsm
2d7216f366 feat(FN-1624): add delete button to TaskCard for triage column
- Add delete button component to TaskCard for tasks in the triage column
- Thread onDeleteTask prop through App → Board → Column → TaskCard
- Add CSS styles for delete button with hover/active states
- Add comprehensive tests for delete button visibility and click handling
- Hide delete button for non-triage columns (todo, in-progress, etc.)
2026-04-13 00:21:25 -07:00
gsxdsm
322a2629e7 fix(engine): keep executor prompts scoped to worktrees 2026-04-13 00:03:16 -07:00
gsxdsm
522a2d52b0 feat(FN-1492): fix workspace file operation route collision
- Fix Express route ordering where wildcard POST /files/{*filepath} was capturing operation routes
- Move operation routes (delete, copy, move, rename) before the generic write route to ensure proper matching
- Add missing ProjectEngine methods (getHeartbeatTriggerScheduler) for dashboard compatibility
- Add 189 regression tests verifying operation routes work correctly with nested paths
- Document Express wildcard route ordering pitfall in memory
2026-04-12 23:58:49 -07:00
gsxdsm
372337c608 Fix dashboard startup blocking on recovery 2026-04-12 23:50:51 -07:00
gsxdsm
ea4e42646b feat(FN-1622): merge fusion/fn-1622 2026-04-12 23:26:46 -07:00
gsxdsm
2bee1206cc fix non-node worktree agent startup 2026-04-12 22:34:46 -07:00
gsxdsm
0d49580a93 feat(FN-1608): extend textarea width fix to InlineCreateCard with regression tests
- Apply textarea width fix from QuickEntryBox to InlineCreateCard in styles.css
- Add regression tests for InlineCreateCard textarea width
- Add regression tests for QuickEntryBox textarea width
- Ensure consistent textarea styling across board and list creation surfaces
2026-04-12 22:21:53 -07:00
gsxdsm
498963821b feat(FN-1451): update documentation for team-aware agent import
- Add Agent Import section to README with team hierarchy docs
- Update CLI reference with import source formats and examples
- Add changeset for @gsxdsm/fusion patch release
2026-04-12 22:07:38 -07:00
gsxdsm
3af15376c9 fix(FN-1606): constrain task detail dropdown menus to viewport on mobile
- Add max-height constraint (100dvh - 120px) to action and move dropdown menus on mobile
- Enable vertical scrolling for dropdown menus with overflow-y: auto
- Add -webkit-overflow-scrolling: touch for smooth scrolling on iOS
- Add CSS coverage test for dropdown menu mobile constraints
2026-04-12 22:05:34 -07:00
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
95f3b2286e fix(FN-1606): constrain task detail dropdown menus to viewport on mobile 2026-04-12 21:49:56 -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