Skip to content

Close map2loop dialogs after successful runs#72

Merged
lachlangrose merged 3 commits intodev-0.1.12from
copilot/ensure-map2loop-widget-dialog
Jan 26, 2026
Merged

Close map2loop dialogs after successful runs#72
lachlangrose merged 3 commits intodev-0.1.12from
copilot/ensure-map2loop-widget-dialog

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Map2loop tools now behave as dialogs that close only after their actions succeed, preventing lingering windows after failures.

  • Dialog lifecycle: All map2loop dialogs (sampler, sorter, user sorter, basal contacts, thickness calculator, paint strat order) now call accept() only when the embedded widget reports success.
  • Success signaling: Each underlying widget returns a boolean indicating whether execution succeeded, enabling dialogs to decide when to close.
  • Fault topology: Returns success status to align with the dialog pattern.

Example:

# Sampler dialog accept handler
def _run_and_accept(self):
    if self.widget._run_sampler():
        self.accept()
Original prompt

Ensure that every map2loop widget/tool acts as a dialog widget that is closed once the tool has been run.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure map2loop widgets act as dialog widgets on execution Close map2loop dialogs after successful runs Jan 26, 2026
Copilot AI requested a review from lachlangrose January 26, 2026 01:19
@lachlangrose lachlangrose marked this pull request as ready for review January 26, 2026 01:32
@lachlangrose lachlangrose merged commit 038a009 into dev-0.1.12 Jan 26, 2026
1 check passed
@lachlangrose lachlangrose deleted the copilot/ensure-map2loop-widget-dialog branch January 26, 2026 01:33
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.

2 participants