Skip to content

fix(solver): make analysis cancellation responsive across solvers and task UI - #70

Merged
karakayahuseyin merged 1 commit into
mainfrom
fix/instant-analysis-cancellation
Nov 27, 2026
Merged

karakayahuseyin merged 1 commit into
mainfrom
fix/instant-analysis-cancellation

Conversation

@karakayahuseyin

Copy link
Copy Markdown
Contributor

Summary

  • Flight performance: Check cancellation before every powertrain.solve call inside feasible_throttle_range, throttle_for_thrust, and _propulsion_sweep, and on every discharge_time_s ODE integration step in level_flight_envelope (with progress reporting across the discharge loop).
  • Aerodynamics: Re-raise TaskCancelledError before except Exception handlers in AeroSandboxAnalysisMixin and StabilityAnalysisEngine, propagate check_cancelled across aero sweeps and stability control perturbations, and honor token.check_cancelled() in AirfoilAnalysisToolWindow.
  • Electrical propulsion: Check cancellation during the discharge_time_s endurance loop in BasePropulsionSolver._build_result and across OperatingPointSolver.run.
  • TaskManager & UI: Ignore queued started/progress signals from already-cancelled tasks, hide the status-bar progress bar immediately on cancel, and display "Cancelling..." with disabled cancel actions in TaskManagerDialog.

Verification

  • uv run pytest (666 passed)
  • uv run ruff check . / uv run ruff format --check . / uv run pyright (0 errors, 0 warnings)
  • Async mid-run cancellation smoke test on FlightPerformanceSolver (propulsion sweep: 0.13 ms, discharge loop: 14.29 ms) and AlphaSweepSolver (stability: 0.03 ms)

@karakayahuseyin
karakayahuseyin force-pushed the fix/instant-analysis-cancellation branch from 5a058b9 to ef761ee Compare November 27, 2026 14:06
@karakayahuseyin
karakayahuseyin merged commit 4840bbc into main Nov 27, 2026
4 checks passed
@karakayahuseyin
karakayahuseyin deleted the fix/instant-analysis-cancellation branch November 27, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant