Commit Graph

26 Commits

Author SHA1 Message Date
Fusion
c6d12ba5af feat(FN-3716): add planning mode priority controls for task routes and subt
Adds per-subtask priority controls to planning mode with three implementation steps (route priority support, UI controls, and design-token polish), gates research tools behind an experimental feature flag with a new core infrastructure module, and introduces a WhatsApp chat plugin with discovery and

Fusion-Task-Id: FN-3716
2026-05-07 16:03:25 -07:00
Timothy Laurent
7071973023 fix(FN-001): remove eslint-disable for non-existent react-hooks/exhaustive-deps rule
Co-authored-by: Orca <help@stably.ai>
2026-05-04 21:46:06 -07:00
Timothy Laurent
ab7d9fc5d0 fix: remove eslint-disable-line for unregistered react-hooks/exhaustive-deps rule
The project's ESLint flat config does not include the react-hooks plugin,
so referencing its rules in eslint-disable comments causes a "rule not found"
error. Replace with a plain comment preserving the intent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 21:38:27 -07:00
Timothy Laurent
bfbdc4b5d9 fix(FN-001): fix stale goal and unable to type in Plan Mission With AI modal (#36)
Split the combined useEffect that handled both auto-start and
persisted-goal restoration into two separate effects:

- Goal restoration: depends only on [isOpen], runs once on modal open
- Auto-start: keeps handleStartInterview dep for initialGoalProp flow

Previously the single effect depended on handleStartInterview, which
recreates on every missionGoal change. Every keystroke re-triggered
the effect, which read the stale persisted value from localStorage
and overwrote user input — making the textarea uneditable and showing
stale data from the last planned mission.

Co-authored-by: AI <ai@runfusion.ai>

Co-authored-by: Orca <help@stably.ai>
2026-05-04 21:32:41 -07:00
gsxdsm
4bb3af220e fix(dashboard): mobile keyboard scroll lock, auto-reload hash, ChatView snap
- Add useMobileScrollLock hook using position:fixed body lock (Bootstrap/
  Headless UI/Stripe pattern) to prevent iOS Safari from shifting the
  document and visualViewport when an input inside a fixed-position modal
  is focused. Wire into 15 input-bearing modals plus ChatView, replacing
  ChatView's inline body-overflow effect.
- Widen computeBuildVersion in vite.config.ts to hash the entire app/ tree
  so the version-check poll actually notices rebuilds (FN-3333 follow-up;
  previously only main.tsx and package.json were hashed).
- ChatView: on input blur, suppress keyboard-aware sizing for 450ms while
  reserving mobile-nav-bar space, so the composer snaps to its final
  height in one move instead of crawling down with iOS's keyboard slide
  and then jumping again when the nav bar reappears.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 19:01:10 -07:00
Fusion
d227c6416b feat(FN-3139): add planning comment input to interview modals and show in c
Merges FN-3139 planning comment infrastructure (comment inputs in mission/milestone-slice/planning modals, comment display in conversation history), FN-3119 Quick Chat FAB with slash-triggered skill menu and plugin integration, FN-3117 plugin dashboard views and chat session icons, and FN-3066 plugi

Fusion-Task-Id: FN-3139
2026-05-02 00:37:57 -07:00
Fusion
0e0754f790 feat(FN-2986): merge fusion/fn-2986
The merge adds agent task auto-summarization with droid CLI path reconciliation, aligns agent asset directory naming with heartbeat path compatibility, and updates icon sizing across dashboard components. Session banner dismissals are now persisted with a new hide-banner setting in the preferences.

Fusion-Task-Id: FN-2986
2026-05-01 13:14:50 -07:00
Fusion
410a438a7f feat(FN-2639): replace native confirms with dashboard confirm dialog
- Add reusable ConfirmDialog component, styles, and useConfirm hook to provide async confirmation flows
- Wire ConfirmProvider at app level and migrate confirm call sites across task, agent, roadmap, plugin, and settings UI actions
- Update modal interaction patterns to support dialog reentry and consistent destructive-action confirmations
- Expand dashboard tests with confirm dialog and hook coverage plus migrated component test assertions
2026-04-27 04:05:25 -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
Fusion
8cfd6abbb9 fix(FN-2151): recover modal retries after stream disconnects
- Handle retry API "not in an error state" responses by refreshing the server session instead of failing immediately
- Restore the correct view state for generating, awaiting_input, complete, and error sessions during retry recovery
- Reconnect planning/interview/subtask streams only when needed while preserving in-flight output and history
- Add regression tests for connection-loss retry recovery across PlanningModeModal, MissionInterviewModal, and SubtaskBreakdownModal
2026-04-19 20:48:13 -07:00
Fusion
f33f15a98f style(FN-1847): unify dialog overlay styling and add accessibility attributes
- Add role=dialog and aria-modal attributes to all modal dialogs for accessibility
- Standardize close button aria-labels across all modals
- Unify overlay backdrop-filter, z-index, and background styles in styles.css
- Add light theme overrides for non-standard overlay backgrounds
- Update AgentListModal tests to reflect new aria attributes
- Add changeset for @gsxdsm/fusion package
2026-04-15 20:44:40 -07:00
gsxdsm
9a0673c5fd feat(FN-1809): merge fusion/fn-1809 2026-04-14 13:00:02 -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
c9c5bbf788 feat(FN-1621): merge fusion/fn-1621 2026-04-12 19:16:21 -07:00
gsxdsm
e2367225a7 refactor(FN-1364): extract modal inline styles to CSS classes
- Add CSS classes in styles.css for planning and breakdown modal styling
- Refactor MissionInterviewModal to use CSS classes instead of inline styles (164 lines reduced)
- Refactor PlanningModeModal to use CSS classes (67 lines reduced)
- Refactor SubtaskBreakdownModal to use CSS classes (26 lines reduced)
- Improve maintainability and consistency of modal styling
2026-04-09 17:57:06 -07:00
gsxdsm
2a34ebe6cc feat(FN-1154): sync AI session state across browser tabs
- Add a shared AiSessionSync store with BroadcastChannel + storage fallback, ownership locks, heartbeats, and stale-tab detection
- Merge cross-tab session snapshots into useBackgroundSessions with timestamp guards and rebroadcast SSE updates to peers
- Update background session UI and planning/mission/subtask modals to show active-tab lock status and only allow takeover when ownership is stale
- Add hook tests covering sync store messaging/fallback behavior and background session cross-tab merge flows
2026-04-08 16:48:35 -07:00
gsxdsm
4aa1cbdba8 feat(FN-1153): add cross-tab locks for AI planning sessions
- Bump SQLite schema to v19 with ai_sessions lock columns and lock index, and align migration coverage in core DB tests
- Extend AiSessionStore with acquire/release/force lock APIs, stale lock cleanup, and lock metadata in ai_session update summaries
- Enforce lock checks on planning, subtask, and mission interview mutation routes with 409 conflict responses while keeping stream reads unaffected
- Add frontend tab identity + useSessionLock hook and wire Planning, Subtask, and Mission modals to pass tabId, show lock overlay, and support Take Control
- Expand dashboard route/e2e and modal tests to validate lock enforcement, lock handoff, and lock-aware session reentry behavior
2026-04-08 16:14:32 -07:00
gsxdsm
0ff6d42c0f feat(FN-1152): add retry flows for failed AI planning sessions
- Keep errored AI sessions retryable in the session store and add backend retry handlers for planning, subtask breakdown, and mission interview flows
- Add retry API routes and dashboard API client helpers for planning, subtask, and mission interview session retries
- Update PlanningModeModal, SubtaskBreakdownModal, MissionInterviewModal, and background session handling to show error states with retry/cancel UX
- Expand unit and integration tests across store, services, routes, and modal components to cover retry success and failure paths
2026-04-08 15:10:46 -07:00
gsxdsm
375d46d31b feat(FN-1151): preserve and display planning conversation history
- Persist per-turn thinking output for planning and mission interview sessions, including history serialization and recovery-safe state fields
- Add shared conversation history parsing/API types and a reusable timeline component with formatted answers and expandable AI reasoning
- Restore and render conversation history across Planning Mode, Mission Interview, and Subtask Breakdown modals during resume and live question flow
- Harden response submission with nullable-question guards and expand unit/e2e coverage for history rendering and persistence behavior
2026-04-08 14:17:20 -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
6d2377fca0 feat(FN-1149): add send-to-background actions for AI planning modals
- Add Send to background header action to Planning Mode, Subtask Breakdown, and Mission Interview modals using a shared minimize icon pattern
- Show the action only during active AI session states and keep it hidden in initial states
- Implement background behavior to close the live stream connection and modal without canceling the underlying AI session
- Add modal tests that verify button visibility rules and confirm send-to-background does not trigger cancel APIs
- Add shared CSS styling for modal send-to-background controls, including hover and focus-visible states
2026-04-08 10:15:14 -07:00
gsxdsm
90fbf3e398 feat(FN-1145): harden dashboard SSE streams with replay and reconnect
- Add a shared SSE event buffer utility and wire it into planning, subtask, mission interview, and task stream routes
- Support Last-Event-ID replay semantics and robust event serialization so clients can recover missed stream events
- Add a resilient client-side reconnect wrapper and surface reconnecting state in planning, subtask breakdown, and mission interview modals
- Expand test coverage across API routes, SSE buffering behavior, reconnect handling, and mission/planning stream flows
2026-04-08 06:02:28 -07:00
gsxdsm
2ec2cf1d89 feat(FN-1033): replace hardcoded colors with CSS custom properties in mission UI
- Add CSS custom properties for mission, slice, feature, and autopilot color tokens in styles.css
- Replace inline icon colors with CSS variables in MissionInterviewModal
- Replace hardcoded colors with CSS variables in MissionManager
- Add changeset for theme color tokens patch
2026-04-06 15:50:44 -07:00
gsxdsm
47ccd20669 feat(FN-936): add modal description persistence for re-entry
- Add modalPersistence hook for saving/restoring modal state (description, goal) via localStorage
- Update PlanningModeModal to persist and restore description across re-opens
- Update SubtaskBreakdownModal to persist and clear description on resume flow
- Update MissionInterviewModal to clear goal after starting interview
- Add unit tests for modalPersistence hook
- Add integration tests for modal re-entry behavior across all three modals
- Add changeset for published package patch bump
2026-04-04 15:56:46 -07:00
gsxdsm
eef87a2aea feat: add background AI sessions with persistent storage and SSE streaming
Introduces ai_sessions table (schema v9), AiSessionStore, and background
session support for mission interviews, planning, and subtask breakdown.
Adds BackgroundTasksIndicator component, SSE-based progress streaming,
and dashboard API routes for session management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 13:42:02 -07:00
gsxdsm
cf4fe0277d feat: add AI-driven mission interview system (Factory.ai-style planning)
Add a conversational AI interview flow to the missions screen that
interviews users to break down missions into milestones, slices, and
features with verification criteria at every level.

Backend: Replace stubbed interview logic with real AI agent integration
using createKbAgent, SSE streaming, and robust JSON parsing. Wire up
all 5 placeholder mission interview route endpoints (start, respond,
cancel, stream, create-mission).

Frontend: New MissionInterviewModal component with conversational UI,
thinking output display, question renderers, and hierarchical plan
review/edit. Integrated into MissionManager with "Plan with AI" button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 12:50:12 -07:00