Commit Graph

10 Commits

Author SHA1 Message Date
Fusion
207d9d2524 feat(FN-3104): switch todos to modal-only navigation
- Add TodoModal component and styling, and mount it through AppModals
- Remove dedicated Todos view routing and drive todos access through modal state/actions
- Update Header and MobileNavBar interactions plus modal manager/view-state hooks for modal flow
- Expand dashboard tests to cover modal rendering, open/close behavior, and updated app/header expectations

Fusion-Task-Id: FN-3104
2026-05-02 07:59:06 -07:00
Fusion
4a819cf961 fix(FN-2711): keep dashboard timing stats live 2026-04-28 19:20:10 -07:00
gsxdsm
3031d05a68 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
cf12664e5a feat(FN-2644): merge fusion/fn-2644 2026-04-27 00:14:18 -07:00
Fusion
8e18fad156 feat(FN-2559): merge fusion/fn-2559 2026-04-25 18:22:37 -07:00
gsxdsm
33853f9f2b test(dashboard): consolidate AppModals ScheduledTasksModal forwarding
The 4 ScheduledTasksModal projectId tests differed only by the
projectId input value. Collapse the three "schedulesOpen=true" cases
into an it.each; keep the "schedulesOpen=false" test as a discrete
guard since it asserts the opposite (modal not invoked).

Also hoist the huge per-call prop fixture to a shared commonProps
object so the test body is readable.

367 → 314 LOC (-53). 7 tests still passing.

Phase 3 note: this file's 22 vi.mock() count looked alarming but 17
are just `() => null` shims to stop child-modal dep trees from
mounting — legitimate infrastructure for a glue-component test, not
tautological mocking. No further trim warranted here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:18:10 -07:00
Fusion
7529d7a7ed fix(FN-2404): scope onboarding first-task creation to active project
- Guard onboarding first-task creation when no project is selected
- Pass projectId to createTask so onboarding tasks are created in the active project
- Update AppModals wiring tests to verify projectId forwarding for selected and unselected states
- Expand onboarding modal and flow regression tests to assert project-scoped task creation calls
2026-04-24 08:54:25 -07:00
gsxdsm
d3c9476ce7 feat(FN-2318): merge fusion/fn-2318 2026-04-23 12:55:50 -07:00
Fusion
fc43d2652c fix(FN-2313): make PR auth checks gh-first across settings UI
- Replace the server-computed settings flag with prAuthAvailable and document it in shared Settings types
- Compute PR auth availability from gh CLI auth first, with GITHUB_TOKEN as fallback in GET /api/settings
- Rename dashboard settings state/props/hooks from githubTokenConfigured to prAuthAvailable and strip server-owned auth fields on save
- Update PR section messaging to guide users to run 'gh auth login' and refresh related route/component tests
2026-04-23 10:58:36 -07:00
Fusion
653a25ecd0 feat(FN-1717): add scope selection controls to dashboard UI
- Add scope selector controls to ScheduleForm and RoutineEditor components
- Add scope badges to RoutineCard and ScheduleCard for visual scope indication
- Add scope controls to ScheduledTasksModal with projectId propagation
- Add scheduling scope options to automation/routine API wrappers
- Add comprehensive regression tests for scope propagation and modal wiring
- Update README with dashboard UI scope selection documentation
2026-04-15 17:36:18 -07:00