refactor(ui): remove unwired _on_send_selected_video_to_analysis - #470
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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
osimport and updated_show_conclude_next_step_guidancedocstring 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.
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
ZoneControlBuilder._on_send_selected_video_to_analysishad no production caller — its only invoker was the "Enviar Vídeo Selecionado para Análise" button increate_zone_control_widgets, a dead duplicate Zones-tab Treeview removed in 62162e9. The handler itself was accidentally left behind.self.gui.video_selector_tree, an attribute that doesn't exist on the realApplicationGUI(the real tree lives atgui.zone_controls.video_selector_tree). Only the test's stand-inguiobject had it set directly, so the test passed without ever exercising real behavior.osimport, and updated a stale docstring in_show_conclude_next_step_guidancethat still referenced the removed button.Test plan
ruff checkon the changed filespytest tests/ui/builders/test_zone_control_builder.py -q(8 passed)python scripts/impact_analyzer.py function _on_send_selected_video_to_analysisconfirmed the method's only dependents were the file itself and its test🤖 Generated with Claude Code