gsxdsm
aca25494a5
test(dashboard): App.test.tsx is fully green — an incomplete mock was crashing NewTaskModal ( #2846 )
...
Closes #2829 . `App.test.tsx` has been red since **2026-07-25**; #2833
took it 10 failures → 2, and this takes it to **0**.
## The cause, and it was not what I guessed
`vi.mock("../../hooks/useViewportMode")` did not export
`isShortViewport`, which `NewTaskModal` imports.
An incomplete module mock **does not fail at the mock**. It throws
inside whichever component imports the missing export, and the nearest
`ErrorBoundary` swallows that into *"This section encountered an error"*
— so the test failed on a **missing heading** with a DOM that looks
perfectly healthy. Structurally the same presentation as the
workflow-skeleton bug in #2833 : the real failure sits two layers below
what the assertion reports.
Both remaining tests had this one cause.
## Found by probing, not theorising
I had already been wrong twice on this file (`renders nothing`, then
i18n), and my standing note said the modal was "plausibly FN-8620's
FloatingWindow rework, **unverified**". That would have been a third
wrong guess. Instead I dumped what was actually in the DOM at the
assertion point:
```
headings: ["Fusion"] | dialogs: 0
newtask-ish: [..., "error-boundary error-boundary--modal"]
```
The `error-boundary--modal` class was the entire answer; reading its
text gave the exact missing export. Same technique that cracked #2833 in
one shot — the difference between the two halves of this investigation
is that I stopped guessing.
**App.test.tsx: 141 passed (141).**
## Also patched, and one deliberately not
- **`Header.mobile-project-favorites.test.tsx`** mocks the same module
with an inline factory and lacks the export. It is **latent, not
broken** — its component does not import `isShortViewport` yet, and the
day it does, the failure would be this same swallowed crash. One line.
- **`FloatingWindow.touch-geometry.test.tsx`** greps as missing but is
**not** — it uses `{ ...(await vi.importActual(...)) }`, so its surface
is complete by construction. My grep-based classification was a false
positive.
That spread is the pattern that prevents this class outright, and it is
the better fix **where it is available**. It is not available here:
App.test.tsx's mock exists precisely so tests need no
`window.matchMedia` in jsdom, and spreading the real module would
reintroduce that dependency for every unstubbed export. So the scoped
one-line stub is the right fix for this file, and the spread is the
recommendation for new mocks.
A guard asserting "a module mock exports everything the real module
does" would close this class repo-wide. I did not build it — 34 files
mock this module and only one was genuinely wrong, so the population
does not yet justify another instrument, by the same measure-first rule
that killed two other candidate gates this week.
## Verification
App.test.tsx 141/141 · the two touched siblings 9/9 · `tsc` 0 · lint 0.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com >
2026-07-30 15:07:45 -07:00
..
2026-07-30 15:07:45 -07:00
2026-07-14 08:23:11 -07:00
2026-07-30 12:46:12 -07:00
2026-07-30 12:46:12 -07:00
2026-07-05 11:31:48 -07:00
2026-07-30 02:38:58 -07:00
2026-06-19 04:27:01 -07:00
2026-07-08 15:24:01 -07:00
2026-07-16 12:36:03 -07:00
2026-07-09 19:58:07 -07:00
2026-07-16 12:36:03 -07:00
2026-07-26 14:37:35 -07:00
2026-07-26 14:37:35 -07:00
2026-07-26 20:04:33 -07:00
2026-07-26 20:04:33 -07:00
2026-07-12 17:54:21 -07:00
2026-07-26 18:57:02 -07:00
2026-06-03 17:14:42 -07:00
2026-07-26 18:57:02 -07:00
2026-07-26 18:57:02 -07:00
2026-07-04 10:42:21 -07:00
2026-07-29 22:39:14 -07:00
2026-06-25 08:34:44 -07:00
2026-06-03 19:06:53 -07:00
2026-07-26 18:57:02 -07:00
2026-07-23 13:38:41 -07:00
2026-07-09 19:58:07 -07:00
2026-06-20 05:04:25 -07:00
2026-06-03 20:52:44 -07:00
2026-06-19 04:27:01 -07:00
2026-06-17 21:37:18 -07:00
2026-06-20 05:04:25 -07:00
2026-06-20 05:04:25 -07:00
2026-07-26 19:18:53 -07:00
2026-07-26 19:18:53 -07:00
2026-06-27 17:11:13 -07:00
2026-06-03 19:06:53 -07:00
2026-07-23 21:59:55 -07:00
2026-06-03 19:06:53 -07:00
2026-06-21 23:07:55 -07:00
2026-07-18 04:44:53 -07:00
2026-07-18 02:05:35 -07:00
2026-06-29 15:34:06 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:06:53 -07:00
2026-06-22 16:21:03 -07:00
2026-07-30 12:46:12 -07:00
2026-06-08 13:32:58 -07:00
2026-07-02 13:07:16 -07:00
2026-07-02 13:07:16 -07:00
2026-06-03 19:06:53 -07:00
2026-07-30 12:46:12 -07:00
2026-07-10 18:14:09 -07:00
2026-07-06 19:03:06 -07:00
2026-07-06 19:03:06 -07:00
2026-07-24 00:35:34 -07:00
2026-07-24 23:02:16 -07:00
2026-07-30 02:38:58 -07:00
2026-06-15 12:43:08 -07:00
2026-06-19 04:27:01 -07:00
2026-07-02 23:49:43 -07:00
2026-06-19 04:27:01 -07:00
2026-07-12 17:54:21 -07:00
2026-06-05 02:38:38 -07:00
2026-07-30 12:46:12 -07:00
2026-06-21 03:53:43 -07:00
2026-07-18 20:30:42 -07:00
2026-07-25 05:15:02 -07:00
2026-06-03 01:08:09 -07:00
2026-07-17 00:29:48 -07:00
2026-07-26 14:37:35 -07:00
2026-07-16 02:07:43 -07:00
2026-07-16 02:07:43 -07:00
2026-07-26 19:52:32 -07:00
2026-07-26 19:52:32 -07:00
2026-07-16 04:15:18 -07:00
2026-07-08 23:39:33 -07:00
2026-07-23 13:38:41 -07:00
2026-07-17 00:48:36 -07:00
2026-06-03 20:52:44 -07:00
2026-07-08 13:09:10 -07:00
2026-07-08 13:09:10 -07:00
2026-06-19 04:27:01 -07:00
2026-07-02 23:53:26 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:48:40 -07:00
2026-07-19 18:59:28 -07:00
2026-07-17 20:09:56 -07:00
2026-07-17 20:09:56 -07:00
2026-07-18 18:04:26 -07:00
2026-06-25 14:37:52 -07:00
2026-07-30 12:46:12 -07:00
2026-06-19 04:27:01 -07:00
2026-07-18 00:33:14 -07:00
2026-07-26 18:57:02 -07:00
2026-06-03 19:48:40 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:06:53 -07:00
2026-06-26 00:43:55 -07:00
2026-07-12 12:49:37 -07:00
2026-06-28 21:10:28 -07:00
2026-07-30 12:46:12 -07:00
2026-07-11 22:43:34 -07:00
2026-07-30 12:46:12 -07:00
2026-06-03 20:52:44 -07:00
2026-06-22 23:42:45 -07:00
2026-06-22 23:42:45 -07:00
2026-07-30 12:46:12 -07:00
2026-07-15 18:43:37 -07:00
2026-07-28 23:23:13 -07:00
2026-06-25 08:35:44 -07:00
2026-06-25 08:35:44 -07:00
2026-06-20 23:57:37 -07:00
2026-06-21 02:15:24 -07:00
2026-06-19 01:33:13 -07:00
2026-06-20 05:04:25 -07:00
2026-06-22 11:47:52 -07:00
2026-07-18 20:30:42 -07:00
2026-07-17 14:25:30 -07:00
2026-07-30 02:38:58 -07:00
2026-07-26 18:57:02 -07:00
2026-07-08 23:39:34 -07:00
2026-07-02 13:44:41 -07:00
2026-07-16 01:19:43 -07:00
2026-07-12 12:49:37 -07:00
2026-06-25 08:34:44 -07:00
2026-06-03 19:06:53 -07:00
2026-07-26 20:04:33 -07:00
2026-07-30 02:38:58 -07:00
2026-07-22 23:04:33 -07:00
2026-07-06 19:03:06 -07:00
2026-07-06 19:03:06 -07:00
2026-06-27 23:47:21 -07:00
2026-06-22 03:57:10 -07:00
2026-07-26 19:52:32 -07:00
2026-07-26 19:52:32 -07:00
2026-07-26 13:05:23 -07:00
2026-06-03 22:35:28 -07:00
2026-06-20 05:04:25 -07:00
2026-07-02 11:38:34 -07:00
2026-07-26 14:37:35 -07:00
2026-06-27 20:02:33 -07:00
2026-07-18 20:30:42 -07:00
2026-07-01 07:33:56 -07:00
2026-07-16 04:15:18 -07:00
2026-07-09 19:58:03 -07:00
2026-06-19 04:27:01 -07:00
2026-07-26 14:37:35 -07:00
2026-07-08 09:47:19 -07:00
2026-07-30 02:38:58 -07:00
2026-07-01 07:33:56 -07:00
2026-07-07 22:04:53 -07:00
2026-07-16 04:58:03 -07:00
2026-07-22 18:46:46 -07:00
2026-07-25 05:15:02 -07:00
2026-07-11 20:32:56 -07:00
2026-07-18 20:30:42 -07:00
2026-06-25 08:34:44 -07:00
2026-06-20 05:04:25 -07:00
2026-07-24 22:16:11 -07:00
2026-07-28 23:23:00 -07:00
2026-06-19 04:27:01 -07:00
2026-06-03 17:33:16 -07:00
2026-06-22 23:58:38 -07:00
2026-07-26 22:34:18 -07:00
2026-07-26 09:50:44 -07:00
2026-07-30 13:42:46 -07:00
2026-06-03 20:52:44 -07:00
2026-06-21 03:53:43 -07:00
2026-06-21 03:53:43 -07:00
2026-07-12 17:54:21 -07:00
2026-07-20 09:41:02 -07:00
2026-06-22 11:15:46 -07:00
2026-07-30 03:10:35 -07:00
2026-07-26 18:35:10 -07:00
2026-07-18 19:45:08 -07:00
2026-07-20 09:41:02 -07:00
2026-07-18 03:48:38 -07:00
2026-07-18 03:48:38 -07:00
2026-07-26 11:17:52 -07:00
2026-06-22 11:15:46 -07:00
2026-07-11 17:16:49 -07:00
2026-07-11 17:16:49 -07:00
2026-06-19 04:27:01 -07:00
2026-06-03 20:52:44 -07:00
2026-07-30 12:46:12 -07:00
2026-06-22 11:08:25 -07:00
2026-07-13 19:07:58 -07:00
2026-07-18 20:30:42 -07:00
2026-07-18 20:30:42 -07:00
2026-07-25 05:15:02 -07:00
2026-07-25 05:15:02 -07:00
2026-07-17 20:09:56 -07:00
2026-07-17 20:09:56 -07:00
2026-07-26 18:57:02 -07:00
2026-07-23 13:21:10 -07:00
2026-06-25 16:31:10 -07:00
2026-07-23 21:59:55 -07:00
2026-07-23 13:21:10 -07:00
2026-07-23 15:25:09 -07:00
2026-07-16 11:07:57 -07:00
2026-07-25 23:12:41 -07:00
2026-06-19 04:27:01 -07:00
2026-06-17 03:12:16 -07:00
2026-06-22 04:39:35 -07:00
2026-07-17 23:51:55 -07:00
2026-07-26 17:34:45 -07:00
2026-07-16 21:07:06 -07:00
2026-07-16 21:07:06 -07:00
2026-07-03 21:47:00 -07:00
2026-07-03 21:47:00 -07:00
2026-07-26 18:57:02 -07:00
2026-07-18 19:36:57 -07:00
2026-07-18 19:36:57 -07:00
2026-07-18 18:11:02 -07:00
2026-07-19 15:45:45 -07:00
2026-06-22 23:58:38 -07:00
2026-07-14 08:23:11 -07:00
2026-07-26 18:35:10 -07:00
2026-07-26 18:35:10 -07:00
2026-06-03 20:52:44 -07:00
2026-07-26 14:37:35 -07:00
2026-06-03 19:06:53 -07:00
2026-06-25 08:34:44 -07:00
2026-07-13 19:07:58 -07:00
2026-07-14 17:18:06 -07:00
2026-07-20 22:58:22 -07:00
2026-07-16 04:15:18 -07:00
2026-07-14 08:18:52 -07:00
2026-06-19 04:27:01 -07:00
2026-06-03 19:48:40 -07:00
2026-06-03 19:06:53 -07:00
2026-07-07 22:04:53 -07:00
2026-07-30 12:46:12 -07:00
2026-07-07 22:04:53 -07:00
2026-07-22 18:46:46 -07:00
2026-07-30 02:38:58 -07:00
2026-06-21 03:53:43 -07:00
2026-07-04 21:28:17 -07:00
2026-07-05 11:31:44 -07:00
2026-07-26 14:37:35 -07:00
2026-07-26 17:18:43 -07:00
2026-07-01 07:33:56 -07:00
2026-07-07 22:04:53 -07:00
2026-07-22 20:55:27 -07:00
2026-06-28 12:10:10 -07:00
2026-07-15 20:28:11 -07:00
2026-06-19 04:27:01 -07:00
2026-06-03 20:52:44 -07:00
2026-06-03 01:08:09 -07:00
2026-06-17 21:37:18 -07:00
2026-06-28 01:17:22 -07:00
2026-07-16 01:19:43 -07:00
2026-06-03 19:06:53 -07:00
2026-07-25 23:12:41 -07:00
2026-06-27 19:54:22 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 20:52:44 -07:00
2026-07-25 23:12:41 -07:00
2026-06-22 18:21:06 -07:00
2026-07-25 21:57:15 -07:00
2026-06-20 21:23:17 -07:00
2026-07-22 17:29:20 -07:00
2026-06-27 23:37:24 -07:00
2026-07-30 12:46:12 -07:00
2026-06-27 23:08:10 -07:00
2026-06-27 23:08:10 -07:00
2026-06-22 15:23:43 -07:00
2026-06-22 15:23:43 -07:00
2026-07-24 22:32:30 -07:00
2026-07-30 02:38:58 -07:00
2026-07-16 03:46:55 -07:00
2026-07-09 08:17:52 -07:00
2026-07-20 09:46:22 -07:00
2026-07-19 17:39:43 -07:00
2026-07-19 16:44:40 -07:00
2026-07-19 20:42:05 -07:00
2026-07-30 12:46:12 -07:00
2026-06-22 03:34:16 -07:00
2026-07-18 16:18:15 -07:00
2026-07-26 18:35:10 -07:00
2026-07-03 00:12:10 -07:00
2026-07-26 18:35:10 -07:00
2026-06-26 02:45:29 -07:00
2026-07-30 03:10:35 -07:00
2026-07-30 12:46:12 -07:00
2026-06-03 19:06:53 -07:00
2026-07-16 16:01:29 -07:00
2026-06-20 05:04:25 -07:00
2026-07-26 14:37:35 -07:00
2026-07-30 03:10:35 -07:00
2026-07-30 03:10:35 -07:00
2026-07-26 14:37:35 -07:00
2026-07-26 14:37:35 -07:00
2026-06-22 19:48:50 -07:00
2026-07-12 17:54:21 -07:00
2026-07-11 19:31:50 -07:00
2026-07-10 18:09:58 -07:00
2026-07-17 14:25:30 -07:00
2026-07-17 14:25:30 -07:00
2026-07-12 13:22:05 -07:00
2026-07-26 09:50:44 -07:00
2026-07-26 14:37:35 -07:00
2026-07-30 02:38:58 -07:00
2026-07-15 22:00:27 -07:00
2026-06-03 19:06:53 -07:00
2026-07-15 22:00:27 -07:00
2026-06-21 03:53:43 -07:00
2026-07-10 17:20:17 -07:00
2026-07-03 21:45:21 -07:00
2026-07-03 21:45:21 -07:00
2026-07-10 17:20:17 -07:00
2026-07-26 18:57:02 -07:00
2026-07-10 17:20:17 -07:00
2026-06-30 10:26:23 -07:00
2026-06-30 10:26:23 -07:00
2026-06-21 16:13:54 -07:00
2026-07-10 16:13:39 -07:00
2026-07-10 16:13:39 -07:00
2026-07-23 13:38:41 -07:00
2026-07-23 13:38:41 -07:00
2026-06-26 13:51:32 -07:00
2026-06-25 19:35:47 -07:00
2026-07-01 00:28:25 -07:00
2026-06-03 20:52:44 -07:00
2026-07-13 19:07:58 -07:00
2026-07-14 12:41:10 -07:00
2026-07-25 05:15:02 -07:00
2026-07-12 17:54:21 -07:00
2026-06-20 01:52:26 -07:00
2026-06-21 03:53:43 -07:00
2026-06-03 19:06:53 -07:00
2026-07-26 18:57:02 -07:00
2026-07-26 20:33:25 -07:00
2026-07-30 14:12:14 -07:00
2026-07-02 11:38:34 -07:00
2026-06-24 23:32:52 -07:00
2026-07-30 12:46:12 -07:00
2026-07-26 11:17:52 -07:00
2026-07-30 12:46:12 -07:00
2026-07-25 05:15:02 -07:00
2026-06-30 01:57:09 -07:00
2026-07-30 12:46:12 -07:00
2026-07-11 22:16:48 -07:00
2026-07-11 18:07:00 -07:00
2026-07-26 20:04:33 -07:00
2026-07-30 12:46:12 -07:00
2026-06-21 23:07:55 -07:00
2026-07-22 08:30:12 -07:00
2026-06-19 04:27:01 -07:00
2026-06-04 16:16:50 -07:00
2026-07-25 05:15:02 -07:00
2026-06-03 19:48:40 -07:00
2026-07-15 00:27:59 -07:00
2026-07-20 01:00:37 -07:00
2026-07-30 12:46:12 -07:00
2026-07-08 09:19:42 -07:00
2026-07-30 08:06:04 -07:00
2026-07-30 08:06:04 -07:00
2026-07-30 12:46:12 -07:00
2026-07-22 22:20:03 -07:00
2026-07-30 12:46:12 -07:00
2026-07-18 18:38:47 -07:00
2026-07-19 19:02:21 -07:00
2026-06-25 14:37:52 -07:00
2026-06-21 22:43:34 -07:00
2026-07-26 18:35:10 -07:00
2026-07-26 18:35:10 -07:00
2026-06-03 19:06:53 -07:00
2026-07-21 23:03:35 -07:00
2026-07-21 23:03:35 -07:00
2026-07-21 18:33:22 -07:00
2026-07-21 18:33:22 -07:00
2026-07-17 00:00:46 -07:00
2026-07-12 12:52:30 -07:00
2026-07-12 12:52:30 -07:00
2026-06-03 19:06:53 -07:00
2026-06-03 19:06:53 -07:00
2026-07-16 13:29:25 -07:00
2026-07-25 22:52:53 -07:00
2026-06-22 03:34:15 -07:00
2026-07-22 17:29:20 -07:00
2026-07-30 12:46:12 -07:00
2026-06-22 18:21:06 -07:00
2026-06-22 03:34:15 -07:00
2026-07-20 00:54:01 -07:00
2026-07-20 00:54:01 -07:00
2026-07-11 18:06:22 -07:00
2026-07-22 22:37:51 -07:00
2026-07-11 18:06:22 -07:00
2026-06-29 23:41:51 -07:00
2026-06-28 09:09:03 -07:00
2026-06-28 09:09:03 -07:00
2026-07-29 00:05:29 -07:00
2026-07-11 18:06:22 -07:00
2026-07-26 14:37:35 -07:00
2026-07-26 14:37:35 -07:00
2026-07-22 22:37:51 -07:00
2026-06-19 05:31:47 -07:00
2026-06-04 12:44:43 -07:00
2026-06-30 12:21:25 -07:00
2026-06-30 12:21:25 -07:00
2026-07-23 22:13:25 -07:00
2026-07-26 11:17:52 -07:00
2026-06-28 09:09:03 -07:00
2026-06-25 20:28:38 -07:00
2026-06-28 09:09:03 -07:00
2026-07-30 12:46:12 -07:00
2026-06-09 09:16:59 -07:00
2026-06-20 10:35:40 -07:00
2026-07-15 22:00:27 -07:00
2026-07-16 18:36:50 -07:00
2026-07-18 04:44:53 -07:00
2026-07-11 18:06:22 -07:00
2026-07-15 10:36:10 -07:00
2026-06-30 12:21:25 -07:00
2026-06-30 12:21:25 -07:00
2026-06-19 04:27:01 -07:00
2026-06-03 19:06:53 -07:00
2026-06-21 21:07:20 -07:00
2026-07-30 12:46:12 -07:00
2026-06-03 19:06:53 -07:00