Commit Graph

53 Commits

Author SHA1 Message Date
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
d250f866d6 feat(FN-2729): unify node status indicator with NodeHealthDot
- Resolve merge conflicts in InlineCreateCard and QuickEntryBox using the existing node picker UX
- Replace ad-hoc node status rendering with NodeHealthDot in task creation surfaces
- Keep advanced quick-create controls and portal-based dropdown behavior intact
- Preserve related dashboard styling and tests included in the staged squash

Fusion-Task-Id: FN-2729
2026-04-29 08:15:01 -07:00
Fusion
d212ee12b3 feat(FN-2913): merge fusion/fn-2913
- feat(FN-2913): complete Step 7 — align InlineCreateCard node picker UX

Fusion-Task-Id: FN-2913
2026-04-29 00:09:39 -07:00
Fusion
279d584072 feat(FN-2723): show node health in dashboard routing selectors
- Add node status indicators and labels to task creation, quick entry, task form, and settings node selectors
- Surface selected node health in list bulk-edit controls with status dot styling for online/connecting/offline/error states
- Update dashboard component CSS and shared styles for consistent node status presentation
- Include changeset documenting unavailable-node routing policy and default node behavior
2026-04-28 14:25:56 -07:00
Fusion
02ae48b0d6 feat(FN-2721): enforce node override guard across task workflows
- Add a core node-override-guard module, export it from @fusion/core, and enforce conflicts in store updates
- Add API route and CLI extension safeguards so nodeId override updates are blocked when ownership would conflict
- Wire node override routing and validation through dashboard quick-create, list, modal, settings, and task form/detail surfaces
- Add focused unit and integration tests for core guard logic, workflow routes, and dashboard node override UX
2026-04-28 14:25:55 -07:00
gsxdsm
601f39613f refactor(dashboard): extract Cards, Card editing, and InlineCreateCard from styles.css
Sweep 2 of the styles.css split. Three card-related blocks moved out of the
monolith into co-located component CSS files. styles.css 4488 → 3304
(–1184 lines).

- /* === Cards === */ (583 lines) → new TaskCard.css
- /* === Card Inline Editing === */ (266 lines) → appended to TaskCard.css
- /* === Inline Create Card === */ (342 lines) → new InlineCreateCard.css

Mobile rules for the moved selectors that previously sat in the global mobile
@media block also followed to their respective component CSS files.

Kept global: .dep-dropdown* (4 consumers — InlineCreateCard, NewTaskModal,
TaskDetailModal, TaskForm). Moving without adding imports to the other 3
consumers would silently break their styling.

CSS imports added at TaskCard.tsx:1 and InlineCreateCard.tsx:1. Verified by
visual smoke test against the live dev server (board view + cards render
correctly).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 08:54:41 -07:00
Fusion
a6dd98957c feat(FN-2389): add task priority controls across dashboard flows
- Wire priority through task creation and update API payloads for dashboard clients
- Add priority selection to TaskForm, New Task modal, and inline create card with default/reset behavior
- Support priority editing and display in Task Detail modal plus non-default priority badges on task cards
- Extend dashboard styles and component tests to cover priority selectors, rendering, and mobile behavior
2026-04-24 15:00:43 -07:00
gsxdsm
88d8a8fa37 refactor: eliminate remaining 15 any warnings and ratchet rule to error
- TaskCard: four catch((err: any) => err.message) promise handlers in
  archive/unarchive/delete/move → catch((err) => getErrorMessage(err)).
- InlineCreateCard + QuickEntryBox: .catch((err: any)) model-load handlers
  → getErrorMessage(err) with existing @fusion/core import.
- TerminalModal: drop (navigator as any).maxTouchPoints — modern lib.dom
  types already expose the property.
- serve.ts: remove unused any annotation on OpenRouter model mapper; the
  array element type is already inferred from json.data.
- pi.js, runtime-resolution.ts, dashboard.ts, serve.ts, dev-server-port-
  detect.ts, devserver-manager.ts: drop now-stale eslint-disable comments
  that the cleanup made redundant.

Fix a prompt-builder regression surfaced by agent's `any` cleanup: toolCall
with a raw string `arguments` field must be preserved verbatim (JSON-quoted)
rather than coerced to `{}`; restores a previously-passing test.

Then promote @typescript-eslint/no-explicit-any from warn → error. Future
new anys must either come with a one-line disable + justification or use a
real type. Workspace is now lint-clean (0 problems).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -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
4e38c5f7de feat(FN-1719): rebuild eslint baseline and add memory lessons
- Rebuild eslint config with context-aware flat config for better TypeScript/JSX handling
- Add memory lessons for lint/type/test baseline restoration
- Skip pre-existing flaky stream test (flushes a final complete event)
- Fix api.ts require import path
- Add ProjectEngineManager.startReconciliation mock to tests for main compatibility
2026-04-13 18:21:31 -07:00
gsxdsm
5e1352d2a1 feat(FN-1484): fix agent picker stale cache on project switch
- Clear agent cache when projectId changes in QuickEntryBox and InlineCreateCard
- Add regression tests for agent picker cache invalidation behavior
- Add changeset for @gsxdsm/fusion patch release
2026-04-09 21:39:09 -07:00
gsxdsm
b89e87c787 feat(FN-1324): add fullscreen expand to task creation components
- Add Maximize2/Minimize2 toggle button to QuickEntryBox for fullscreen textarea expansion
- Add Maximize2/Minimize2 toggle button to InlineCreateCard for fullscreen textarea expansion
- Implement single-textarea pattern with positioned container for expand button overlay
- Add description--fullscreen CSS class for fullscreen textarea styling
- Add focus handoff when entering fullscreen mode
- Add comprehensive unit tests for fullscreen expansion in both components
- Tests cover collapsed/expanded states, toggle button visibility, and class application
2026-04-09 13:31:26 -07:00
gsxdsm
a3598c1661 feat(FN-1292): consolidate InlineCreateCard controls into single row
- Refactor InlineCreateCard to display all action buttons (Plan, Subtask, Deps, Agent, Browser Verify, Preset, Models, Save) in one consolidated footer row
- Remove the separate inline-create-description-actions CSS class and associated styles
- Update InlineCreateCard tests to reflect the new consolidated control layout
- Update AGENTS.md documentation for InlineCreateCard controls description
- Update memory file with implementation notes
2026-04-08 20:48:08 -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
71d9ae9d8b feat(FN-1098): add dashboard task-agent assignment flow
- Add task-agent assignment API helpers with coverage for assign, unassign, and list endpoints
- Show assigned agent badges on task cards and add assignment controls in TaskDetailModal
- Add agent task management tab plus agent selectors in quick and inline task creation UIs
- Expand component test coverage and include a changeset for the dashboard agent assignment feature
2026-04-08 03:19:09 -07:00
gsxdsm
f0637af40c fix(FN-1102): persist workflow step selection in task create payloads
- Add browser verification toggle state to InlineCreateCard and submit browser-verification via enabledWorkflowSteps when selected
- Reset browser verification state after submit/cancel flows to prevent stale workflow selections
- Add InlineCreateCard and NewTaskModal tests that verify enabledWorkflowSteps are included in create payloads
- Add a patch changeset for @gsxdsm/fusion describing the workflow-step visibility fix
2026-04-07 23:26:28 -07:00
gsxdsm
2d7ec446fd feat(FN-1112): remove browser-verification special-case UI
- Remove the hardcoded Browser Verification checkbox from TaskForm and rely on configured workflow steps
- Remove the InlineCreateCard Browser toggle and stop injecting browser-verification into create payloads
- Align TaskForm and InlineCreateCard tests with template-only workflow-step selection behavior
- Delete obsolete NewTaskModal and TaskDetailModal assertions for browser-verification controls
2026-04-07 22:37:19 -07:00
gsxdsm
e4019c0c99 feat(FN-844): add theme-driven logo and CTA button token system
- Add CSS custom properties (--kb-logo-accent, --kb-cta-*) for logo accent color and new-task action buttons
- Update logo.svg to use currentColor for theme-aware accent stroke
- Apply tokenized styling to Header logo, QuickEntryBox, InlineCreateCard, ListView, and Column new-task buttons
- Add theme-aware test assertions for logo and CTA buttons in Header, InlineCreateCard, ListView, and QuickEntryBox tests
- Document theme token system in dashboard README
2026-04-04 04:13:36 -07:00
gsxdsm
40b89f4ec1 feat(FN-807): add model preset selection to QuickEntryBox and InlineCreateCard
- Extend ModelSelectionModal with preset picker and apply-to-task wiring
- Wire preset state through QuickEntryBox and InlineCreateCard new-task flows
- Add regression tests for preset selection in ModelSelectionModal, QuickEntryBox, InlineCreateCard, and ListView
- Update dashboard README with preset-in-quick-add documentation
- Clean up unused footer-safe-layout test and adjust styles
2026-04-03 20:10:36 -07:00
gsxdsm
881674b19f feat(FN-781): reposition AI-assisted creation controls adjacent to description field
- Move Plan and Subtask buttons next to the description input in QuickEntryBox, InlineCreateCard, and TaskForm
- Improve action button layout with consistent icon+label pattern and disabled states
- Add CSS styles for new action button group and description-adjacent controls
- Add regression tests for all three task creation surfaces ensuring buttons appear next to description
- Document the description-adjacent AI controls pattern in dashboard README
2026-04-03 11:58:49 -07:00
gsxdsm
70ef237bc9 feat(FN-752): wire up model favorites across dashboard components
- Add favorite model selection to QuickEntryBox and InlineCreateCard components
- Wire up model favorites in TaskForm and TaskDetailModal
- Add model favorites management UI to SettingsModal
- Add tests for favorites in InlineCreateCard, QuickEntryBox, TaskForm, ListView, and SettingsModal
- Remove unused CommitDiffTab component and related tests
2026-04-02 20:26:35 -07:00
gsxdsm
cd72ab867a refactor(FN-727): replace inline model dropdown with ModelSelectionModal
- Replace inline model dropdown in InlineCreateCard with modal-based ModelSelectionModal
- Add model selection button to Header and SettingsModal for unified access
- Add comment threading support in TaskComments component
- Remove unused useTerminal hook and usage tracking module
- Update tests for modal-based model selection and new components
2026-04-02 19:18:46 -07:00
gsxdsm
1f8465342c fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
f779d8285e fix(FN-679): use merge-base diff in modal changes tab
- Updated /tasks/:id/diff endpoint to use merge-base comparison
- Changed from HEAD~1..HEAD to ...HEAD syntax
- Added fallback to HEAD when merge-base fails
- Verified fix matches /tasks/:id/file-diffs endpoint pattern
2026-04-02 10:25:57 -07:00
gsxdsm
c5a75702c3 feat(FN-677): add browser verification workflow step template
- Add browser verification workflow step template to WORKFLOW_STEP_TEMPLATES
- Update NewTaskModal UI with browser verification checkbox
- Update InlineCreateCard UI with browser verification toggle
- Add tests for browser verification feature
- Create changeset for minor version bump
2026-04-02 10:20:22 -07:00
gsxdsm
b8f3da792f feat(FN-668): add button visibility tests for task creation components
- Add testid to save button in InlineCreateCard for test targeting
- Add tests verifying InlineCreateCard buttons are hidden when collapsed
- Add tests verifying QuickEntryBox controls have hidden attribute when collapsed
- Add tests for toggle behavior and button accessibility in both components
2026-04-02 09:40:56 -07:00
gsxdsm
7fd5704a80 Removed unwanted files marked in .gitignore 2026-04-01 21:25:08 -07:00
gsxdsm
9b45ed2786 feat(KB-657): add manual quick-add expand toggles
- Add chevron expand/collapse toggles to dashboard quick-add flows in list and board views
- Keep advanced quick-add controls hidden until expanded and collapse them after successful submission
- Tighten quick-add accessibility and blur behavior around overlays and empty drafts
- Add dashboard regression coverage and a published changeset for the quick-add interaction update
2026-04-01 13:22:49 -07:00
gsxdsm
a5ad82eab1 feat(KB-657): add expand/collapse toggle to quick add components
- Add toggle button (ChevronDown/ChevronUp) to QuickEntryBox (list view) and InlineCreateCard (board view)

- Replace auto-expand behavior with manual toggle control

- Add CSS styles for collapsed/expanded states and toggle button positioning

- Update tests to verify toggle behavior

- Provide cleaner default UI while keeping advanced options discoverable
2026-04-01 07:13:14 -07:00
gsxdsm
54767f60eb feat(KB-648): enable parallel test execution and optimize test performance
- Optimize backup tests using fake timers instead of real timeouts

- Enable parallel file execution in core, engine, CLI, and dashboard packages

- Add inline test helpers to reduce dependencies in dashboard routes tests

- Update executor tests with exact command matching and improved assertions

- Update AGENTS.md with test optimization patterns (fake timers, unique temp dirs)
2026-04-01 06:54:50 -07:00
gsxdsm
02bbaa79b4 feat(KB-657): add expand toggle to quick task creation UI
- Add toggle button to QuickEntryBox (list view) for expand/collapse
- Add toggle button to InlineCreateCard (board view) for expand/collapse
- Add CSS styles for toggle buttons and collapsed states
- Update component tests for new toggle functionality
- Add changeset for the toggle button feature
2026-03-31 23:41:49 -07:00
gsxdsm
3f6dc342d7 feat(KB-603): improve task creation UX with draft persistence and save-to-create
- Change QuickEntryBox Save button to immediately create task instead of just saving
- Add draft persistence to InlineCreateCard via localStorage for recovery
- Add comprehensive tests for InlineCreateCard draft persistence
- Update QuickEntryBox tests for new save-and-create behavior
2026-03-31 17:02:11 -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
b1a5db6560 fix(KB-259): update subtask button tooltip for live feature
- Update subtask button tooltip from "coming soon" to "Break down into AI-generated subtasks"

- Apply tooltip fix to both QuickEntryBox and InlineCreateCard components

- Add changeset for patch release
2026-03-31 05:52:29 -07:00
gsxdsm
dfe5601622 feat(KB-184): add model presets for task creation
- Add model preset types and settings fields with API validation
- Create model preset utility helpers for size-based auto-selection
- Add settings UI for managing model presets (create, edit, delete)
- Integrate preset selection into NewTaskModal with custom override option
- Add inline preset selection to InlineCreateCard component
- Persist modelPresetId in task store and preserve through archive/unarchive
- Add changeset and update AGENTS.md with feature documentation
2026-03-31 02:04:45 -07:00
gsxdsm
23368cc25f feat(KB-248): replace checkbox with Plan and Subtask buttons in task creation UI
- Replace 'break into subtasks' checkbox with explicit Plan and Subtask buttons

- Update InlineCreateCard (Board view) and QuickEntryBox (List view) with new button layout

- Wire up button callbacks in App.tsx, Board, and ListView components

- Update and add tests for disabled button behavior when no description entered

- Document new Plan and Subtask button behavior in AGENTS.md
2026-03-30 19:53:45 -07:00
gsxdsm
ea084c0ff2 feat(KB-060): add model selection to task creation
- Extend task creation types, store persistence, and API payloads to accept executor and validator model overrides
- Add inline model selection to the dashboard create card with default normalization, retryable model loading, and focus-safe interactions
- Wire the list-view create flow through InlineCreateCard and style the dropdown to stay usable within the viewport on mobile and desktop
- Add store, route, app, list-view, and inline-create tests covering override submission, partial selections, and inline creation behavior
- Document the new creation-time model selection flow and include a published package changeset
2026-03-30 05:41:30 -07:00
gsxdsm
86efb14947 feat(KB-040): add break-into-subtasks toggle for task creation
- Add breakIntoSubtasks flag to core Task model and persist to store
- Plumb subtask flag through dashboard API routes with validation
- Add subtask toggle UI to inline task creation card
- Update triage agent to handle automatic subtask breakdown when enabled
- Add comprehensive tests for store, API routes, and UI components
- Include changeset for patch release documenting the new feature
2026-03-29 22:23:47 -07:00
gsxdsm
5e59c0419e feat(KB-057): complete Step 0 and 1 — backend API and frontend client for interactive terminal 2026-03-29 20:48:39 -07:00
Dustin Byrne
ac4166902d fix(KB-186): add ID-based tiebreaker to sort comparators for stable ordering
- Add numeric ID tiebreaker to TaskStore.listTasks() when createdAt timestamps match
- Add same tiebreaker to InlineCreateCard and TaskDetailModal dependency dropdown sorts
- Add store-sort integration test verifying ascending ID order with identical timestamps
- Add InlineCreateCard tests for identical-timestamp dropdown ordering and search filtering
- Add TaskDetailModal test for identical-timestamp dependency dropdown ordering
2026-03-28 19:40:17 -04:00
Dustin Byrne
1a4c343621 feat(KB-185): sort dependency dropdown newest-first in InlineCreateCard
- Sort dep dropdown items by createdAt descending (newest first)
- Clone tasks array before sorting to avoid mutating props
- Add tests verifying newest-first order for both unfiltered and filtered lists
2026-03-28 19:19:33 -04:00
Dustin Byrne
beab7bd0b5 fix(KB-183): prevent dep-dropdown clicks from dismissing InlineCreateCard
- Add onMouseDown preventDefault on dep-dropdown and items to retain focus
- Extend focusout guard to check dependencies and showDeps state before cancelling
- Add useEffect dependency array entries for dependencies and showDeps
- Add tests for mouseDown preventDefault and blur-with-deps retention
2026-03-28 18:15:48 -04:00
Dustin Byrne
b0d361cc3c feat(KB-156): add search input to dependency dropdowns
- Add searchable text input to TaskDetailModal dependency dropdown with filtering by id, title, and description
- Add matching search input to InlineCreateCard dependency dropdown
- Add sticky .dep-dropdown-search CSS with focus styling
- Reset search term when dropdown closes and reopens
- Add tests for search filtering, case-insensitive matching, empty state, and reset behavior
2026-03-28 16:30:23 -04:00
Dustin Byrne
c802108a02 refactor(HAI-116): rename kb to hai across all packages, CLI, and docs
- Rename npm packages from @kb/* to @hai/* and update all workspace references
- Rename CLI binary from kb to hai and config directory from .kb to .hai
- Update dashboard UI branding, titles, and references from kb to hai
- Update all test files, CI workflows, and documentation to reflect new naming
- Run comprehensive grep verification to ensure no stale kb references remain
2026-03-26 22:44:11 -04:00
Dustin Byrne
c2166723ee feat(HAI-064): add blur-to-cancel behavior for empty InlineCreateCard
- Add focusout listener that cancels InlineCreateCard when focus leaves with empty input
- Preserve card when focus moves between elements inside the card
- Treat whitespace-only input as empty for cancel purposes
- Add comprehensive tests for blur-to-cancel behavior
2026-03-26 00:01:29 -04:00
Dustin Byrne
5ccbefaa1d feat(HAI-032): add image paste support to inline create card
- Add paste handler to extract and preview images from clipboard
- Track pending images with object URL previews and cleanup on unmount
- Upload pasted images as attachments on task creation
- Add styled image preview strip with remove button
- Add CSS for preview thumbnails with hover-to-delete overlay
2026-03-25 22:43:24 -04:00
Dustin Byrne
224cbe1c0c fix(HAI-008): wrap text in inline create card textarea 2026-03-25 20:52:52 -04:00
Dustin Byrne
d8ac565f85 feat(HAI-001): complete Step 2 — replace emojis with Lucide icons 2026-03-25 20:31:58 -04:00
Dustin Byrne
7066770c0f fix(HAI-002): handle undefined title and dependencies to prevent crashes
- Guard against undefined dependencies with fallback to empty array in worktreeGrouping
- Handle missing task title in InlineCreateCard by falling back to description or id
- Update package-lock.json
2026-03-25 19:59:05 -04:00