Skip to content

Commit e0be0f7

Browse files
chore: clean up learn from mistakes + deep analysis logic
1 parent b04a879 commit e0be0f7

8 files changed

Lines changed: 143 additions & 197 deletions

File tree

src/components/Analysis/AnalysisConfigModal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ export const AnalysisConfigModal: React.FC<Props> = ({
122122
</span>
123123
<p className="text-xs text-secondary">
124124
Higher depths provide more accurate analysis but take longer to
125-
complete. You can cancel the analysis at any time. Currently,
126-
analysis only persists until you close the tab, but we are working
127-
on a persistent analysis feature!
125+
complete. You can cancel the analysis at any time. Analysis will
126+
persist even after you close the tab,
128127
</p>
129128
</div>
130129
</div>

src/components/Analysis/AnalysisNotification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react'
22
import { motion } from 'framer-motion'
3-
import { GameAnalysisProgress } from 'src/hooks/useAnalysisController/useAnalysisController'
3+
import { DeepAnalysisProgress } from 'src/hooks/useAnalysisController/useAnalysisController'
44

55
interface Props {
6-
progress: GameAnalysisProgress
6+
progress: DeepAnalysisProgress
77
onCancel: () => void
88
}
99

src/components/Analysis/ConfigurableScreens.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ExportGame } from 'src/components/Common/ExportGame'
66
import {
77
AnalyzedGame,
88
GameNode,
9-
LearnFromMistakesState,
9+
LearnFromMistakesConfiguration,
1010
MistakePosition,
1111
} from 'src/types'
1212

@@ -28,7 +28,7 @@ interface Props {
2828
status: 'saving' | 'unsaved' | 'saved'
2929
}
3030
// Learn from mistakes props
31-
learnFromMistakesState?: LearnFromMistakesState
31+
learnFromMistakesState?: LearnFromMistakesConfiguration
3232
learnFromMistakesCurrentInfo?: {
3333
mistake: MistakePosition
3434
progress: string

src/components/Analysis/LearnFromMistakes.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import React from 'react'
22
import Image from 'next/image'
3-
import { LearnFromMistakesState, MistakePosition } from 'src/types/analysis'
3+
import {
4+
LearnFromMistakesConfiguration,
5+
MistakePosition,
6+
} from 'src/types/analysis'
47

58
interface Props {
6-
state: LearnFromMistakesState
9+
state: LearnFromMistakesConfiguration
710
currentInfo: {
811
mistake: MistakePosition
912
progress: string

0 commit comments

Comments
 (0)