-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 8 tuning session bugs — data loss, stale state, missing TF metrics #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -123,6 +123,15 @@ function AppContent() { | |||||||
| .catch(() => setAvailableLogIds(new Set())); | ||||||||
| }; | ||||||||
|
|
||||||||
| // Clear stale verification state when session changes (disconnect, reset, new session) | ||||||||
| const sessionPhase = tuning.session?.phase; | ||||||||
| useEffect(() => { | ||||||||
| setPendingVerification(null); | ||||||||
| setVerificationPickerLogId(null); | ||||||||
| setReanalyzeHistoryRecordId(null); | ||||||||
| setIsReanalyze(false); | ||||||||
| }, [sessionPhase]); | ||||||||
|
|
||||||||
| // Clear erased state when flash has new data (post-flight reconnect via cache push) | ||||||||
| const flashUsedSize = fcState.blackboxInfo?.usedSize ?? null; | ||||||||
| const storageType = fcState.blackboxInfo?.storageType ?? 'flash'; | ||||||||
|
|
@@ -417,6 +426,10 @@ function AppContent() { | |||||||
| case 'dismiss': | ||||||||
| try { | ||||||||
| setErasedForPhase(null); | ||||||||
| setPendingVerification(null); | ||||||||
| setVerificationPickerLogId(null); | ||||||||
| setReanalyzeHistoryRecordId(null); | ||||||||
| setIsReanalyze(false); | ||||||||
|
||||||||
| setIsReanalyze(false); | |
| setIsReanalyze(false); | |
| setReanalyzeHistoryRecordId(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3851eab — reanalyzeHistoryRecordId added to dismiss cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new sessionPhase effect only clears pendingVerification, but other verification-related UI state can remain set across session/profile changes (e.g., verificationPickerLogId keeps VerificationSessionModal open, and reanalyzeHistoryRecordId/isReanalyze can leak into the next flow). Consider clearing verificationPickerLogId, reanalyzeHistoryRecordId, and isReanalyze in the same effect so any session change fully resets verification UI state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3851eab — useEffect now clears all verification state together.