Remove @ts-nocheck, add TypeScript types, fix undo cap & new play#30
Open
DigitalBlueprint239 wants to merge 2 commits intomasterfrom
Open
Remove @ts-nocheck, add TypeScript types, fix undo cap & new play#30DigitalBlueprint239 wants to merge 2 commits intomasterfrom
DigitalBlueprint239 wants to merge 2 commits intomasterfrom
Conversation
…error boundary, zero @ts-nocheck - Add "New Play" button to SmartPlaybook toolbar with unique naming and optional save prompt - Fix slant route direction to break inside (toward field center) based on player position - Cap undo/redo history at 50 entries to prevent memory bloat - Upgrade ErrorBoundary to dark/athletic theme with "Your saved plays are safe" messaging - Remove all 19 @ts-nocheck suppressions and add proper TypeScript types - Restore missing addToOfflineQueue function in firestore.ts with queue size cap - Fix recursive updatePlay call in useFirestore.ts (renamed import to updatePlayService) - Fix App.test.tsx with Firebase mocks for CI compatibility - Zero TypeScript errors, clean build, all tests passing https://claude.ai/code/session_012CScdgAo1BMVsXFEj978No
❌ Deploy Preview for magical-starlight-0c1207 failed.
|
- Create PlaybookDataContext with full reducer (ADD_PLAY, UNDO, REDO, etc.) with withHistory() wrapping all mutating actions, capped at 50 snapshots - Create InstallListPanel with "+ New Play" button wired to context - Create usePersistPlaybook hook that excludes history/future from localStorage - Create featureFlags.ts with offensiveEngineSpacingHints: true - Replace all 11 React.FC<any> with proper typed interfaces - Fix CanvasArea.tsx broken Field import path and ForwardRef typing - Add Ctrl+Z/Cmd+Z undo and Ctrl+Y/Cmd+Y redo keyboard shortcuts - Wire PlaybookDataProvider into SmartPlaybook component tree - Audit firestore.ts: clean (no @ts-nocheck, proper queue management) - Verify route labels persist through save/load cycle All guardrails pass: tsc clean, build succeeds, tests pass, zero @ts-nocheck, zero React.FC<any> https://claude.ai/code/session_012CScdgAo1BMVsXFEj978No
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes TypeScript migration by removing all 19
@ts-nochecksuppressions across the codebase and adding proper type definitions. It also includes critical bug fixes for undo/redo memory management, route direction logic, and test infrastructure.Key Changes
TypeScript Migration
@ts-nocheckdirectives from 19 files (SmartPlaybook.tsx, useFirestore.ts, TouchOptimizedPlaybook.tsx, CanvasArea.tsx, coach-core-complete.tsx, and 14 utility/context files)PlayerData,RouteData,SavedPlay,UndoState,DebugResult,NotificationData,RoutePointupdatePlayimport toupdatePlayService)addToOfflineQueue()in firestore.ts with queue size cap (100 entries)npx tsc --noEmitpasses cleanFeature Additions
.slice(-50)) to prevent memory bloatBug Fixes
Code Quality
React.FC<any>for legacy componentsTouchEvent,anyfor canvas events)Implementation Details
.slice(-50)to keep only most recent 50 actionshttps://claude.ai/code/session_012CScdgAo1BMVsXFEj978No