Skip to content

refactor(ui): remove unwired _on_send_selected_video_to_analysis - #470

Merged
MarkSant merged 1 commit into
mainfrom
claude/silly-leakey-d65118
Aug 15, 2026
Merged

refactor(ui): remove unwired _on_send_selected_video_to_analysis#470
MarkSant merged 1 commit into
mainfrom
claude/silly-leakey-d65118

Conversation

@MarkSant

Copy link
Copy Markdown
Owner

Summary

  • ZoneControlBuilder._on_send_selected_video_to_analysis had no production caller — its only invoker was the "Enviar Vídeo Selecionado para Análise" button in create_zone_control_widgets, a dead duplicate Zones-tab Treeview removed in 62162e9. The handler itself was accidentally left behind.
  • It was also latently broken: it read self.gui.video_selector_tree, an attribute that doesn't exist on the real ApplicationGUI (the real tree lives at gui.zone_controls.video_selector_tree). Only the test's stand-in gui object had it set directly, so the test passed without ever exercising real behavior.
  • Removed the method, its test, the now-unused os import, and updated a stale docstring in _show_conclude_next_step_guidance that still referenced the removed button.

Test plan

  • ruff check on the changed files
  • pytest tests/ui/builders/test_zone_control_builder.py -q (8 passed)
  • python scripts/impact_analyzer.py function _on_send_selected_video_to_analysis confirmed the method's only dependents were the file itself and its test
  • Repo-wide grep confirmed no other references (docs included)
  • Pre-commit and pre-push hooks (ruff, mypy, GUI tests on changed files) passed locally

🤖 Generated with Claude Code

Its only caller was the "Enviar Vídeo Selecionado para Análise" button
in create_zone_control_widgets, a dead duplicate Zones-tab Treeview
removed in 62162e9. The handler was accidentally left behind, and it
never actually worked in production: it read self.gui.video_selector_tree,
an attribute that doesn't exist on ApplicationGUI (the real tree lives
at gui.zone_controls.video_selector_tree) — only the test's stand-in gui
object had it set directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 18:42

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.

Pull request overview

This PR cleans up ZoneControlBuilder by removing a dead, unwired UI handler that no longer has any production call sites (and was also relying on a non-existent ApplicationGUI.video_selector_tree attribute), along with its now-obsolete unit test. It also updates adjacent documentation text to avoid referencing the removed UI affordance.

Changes:

  • Removed ZoneControlBuilder._on_send_selected_video_to_analysis (no longer reachable in production and latently incorrect for the real GUI shape).
  • Deleted the corresponding unit test that was only passing due to a test-only GUI stub shape.
  • Removed the now-unused os import and updated _show_conclude_next_step_guidance docstring text to reflect current UI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/zebtrack/ui/builders/zone_control_builder.py Removes the unused/incorrect handler and os import; updates guidance docstring to match the current UI.
tests/ui/builders/test_zone_control_builder.py Removes the test for the deleted handler (test was validating a non-production GUI shape).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@MarkSant
MarkSant merged commit b4f6459 into main Aug 15, 2026
6 checks passed
@MarkSant
MarkSant deleted the claude/silly-leakey-d65118 branch August 15, 2026 18:43
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.

2 participants