Commit Graph

20 Commits

Author SHA1 Message Date
gsxdsm
3f061460b9 fix(FN-2662): honor project model overrides and stabilize tests 2026-04-28 18:21:17 -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
Fusion
52fe1289c1 feat(FN-2597): merge fusion/fn-2597 (auto-resolved)
- feat(FN-2597): complete Step 4 — add docs update and changeset
- test(FN-2597): complete Step 2 — align dashboard tests with reviewer labels
- feat(FN-2597): complete Step 1 — rename validator UI labels to reviewer
2026-04-26 12:25:10 -07:00
Fusion
b765eec11c feat(FN-2601): merge fusion/fn-2601 (auto-resolved)
- test(FN-2601): complete Step 3 — cover updated default copy
- feat(FN-2601): complete Step 2 — polish intro styling
- feat(FN-2601): complete Step 1 — update models tab copy
2026-04-26 11:39:08 -07:00
gsxdsm
5ec4beda73 feat(FN-1740): merge fusion/fn-1740 2026-04-14 10:43:59 -07:00
gsxdsm
476ef812dc feat(FN-1636): fix thinking level default to respect global setting
- Fix thinking level selector to default to 'off' when no global default is configured
- Add 'Using default' badge when thinking level falls back to global setting
- Show explicit thinking level badge only when a non-default value is selected
- Add comprehensive tests for thinking level selector behavior
- Add tests for resolved model display with global settings fallback
2026-04-12 14:05:56 -07:00
gsxdsm
132b2005c7 feat(FN-1191): hot-swap active executor sessions on model changes
- Show resolved default executor, validator, and planning models in the task Model tab
- Pass merged settings into the Model tab from TaskDetailModal so default badges reflect effective runtime resolution
- Hot-swap active single-session executor models when task overrides change, including fallback to project defaults when overrides are cleared
- Add dashboard and executor tests for default model display, hot-swap behavior, fallback logic, and failure logging
- Document hot-swap behavior and limitations in AGENTS.md and add a patch changeset for @gsxdsm/fusion
2026-04-08 01:18:01 -07:00
gsxdsm
2e5511d959 fix(FN-1097): sync model tab saves with modal task state
- Pass TaskDetailModal's onTaskUpdated callback into ModelSelectorTab
- Propagate server-returned task updates after model and thinking-level saves so edit mode uses fresh values
- Add regression tests for ModelSelectorTab update callbacks and TaskDetailModal model-sync flow
- Add a patch changeset for @gsxdsm/fusion covering the model edit sync fix
2026-04-07 19:13:51 -07:00
gsxdsm
8d6a44d1b6 feat(FN-1044): add thinkingLevel and planning model support to task creation
- Add thinkingLevel field to createTask and updateTask in core store
- Accept thinkingLevel and planningModel fields in dashboard task routes
- Send thinkingLevel and planningModel in frontend API calls from task forms
- Add ThinkingLevel selector to ModelSelectorTab component with tests
- Wire up planning model and thinking level in QuickEntryBox, TaskForm, and NewTaskModal
- Add unit tests for store, routes, and ModelSelectorTab coverage
- Add changeset and update AGENTS.md documentation
2026-04-07 12:18:49 -07:00
gsxdsm
ffbe8cf59b feat(FN-965): add per-task planning model override
- Add planningModelProvider and planningModelId fields to core Task type
- Update backend API validation to accept planning model fields on create/update
- Update frontend API client and TaskForm to handle planning model
- Add planning model selector row to ModelSelectorTab component
- Wire up planning model in TaskDetailModal edit mode with save support
- Update AGENTS.md with planning model override documentation
- Add comprehensive tests for ModelSelectorTab and API routes
- Bump schema version from 10 to 11
2026-04-06 22:55:25 -07:00
gsxdsm
a44519b874 feat(FN-669): complete Step 8 — add and update tests for model favorites 2026-04-01 22:30:51 -07:00
gsxdsm
7fd5704a80 Removed unwanted files marked in .gitignore 2026-04-01 21:25:08 -07:00
gsxdsm
da24b81523 fix(FN-667): fix model dropdown layering in quick entry
- Render the custom model dropdown menu in a portal so it escapes clipped stacking contexts
- Update dashboard styles to give the floating model menu reliable overlay positioning above quick entry surfaces
- Refresh dropdown-focused tests to cover portal layering behavior in quick entry and model selector flows
- Document the layering behavior in the dashboard README for future UI maintenance
2026-04-01 13:32:29 -07:00
gsxdsm
5647e500cf feat(KB-332): rename task prefix from KB to FN and branches from kb/ to fusion/
- Change default task prefix from KB to FN across all packages

- Rename branch naming pattern from kb/{id} to fusion/{id}

- Update all test assertions and fixtures to use new prefixes

- Add changeset for the breaking change

- Resolve merge conflicts in TaskCard.test.tsx touch gesture tests
2026-03-31 19:29:47 -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
f24d28207a fix(KB-098): auto-save task model overrides
- Auto-save executor and validator model selections immediately from the model selector tab
- Send explicit null override fields when users switch a task back to default models
- Keep saved badges stable while requests are pending and restore the previous selection on save failures
- Expand ModelSelectorTab tests to cover auto-save requests, status feedback, success toasts, and clear-to-default flows
2026-03-30 06:00:58 -07:00
gsxdsm
44ac59c6a7 feat(KB-081): add provider icons to model selector with custom dropdown
- Create ProviderIcon component with provider-to-icon mappings (OpenAI, Anthropic, Google, etc.)

- Build CustomModelDropdown with icon display, filtering, and keyboard navigation

- Integrate custom dropdown into ModelSelectorTab replacing native select element

- Add CSS styles for provider icons in dropdown items and model badges

- Add comprehensive tests for ProviderIcon, CustomModelDropdown, and ModelSelectorTab
2026-03-29 22:51:23 -07:00
gsxdsm
ebdfe703d8 feat(KB-080): add combined model dropdown with combobox component
- Create new combobox component for model/provider selection
- Refactor ModelSelectorTab to use combined dropdown UI
- Add scrollIntoView null check for test environment compatibility
- Add changeset for combined model dropdown feature
- Clean up obsolete changeset and subtask-related code
2026-03-29 22:26:10 -07:00
gsxdsm
fd4a80b43c feat(KB-061): add model filter search to model selectors
- Add search input with clear button and results count to ModelSelectorTab
- Extract filterModels utility for shared filtering logic across components
- Apply filtering to SettingsModal model section
- Add CSS styles for filter UI components
- Add comprehensive tests for ModelSelectorTab and SettingsModal filtering
2026-03-29 20:55:01 -07:00
gsxdsm
a53e4c1420 feat(KB-048): add collapsible list sections to dashboard
- Add section expansion state management with localStorage persistence
- Update section headers with chevron toggle controls
- Implement conditional task row rendering based on section state
- Add Expand All / Collapse All toolbar controls
- Add CSS styles for chevron rotation animation and section headers
- Add comprehensive tests for collapsible section behavior
2026-03-29 19:51:41 -07:00