canvas-slice.test.tsfix(types): close 205 typecheck errors by repairing real client/server drift apps/mail typechecked against a stale apps/server/dist d.ts (the server's package.json points "types" at dist), so a chunk of the reported drift was phantom. Rebuilt it and fixed the four script errors that blocked `tsc -b` in server, which is what regenerates it. The rest was genuine contract drift, fixed at the source rather than cast away — routes that dropped fields their callers still read (agentExecutions, getUpcomingCalendarEvents' conversationId, createCanvas' description), schema splits the UI never followed (conversationUsers vs conversationContacts), and enums that grew server-side but not client-side (TASK_TYPES, ActionStatus, DateFilterOperator). Also deletes code that was already dead: an unreferenced sort popover whose store API is gone, a panel importing a deleted module, the system-skill metadata UI whose mutation was removed deliberately, and a test asserting a store method that no longer exists. apps/server: 4 -> 0. apps/mail: 228 -> 23, all remaining errors being dependency resolution (zod v3/v4, react-router dev/runtime skew, tiptap v2 via novel) rather than code. Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 2, 2026, 7:45 PMcrm-store.test.tsfix(mail): clear 309 typecheck errors and 5 live ReferenceErrors apps/mail 792 -> 483. Jest stays green at 111 suites / 1071 tests. The single biggest cluster was one missing line: tsconfig pins `types` to ["node","vite/client","jest"] and jest.setup.js is a .js file outside `include`, so the @testing-library/jest-dom matcher augmentation never entered the program — 170 errors from `expect(...).toBeInTheDocument()` and friends. A 4-line jest-dom.d.ts clears all of them. Stripping @jest/globals from 22 test files was a prerequisite, not a tidy-up: only the globally-injected `expect` picks up that augmentation. The other 145 test files already used injected globals, so this also converges on the dominant convention. Do not install @jest/globals. The rest: CRM store test fixtures still extending state that moved to conversationsSlice in Dec 2025 and importing a deleted CRMTypes module; barrel files re-exporting modules that no longer exist (each one an import-time throw); a locally-declared SelectorItem whose module was deleted; sanitizeJson taking `object` when its body explicitly handles primitives and both callers already cast. Five of these were live runtime bugs, not type noise: - setForcePropagate(false) in the AOP-save onSuccess threw on EVERY successful playbook save (cedarAdmin/page.tsx, admin/page.tsx) - backendResponsiveness referenced in a useMemo dependency array, evaluated every render, while the memo body no longer mentions it - "Force re-sync" called handleForceSync() with no argument against a z.object() input that rejects undefined, so it always failed validation - an empty-string icon key produced `Icon === ''`, i.e. <'' /> - showOverlay leaked an unknown attribute onto a Radix DOM node Worth knowing separately: the 792 were invisible. Plain tsc reported 3, because a syntax error elsewhere in the tree makes TypeScript skip ALL semantic checking. One stray comma blinds the entire typecheck. Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 2, 2026, 2:11 PM