Skip to content

Conversation

@JoeZiminski
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

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 adds functionality to dynamically turn off mutually exclusive transfer checkboxes in the TUI. When certain checkboxes (like "all" or "all_datatype") are selected, other incompatible checkboxes are automatically deselected to maintain logical consistency.

Key changes:

  • Introduced TransferDatatypeCheckboxes subclass that extends the base checkbox class with mutual exclusion logic
  • Refactored parameter naming from create_or_transfer to tab_name for clarity
  • Added comprehensive test coverage for the new dynamic on/off behavior

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
datashuttle/tui/screens/datatypes.py Adds TransferDatatypeCheckboxes subclass with logic to automatically turn off mutually exclusive checkboxes; renames parameter from create_or_transfer to tab_name; adds helper function get_datatype_from_checkbox_name
datashuttle/tui/tabs/transfer.py Switches from DatatypeCheckboxes to TransferDatatypeCheckboxes for transfer tab checkboxes
datashuttle/tui/tabs/create_folders.py Updates DatatypeCheckboxes instantiation to use renamed tab_name parameter
tests/tests_tui/test_tui_widgets_and_defaults.py Removes "all" and "all_datatype" from existing test loop; adds new test test_transfer_checkboxes_dynamic_on_off to verify mutual exclusion behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This tests that mutually exclusive checkbox options turn
each other off / on when set. This is necessary for transfer
tab custom datatypes in which some checkboxes (e.g. "all")
should not be selected with other (e.g. "behav").
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

There is an extra space in "should not be selected with other" - should be a single space.

Suggested change
should not be selected with other (e.g. "behav").
should not be selected with other (e.g. "behav").

Copilot uses AI. Check for mistakes.
super().__init__(interface, "transfer", id)

@on(Checkbox.Changed)
def on_checkbox_changed(self, event: Checkbox.Changed) -> None:
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

This method requires 2 positional arguments, whereas overridden DatatypeCheckboxes.on_checkbox_changed requires 1.

Copilot uses AI. Check for mistakes.
@JoeZiminski JoeZiminski linked an issue Dec 20, 2025 that may be closed by this pull request
@JoeZiminski JoeZiminski modified the milestones: v0.8.0, v0.9.0 Dec 20, 2025
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.

Can tick contradicting tickboxes, and error message is unclear

2 participants