Skip to content

Fix interactive timeout callback cleanup#38255

Open
ianalloway wants to merge 1 commit into
commaai:masterfrom
ianalloway:codex/interactive-timeout-callback-cleanup
Open

Fix interactive timeout callback cleanup#38255
ianalloway wants to merge 1 commit into
commaai:masterfrom
ianalloway:codex/interactive-timeout-callback-cleanup

Conversation

@ianalloway

Copy link
Copy Markdown

Summary

  • Add Device.remove_interactive_timeout_callback and make timeout callback registration idempotent.
  • Iterate timeout callbacks over a snapshot so callbacks can remove themselves safely.
  • Register driver-camera and onboarding timeout callbacks only while their widgets are active.

Fixes #37536.

Test plan

  • uvx ruff check openpilot/selfdrive/ui/ui_state.py openpilot/selfdrive/ui/onroad/driver_camera_dialog.py openpilot/selfdrive/ui/mici/onroad/driver_camera_dialog.py openpilot/selfdrive/ui/mici/layouts/onboarding.py openpilot/selfdrive/ui/tests/test_ui_state.py
  • uv run --python 3.12.13 pytest -q openpilot/selfdrive/ui/tests/test_ui_state.py

Copilot AI review requested due to automatic review settings June 27, 2026 16:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the ui label Jun 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Process replay diff report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ 0 changed, 66 passed, 0 errors

@github-actions

Copy link
Copy Markdown
Contributor

UI Preview

mici: Videos are identical! View Diff Report
big: Videos are identical! View Diff Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interactive timeout callbacks are added but never removed

2 participants