Repository navigation
fix(analysis): the run outlives leaving Discover; a queued run is not cancelled by auto-advance - #115
Merged
Merged
Conversation
iLevyTate
changed the base branch from
fix/complete-phase-and-preview-ux
to
main
November 11, 2026 18:46
… not cancelled by auto-advance A finished batch scheduled a jump to Organize 2 s later. Files added during that batch start as the next run right away, and the jump fired anyway: Discover unmounted and aborted the queued run 1.5 s in (logged as "Analysis interrupted by navigation", 70 files, 0 processed). Returning to Discover restarted all 70, and because the run lived in Discover, analysis locked every phase tab for the whole run, so the earlier batch could not be organized meanwhile. - Auto-advance skips when another run is active or queued (read at fire time). - The run moves out of DiscoverPhase into AnalysisRunProvider, mounted in PhaseRenderer above every phase, together with the stuck-run watchdog and the total-failure flag. Discover reads it through useAnalysisRun(). - A running analysis no longer pauses the phase tabs, Alt+Arrow, dashboard jump links or Discover's Continue (once a file is ready). File moves, loading and undo/redo still pause; switching to the dashboard still waits, since the dashboard replaces PhaseRenderer. - The run's final merge drops results for files organized mid-run, so a moved file's old-path result is not re-added.
iLevyTate
force-pushed
the
fix/analysis-run-survives-navigation
branch
from
November 11, 2026 19:18
cabf493 to
0d0c1eb
Compare
iLevyTate
enabled auto-merge
November 11, 2026 19:18
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
Reproduced from a manual run's log: 8 files analyzing, 70 more added mid-run.
showAnalysisCompletionNotificationschedules a jump to Organize in 2 s.Analysis interrupted by navigation, main reportscancelled: true, processed: 0.isAnalyzinglocked every phase tab for the whole run (~43 s/file), so the first batch could not be reviewed or organized.Changes:
pendingFilesRefor storeisAnalyzing).useAnalysismoves out ofDiscoverPhaseinto a newAnalysisRunProvidermounted inPhaseRendereraround every phase, with the stuck-run watchdog and the total-failure flag. Discover reads it viauseAnalysisRun(). A phase change no longer unmounts the run, and files queued mid-run survive leaving Discover.NavigationBar.isBlockedByOperation),selectIsNavigationPaused(Alt+Arrow, dashboard links, File-menu pickers) or Discover's Continue (still needs ≥1 analyzed file). File moves, loading and undo/redo still pause. Switching to the dashboard still waits for the run, since the dashboard replacesPhaseRenderer.Scope
Type of Change
Test Plan
Automated
npm run format:check/npm run lint(changed files; pre-commit hooks)npm test— full suite: 940 suites green after updating the 7 tests that encoded "analysis pauses navigation"npm run typecheck,npm run verify:checkjs-ratchetuseAnalysis.test.js— auto-advance stays on Discover when the next run has started (confirmed failing with the fix disabled); moves to Organize otherwiseAnalysisRunProvider.test.js(new) — run survives a phase change, actions reach Discover, total-failure flag, missing-provider errorDiscoverPhase.test.js— Continue stays enabled during analysis once a file is readyphaseNavigation,usePhaseJump,useKeyboardShortcuts.phaseGating,DashboardView,PhaseRenderernpm run ci/ e2e not run locallyManual QA
docs/TESTING.md)Manual QA notes (not yet run in the app):
interrupted by navigationin the log).Checklist
Known limitations
PhaseRenderer, so with a persistedisAnalyzingafter a reload the resume now starts at app launch rather than when Discover opens.useAnalysisnow loads in thePhaseRendererchunk instead of the Discover chunk (still lazy, after the shell paints).