Commit Graph

5 Commits

Author SHA1 Message Date
gsxdsm
73b2a32e2b test: backfill dashboard test mocks for new api and viewport exports
Concurrent dashboard work added runtime exports that hardcoded module
mocks did not expose, so any suite rendering the affected component threw
"No <export> is defined on the mock". Adds the missing `../api` exports
(system-info probe, update install/restart, cloudflared, provider key and
login helpers, git remotes/branches) and the `isTabletTouchViewport`
viewport helper across the 26 suites that mock those modules.

Verified: all 26 files pass (1012 tests).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 18:00:07 -07:00
gsxdsm
38c6fdc60d fix: green full-suite after mock and stacking drift (#2287)
## Summary
Restacks onto latest main after #2285 and clears the remaining Full
Suite red classes from run
[29633869887](https://github.com/Runfusion/Fusion/actions/runs/29633869887)
(post-#2285):

- **Shard 1:** `agent-skills-flow` vitest TDZ — hoist `mockFiles` via
`vi.hoisted` (same class as skill-resolver in #2285)
- **Shard 2/3:** incomplete mocks after product drift
- `isFullScreenSheetViewport` / `isShortViewport` on viewport mocks
(without overriding dynamic mobile helpers)
  - `fetchCodebaseMetrics` on Command Center `api/legacy` mocks
  - `fetchSettings` on `agent-modals-mobile` api mock
- **Shard 3:** PlanningMode `ui-interactions` race — sync-settle
`fetchGlobalSettings` (FN-8245 pattern from planning-flow)
- **Shard 3:** settings search drift guard — inventory
`SettingsFieldRow` `htmlFor` keys (`mobileNavPrimaryItems`)
- **Shard 2:** FloatingWindow shared-stack product bug — only reclaim
z-index on hidden→visible (not every mount effect), so last-mounted
utility stays on top
- **Shard 4:** grok process-lifecycle timeout under shard load — prove
bound with 5 reimports instead of 15

## Test plan
- [x] `agent-skills-flow.test.ts` green
- [x] `process-lifecycle.test.ts` green
- [x] FileBrowserModal, FloatingWindowStack.cross-type,
agent-modals-mobile, settings-search-index, SystemControlsArea,
PlanningModeModal.ui-interactions + planning-flow (210 tests) green
- [ ] PR merge gate (Lint/Typecheck/Build/Gate)
- [ ] Post-merge Full Suite on `main` green

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved floating-window stacking so reopened or interacted windows
appear in the correct order.
* Restored consistent layering between floating windows and expanded
dock modals.
* **Tests**
* Updated automated coverage for viewport behavior, codebase metrics,
settings search indexing, and process lifecycle scenarios.
* Improved test reliability and consistency across responsive layouts
and modal interactions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-17 23:53:50 -07:00
gsxdsm
338e7286c0 FN-6395: align viewport hook mocks in dashboard tests
Update dashboard test doubles so mobile viewport helpers match the hook module API.

- Add getViewportMode and isMobileViewport exports to affected useViewportMode mocks.
- Keep mocked mobile detection tied to each test's configurable viewport mode.
- Normalize inline viewport mocks across dashboard component test suites.

Files changed:
 .../components/__tests__/AgentsView.orgchart.test.tsx   |  6 +++++-
 .../app/components/__tests__/AgentsView.test.tsx        |  2 ++
 .../app/components/__tests__/ChatView.rooms.test.tsx    |  1 +
 .../app/components/__tests__/GitManagerModal.test.tsx   |  2 ++
 .../app/components/__tests__/MailboxView.test.tsx       | 13 +++++++++----
 .../__tests__/MilestoneSliceInterviewModal.test.tsx     |  2 ++
 .../__tests__/MissionManager.swipe-back.test.tsx        |  2 ++
 .../__tests__/NewTaskModal.shared-cache.test.tsx        | 17 ++++++++++++++---
 .../app/components/__tests__/NewTaskModal.test.tsx      |  2 ++
 .../__tests__/PlanningModeModal.favorites.test.tsx      |  2 ++
 .../__tests__/PlanningModeModal.questions.test.tsx      |  2 ++
 .../__tests__/PlanningModeModal.swipe-back.test.tsx     |  2 ++
 .../PlanningModeModal.ui-interactions.test.tsx          |  4 ++++
 .../components/__tests__/QuickChatFAB.autosize.test.tsx | 13 +++++++++----
 .../__tests__/QuickChatFAB.shared-cache.test.tsx        | 11 +++++++++--
 .../app/components/__tests__/QuickChatFAB.test.tsx      | 11 +++++++++--
 .../__tests__/SettingsModal.testMode.test.tsx           |  6 +++++-
 .../components/__tests__/SubtaskBreakdownModal.test.tsx |  2 ++
 .../app/components/__tests__/TodoModal.test.tsx         |  2 ++
 .../components/__tests__/navigation-history.test.tsx    |  3 ++-
 20 files changed, 87 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-6395
Fusion-Task-Lineage: d830938b-4d60-4e17-852d-a2d311b6d71c
2026-06-13 16:30:28 -07:00
gsxdsm
fa23782dbb FN-5972: fix mobile auto-merge blank dashboard
Restore mobile auto-merge dashboard stability and broaden regression coverage.

- share the mobile media query between viewport detection and board stabilization so landscape phones stay on the mobile path
- add an integration regression suite for toggling auto-merge across mobile, tablet, desktop, rollback, and task review surfaces
- expand dashboard and CLI tests, keep the new published changeset, and preserve related vitest coverage lists and safety comments

Files changed:
$(git diff --cached --stat)

Fusion-Task-Id: FN-5972

Fusion-Task-Lineage: f3a3bbae-21c2-451b-b24f-848cc12d0542
2026-06-07 18:51:46 -07:00
gsxdsm
5696823eaa feat(FN-5307): merge fusion/fn-5307 2026-05-20 09:42:40 -07:00