Changed @testing-library/jest-dom import to @testing-library/jest-dom/vitest
in vitest.setup.ts to properly provide type definitions for jest-dom matchers
like toBeInTheDocument, toHaveClass, toBeDisabled, and toHaveAttribute in the
vitest environment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Tighten GitHubOperations.findPrForBranch and mergePr param types to
match the literal unions in FindPrParams/MergePrParams, fixing the
GitHubClient assignability error in dashboard.ts and serve.ts
- Cast MockStore as unknown as TaskStore at mesh-routes.test.ts call
site to satisfy TaskStore shape without implementing 117 methods
- Double-cast AgentGenerationSession via unknown in agent-generation.test.ts
to silence the unsafe conversion diagnostic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
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>
- TaskStore.watch() now initializes lastPollTime so the first
checkForChanges() poll filters by "modified since now" instead of
doing an unfiltered SELECT * and emitting a task:updated event for
every cached task. On a 1200-task board this dropped ~60 MB of SSE
traffic and a 1199-call setState storm one second after dashboard
startup.
- listTasks() gains a column option so callers can filter in SQL.
- dashboard CLI auto-merge sweeps (startup + 2 unpause handlers + the
15s periodic retry) now use listTasks({ column: "in-review" })
instead of pulling the full table on every cycle.
- self-healing archiveStaleDoneTasks() uses slim listTasks — it only
needs id/column/columnMovedAt to decide staleness.
- Document the listTasks() perf contract and the watch() polling
invariant in AGENTS.md and project memory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- 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
- Guard PATCH /api/missions/features/:featureId to reject status
transitions to execution states (triaged, in-progress, done, blocked)
when feature has no taskId
- 'defined' status remains always allowed (initial state)
- Non-status field updates (title, description) are unaffected
- Add 6 new tests covering guard behavior and edge cases
- All 147 mission-e2e tests passing
- 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
- Add Routine Engine Integration documentation to project memory
- Fix PROMPT_KEY_CATALOG by adding missing executor role to agent-generation-system and workflow-step-refine entries
- Update test to expect 6 executor keys instead of 4
- Add prompt-overrides module with template resolution and instruction injection
- Wire prompt overrides into agent generation flow via POST /api/agents route
- Support template-based prompt customization with role-based assignments
- Add agent generation tests and routes tests
- Document new prompt override settings in settings reference
- Add ESLint configuration (eslint.config.mjs) for TypeScript/JavaScript linting
- Update executor prompts to include lint instruction before code submission
- Add lint check to triage prompt validation workflow
- Update agent prompts to emphasize lint compliance as quality requirement
- Add lint tool to agent toolset with file-level rule disabling capability
- Include lint in CI workflow with non-blocking status
- Update tests to verify lint-inclusive prompt behavior
- Add documentation for lint integration in contributing.md
- Add changeset for @gsxdsm/fusion minor release
- 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
- Add GET /api/plugins and GET /api/plugins/:id for listing and retrieving plugins
- Add POST /api/plugins with mode discriminator (register/install) for plugin registration and installation
- Add POST /api/plugins/:id/enable and /disable for plugin lifecycle management
- Add PATCH /api/plugins/:id/settings for updating plugin configuration
- Add DELETE /api/plugins/:id for plugin uninstallation
- All endpoints support projectId scoping via getScopedStore() for multi-project support
- Add comprehensive test suite covering all plugin routes with project context mocking
- Document plugin API endpoints in dashboard README
- Add verification runner that executes testCommand then buildCommand before merge completion
- Verification runs on all merge paths (AI resolve, auto-resolve, -X theirs)
- If verification fails, merge is aborted and task stays out of done
- Add comprehensive tests for merger verification logic
- Fix routine-store test variable reference bug (created.id vs routine.id)
- Add changeset for @gsxdsm/fusion patch release
- Add RoutineRunner class for routine execution via heartbeat system
- Add RoutineScheduler class for cron-based routine polling
- Add triggerManual and triggerWebhook methods for API and webhook triggers
- Wire RoutineScheduler into InProcessRuntime lifecycle
- Add routine trigger and webhook API endpoints
- Fix type mismatches between PROMPT and actual FN-1519 types
completeRoutineExecution was reading from the DB outside the per-routine
lock then calling recordRun which acquires the lock internally. This
allowed concurrent operations on the same routine to hit SQLite
simultaneously. Inlined the logic inside a single withRoutineLock call
so the read and write are serialized.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The RoutineRunner and RoutineScheduler were written against a different
interface than what RoutineStore actually implements, causing TypeError
crashes as soon as any routine became due. This adds the missing
agentId/catchUpLimit fields to the Routine type and DB schema, adds
startRoutineExecution/completeRoutineExecution/cancelRoutineExecution
methods to RoutineStore, and fixes all property name mismatches
(lastExecutedAt→lastRunAt, trigger.cron→trigger.cronExpression,
policy value alignment) in the runner, scheduler, and tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- Add viewport-gated fetching to TaskCard component so only visible cards load their data
- Implement lightweight memo comparison to prevent unnecessary re-renders
- Add lazy enable gates to useSessionFiles and useTaskDiffStats hooks with caching
- Add comprehensive tests for useSessionFiles and useTaskDiffStats hooks
- Document viewport-gated loading patterns in memory and dashboard-load performance docs