Commit Graph

32 Commits

Author SHA1 Message Date
gsxdsm
d83fd28065 fix(dashboard): reset scroll on ChatView refocus to undo iOS drift
After dismissing and re-bringing up the mobile keyboard, iOS could
leave window.scrollY > 0 and visualViewport.offsetTop > 0. With
useMobileScrollLock then pinning body{position:fixed} relative to that
drifted scroll, the message thread anchored above the visible viewport
and a large blank area appeared below it.

handleInputFocus now resets window scroll to (0,0) on mobile in a
zero-delay timeout — late enough that iOS finishes its own
scroll-into-view first, but before useMobileScrollLock observes the
drifted state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 20:42:14 -07:00
Fusion
0e2480980b feat(FN-2893): add merge-description disclosures in settings
- Render merge strategy descriptions behind expandable disclosure sections in Settings modal
- Add dedicated disclosure styling and update task form expectations for the new copy structure
- Extend Settings modal tests to cover disclosure toggling and merge-description visibility
- Improve model onboarding API key action layout on mobile by stretching form width and aligning button placement
2026-04-28 16:24:22 -07:00
Fusion
14d35b443d feat(FN-2888): unify task move button interactions
- Replace split move control with a single move button that supports primary action plus arrow-zone menu toggling
- Add keyboard support for move options via ArrowDown to open and Escape to close and refocus the trigger
- Update task detail styling for the unified move button and arrow affordance states
- Refresh TaskDetailModal and TaskForm tests to cover the new move control behavior and preset selection query
2026-04-28 14:25:56 -07:00
Fusion
ad0a1f489b fix(FN-2883): reset merge state when re-entering in-progress
- Reset merge metadata, verification counters, and workflow results when tasks move from in-review/done back to in-progress
- Reopen verification-related steps (or the last step fallback) so re-verification runs from a pending state
- Add execute-time guard to clear stale mergeDetails on in-progress tasks before continuing
- Prevent resumeOrphaned fast-path recovery when completed in-progress tasks still carry merge metadata
- Add targeted executor and TaskForm tests covering FN-2883 regression paths
2026-04-28 14:25:56 -07:00
gsxdsm
4b9fd3dd64 fix(dashboard): clear all 661 test-file type errors
Production typecheck (tsconfig.json + tsconfig.app.json) was already
clean, but a third config that includes test files surfaced 661 errors
across 60+ test files — accumulated drift between mock fixtures and
production types. Six parallel typescript-pro agents fixed every one
without touching production code.

Per-scope before/after (errors → 0):
  ChatView                                                     183
  Mailbox + Agent suite (5 files)                              156
  Task / Modal suite (6 files)                                 127
  App + small components (12 files)                             96
  Hooks + api/auth (8 files)                                    48
  Long tail (32 files)                                          51
  -----------------------------------------------------------------
  Total                                                        661

Major fix categories:
- Untyped state objects inferring `never[]` / `null` literals (root
  cause of ~120 errors in ChatView alone — added a single
  `UseChatReturn` annotation)
- Mock objects missing fields that became required: `WorkflowStep.mode`,
  `ChatMessage.thinkingOutput / metadata`, `ChatSession.projectId`,
  `Task.log`, `ProjectHealth` fields, `PtyTerminalSessionInfo.createdAt`,
  `Agent.metadata`, `InboxResponse.total`, etc.
- Mock objects with stale fields that no longer exist:
  `AgentBudgetStatus.budgetPeriod`, `truncated` on log responses,
  `OutboxResponse.unreadCount`, `MergeResult.source/target/details`
- Modal props that became required (e.g. `PlanningModeModal.onTasksCreated`)
- String literals not in narrowed unions (`Column`, `WorkflowStepPhase`,
  `InsightStatus`, `AgentLogType`, etc.)
- `querySelector` returning `Element` cast to `HTMLElement` for
  `@testing-library/react`'s `within()`
- Vitest mock typing: `.mock.calls` access needing `vi.mocked(...)`,
  zero-param tuple handling, generic `vi.fn(() => [])` inferring
  `never[]`

Helpers introduced in test files (no shared infra):
- `makeSettings(overrides)` in ModelSelectorTab.test.tsx
- `makePromptOverrides(overrides)` in AgentPromptsManager.test.tsx
- `FileBrowserTestOverrides` type alias in FileBrowser.test.tsx
- `makeInboxResponse / makeOutboxResponse` in MailboxView.test.tsx

Verification:
- tsc -p tsconfig.json:        exit 0
- tsc -p tsconfig.app.json:    exit 0
- tsc -p tsconfig.test-check.json (new — includes test files): exit 0
- vitest run:                  9639 / 9641 (2 pre-existing failures
                               in terminal-mobile-keyboard-layout.test.ts
                               unrelated to this work; verified via
                               `git stash` + run on clean HEAD)

Adds packages/dashboard/tsconfig.test-check.json to keep this regression
guard available locally — same as tsconfig.app.json minus the test
exclude.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 19:59:52 -07:00
gsxdsm
9c7c8ee586 fix(merger): bump verification timeout to 10m and reap process group
The 5-minute exec timeout only killed the immediate shell, leaving
vitest/pnpm worker trees alive. Across retries these accumulated and
thrashed the host, starving the engine and TUI. Switch verification to
spawn-based runner with detached process group so timeouts SIGTERM the
whole tree (SIGKILL after 5s grace), and bump the wallclock to 10m for
larger workspaces. Stream-truncate output instead of relying on ENOBUFS.

Also fix two flaky/race-prone dashboard tests that were red on main and
blocking every in-review task at merge verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 16:05:40 -07:00
Fusion
112813f122 feat(FN-2615): merge fusion/fn-2615 (auto-resolved)
- fix(FN-2615): restore workspace lint and test stability
2026-04-26 15:16:22 -07:00
Fusion
b6ac77ede7 feat(FN-2556): add TaskForm bottom slot for model configuration
- Add a new renderBelowModelConfiguration prop in TaskForm and render it beneath the Model Configuration section inside More options
- Update TaskDetailModal to use the new slot so the Source Issue edit block appears below model settings instead of near the primary section
- Adjust TaskDetailModal source-issue edit tests to expand More options before interacting with source fields
- Add ordering assertions in TaskForm and TaskDetailModal tests to verify the injected block sits between Model Configuration and Workflow Steps
2026-04-25 17:29:18 -07:00
Fusion
655169725e fix(FN-2555): restore execution mode updates from task edit flow
- Add explicit executionMode props to TaskForm edit controls and render a Standard/Fast selector in More Options
- Track editExecutionMode state in TaskDetailModal and reset it consistently when opening, canceling, or syncing task changes
- Include executionMode in update payload diffing so standard→fast sends "fast" and fast→standard clears to null
- Add regression tests for TaskForm selector behavior and TaskDetailModal update payload handling
2026-04-25 16:01:49 -07:00
Fusion
79b73c343c fix(FN-2498): keep New Task more options collapsed by default
- Add an autoExpandMoreOptionsOnSelection prop to TaskForm and gate advanced-section auto-expansion behind it
- Disable auto-expansion in NewTaskModal so default-on workflow step preselection does not open More options on first render
- Mark collapsed advanced content with the hidden attribute to prevent interaction until expanded
- Add dashboard tests for default collapsed state, opt-out auto-expand behavior, and default-on workflow-step regression coverage
- Replace hardcoded spacing/transition values in NewTaskModal.css with design tokens
2026-04-25 11:21:35 -07:00
Fusion
81193e734a feat(FN-2403): add project setup step to onboarding flow
- Introduce a new "project-setup" onboarding step between GitHub and first-task actions
- Gate first-task navigation on project selection and add contextual setup-wizard guidance
- Centralize ordered onboarding step definitions in shared state and reuse them for navigation/progress labels
- Extract ModelOnboardingModal styles into a dedicated component CSS file and update tests/mocks for the new step order
2026-04-25 07:04:50 -07:00
Fusion
50e25128f6 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
Fusion
e7a8a952b7 feat(FN-2456): persist task token usage on task records
- Add schema v44 migration to persist task-level token usage totals and first/last usage timestamps on tasks
- Extend core task types, store create/update flows, and exports to round-trip token usage data
- Add migration and TaskStore regression tests for token usage persistence, null clearing, and reinitialization behavior
- Update dashboard async handling and tests to prevent post-unmount state updates and reduce flaky assertion timing
2026-04-24 09:44:44 -07:00
Fusion
6453fc771e feat(FN-2315): add hidden markdown toggle for project documents
- Extend dashboard file service and routes to support includeHidden when scanning markdown files
- Update API client, markdown hook, and Documents view UI to expose a hidden files toggle
- Add coverage for hidden-file filtering in file-service, hook, and DocumentsView tests
- Stabilize related SettingsModal and TaskForm tests and document toggle behavior in the dashboard README
2026-04-24 08:55:02 -07:00
Fusion
435fb60c98 feat(FN-2241): add review level selection in task creation and editing
- Extend core task types/store and dashboard API route handling to persist task reviewLevel
- Add review level controls to TaskForm, NewTaskModal, and TaskDetailModal flows
- Improve workflow step selector presentation in WorkflowResultsTab and styles for clearer review settings UX
- Document the new review level behavior and add route/form/modal tests to cover create and edit scenarios
2026-04-22 09:23:57 -07:00
Fusion
cfb5228855 feat(FN-1990): promote quick fields in new task modal
- Add TaskForm renderBelowPrimary and hideDependencies props to support injected primary-section content
- Build NewTaskModal quick-fields for dependency selection and agent assignment above the More options panel
- Style quick-fields and mobile modal spacing with design tokens, including full-width triggers and 36px touch targets
- Expand modal and form tests to cover slot rendering, dependency hiding behavior, quick-fields visibility, and mobile CSS rules
2026-04-17 17:44:53 -07:00
gsxdsm
827c0370c3 feat(FN-1665): merge fusion/fn-1665 2026-04-13 20:22:10 -07:00
gsxdsm
b76a1011b6 feat(FN-1445): add project-scoping and fallback handling for AI routes and missions
- Add projectId parameter to refineText API and TaskForm for proper scoping
- Update mission routes to require projectId and add regression tests
- Add mission interview fallback to mission-level context when target not found
- Add AI refine route scoping tests for project isolation
- Update component tests to expect projectId argument
- Update prompt-keys test counts for new system prompts
2026-04-11 15:23:03 -07:00
gsxdsm
24ec16f6d3 feat(FN-1438): enable description expansion in task creation forms
- Fix textbox role selector to avoid matching the expand button in TaskForm
- Enable description expansion in create mode for better task input experience
- Update tests in NewTaskModal and TaskForm to cover the new behavior
2026-04-10 07:08:13 -07:00
gsxdsm
700ae8c480 feat(FN-1459): add focus regression tests for TaskForm
- Add regression tests for TaskForm focus management
- Test that description textarea receives focus on mount when empty
- Test that focus stays in place when toggling controls panel
- Test that Escape key collapses expanded panel without losing focus
- Test focus behavior with pre-filled description
2026-04-09 15:28:34 -07:00
gsxdsm
749b0da81b test(FN-1309): add missing tests for create mode rows and expand button
- Add tests verifying create mode renders action rows correctly
- Add test for expand button toggle behavior in TaskForm
- Cover agent picker, dependencies, and model selection rows in create mode
2026-04-09 06:31:56 -07:00
gsxdsm
e044cfbed7 feat(FN-1211): add collapsible advanced options to task form
- Split TaskForm into a primary section and a collapsible "More options" block for dependencies, models, workflow steps, and attachments
- Auto-expand advanced options when non-default values exist and reset dependency dropdown state when the section is collapsed
- Restyle modal form hierarchy, description actions, and advanced option container for clearer visual grouping across desktop and responsive layouts
- Update NewTaskModal and TaskForm tests to open and assert advanced fields through the new More options toggle
2026-04-08 16:23:08 -07:00
gsxdsm
91211cb81c feat(FN-1166): improve task description editing in TaskForm
- Increase edit-mode description textarea height and add fullscreen expand/collapse controls with Escape support
- Add debounced 1.5s description auto-save in edit mode with Saving/Saved status feedback
- Wire TaskDetailModal to persist auto-saved descriptions via updateTask and show success/error toasts
- Add TaskForm coverage for expand mode and auto-save debounce behavior, and update related icon/test/style support
2026-04-08 09:46:28 -07:00
gsxdsm
a0cf687a81 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
5b441ca86c fix(FN-1101): normalize browser verification checkbox state
- Detect browser verification selection from both template token and resolved workflow step IDs
- Normalize checkbox toggles by replacing resolved browser-verification step IDs with a single canonical token
- Preserve non-browser workflow step selections when checking or unchecking browser verification
- Add TaskForm tests for resolved-ID checked state, unchecked cleanup, and re-check normalization
- Add a patch changeset for @gsxdsm/fusion documenting the browser verification state fix
2026-04-07 22:13:37 -07:00
gsxdsm
50cd55e9f9 feat(FN-883): add workflow step default-on support with task creation opt-out
- Add defaultOn field to WorkflowStep model, API endpoints (GET/POST/PATCH), and WorkflowStepManager UI
- Add skip-default-steps checkbox to TaskForm and NewTaskModal for explicit opt-out of default workflow steps
- Pre-select default workflow steps on new task creation forms automatically
- Add CSS styling for skip-default-steps toggle row
- Add comprehensive tests for WorkflowStepManager, TaskForm, and NewTaskModal components
- Add route tests for PATCH workflow-step endpoint and default selection logic
- Update README and task-structure reference docs
2026-04-05 10:20:42 -07:00
gsxdsm
9a8d68fce8 feat(FN-837): add workflow step phase support with pre-merge and post-merge execution
- Add phase field to workflow step definitions (pre-merge vs post-merge) with persistence and API
- Execute pre-merge steps in executor before merge; post-merge steps in merger after successful merge
- Pre-merge failures block merge and keep task in in-review; post-merge failures are logged only
- Expose phase controls and phase-aware results in the dashboard UI
- Add changeset for the published @gsxdsm/fusion package
2026-04-04 17:36:18 -07:00
gsxdsm
7d2ec639e1 feat(FN-836): add workflow step reorder UX in TaskForm
- Add drag-and-drop and arrow-button reordering for workflow steps in TaskForm
- Add CSS styles for reorder controls and drag states
- Add comprehensive tests for reorder behavior in TaskForm, NewTaskModal, and TaskDetailModal
- Simplify planning.ts by removing redundant JSON parse/stringify logic
- Update AGENTS.md and README with workflow step ordering documentation
- Remove unused changeset and dashboard README section
2026-04-04 02:21:56 -07:00
gsxdsm
9d2c055f32 fix(FN-819): remove stale tests and add regression coverage for new-task surfaces
- Replace obsolete test files (SettingsModal, TaskCard, App, dashboard-footer-mobile-layout) with targeted tests for NewTaskModal and TaskForm
- Fix SettingsModal component reference and update TaskCard preset badge logic
- Clean up dead code in engine pi.ts and its test
- Add preset indicator styles in dashboard CSS
- Update dashboard README to clarify preset availability across all new-task surfaces
2026-04-04 00:04:16 -07:00
gsxdsm
d4feee0999 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
160a370117 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
da4ce003cd feat(FN-734): extract reusable TaskForm component and integrate into modals
- Extract shared TaskForm component from NewTaskModal with all form fields and validation logic
- Integrate TaskForm into NewTaskModal, replacing duplicated form code
- Integrate TaskForm into TaskDetailModal edit mode for consistent editing experience
- Add comprehensive tests for TaskForm, Header, and updated modal components
- Clean up removed/obsolete tests and fix SSE, settings, and comment components
2026-04-02 19:40:21 -07:00