Skip to content

Move MT Results panel from Actions to Results task#38

Draft
bHimes with Copilot wants to merge 5 commits into
masterfrom
copilot/fix-37
Draft

Move MT Results panel from Actions to Results task#38
bHimes with Copilot wants to merge 5 commits into
masterfrom
copilot/fix-37

Conversation

Copilot AI commented May 24, 2025

Copy link
Copy Markdown

Changes Made

This PR moves the "MT Results" panel from the Actions task to the Results task in the cisTEM Template Matching (TM) workflow. This change helps maintain a consistent organization of panels within the cisTEM GUI, where results should be grouped under the Results task rather than the Actions task.

Specific Changes:

  1. Changed the initialization of match_template_results_panel to use results_panel->ResultsBook as its parent (instead of actions_panel_tm->ActionsBook)
  2. Removed match_template_results_panel from actions_panel_tm->ActionsBook->AddPage
  3. Added match_template_results_panel to results_panel->ResultsBook->AddPage
  4. Updated the event handlers:
    • Removed references to match_template_results_panel in ActionsPanelTm.cpp
    • Added reference and handling for match_template_results_panel in MyResultsPanel.cpp
  5. Updated selection indices in the event handlers to maintain proper panel navigation

These changes ensure that users will now find the Template Matching results under the Results category in the left panel, maintaining a more intuitive and consistent user interface organization.

Fixes #37.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: bHimes <3077528+bHimes@users.noreply.github.com>
Copilot AI changed the title [WIP] move match template results to the correct panel. Move MT Results panel from Actions to Results task May 24, 2025
Copilot AI requested a review from bHimes May 24, 2025 15:40
Copilot finished work on behalf of bHimes May 24, 2025 15:40

@bHimes bHimes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This didn't quite work.

I think the problem is related to the differences when the spa vs template matching workflow is selected.

If you look at the actions panel for example, there are two different panels for the two workflows.

  1. actions_panel_spa
  2. actions_panel_tm

One solution might be that we need to get rid of the existing results_panel and replace it with results_panel_spa and results_panel_tm, where only the latter has the MT Results.

It may alternatively be possible to avoid greating a fully seperate panel and instead, make sure that on switching between SPA and TM workflows, the page for the MT results is added (switching to TM) or removed (switching to SPA)

If the latter is possible, lets try that first.

Copilot AI and others added 2 commits May 24, 2025 16:05
Co-authored-by: bHimes <3077528+bHimes@users.noreply.github.com>
Co-authored-by: bHimes <3077528+bHimes@users.noreply.github.com>

Copilot AI commented May 24, 2025

Copy link
Copy Markdown
Author

This didn't quite work.

I think the problem is related to the differences when the spa vs template matching workflow is selected.
...

I've implemented the second solution you suggested - dynamically adding/removing the MT Results panel when switching workflows. Changes include:

  1. Modified SetSingleParticleWorkflow() to remove the MT Results panel when in SPA mode
  2. Modified SetTemplateMatchingWorkflow() to add the MT Results panel when in TM mode
  3. Updated the project initialization to not add the MT Results panel by default
  4. Fixed OS X panel refresh logic to use the correct action panels

The latest commit (be64916) should allow the MT Results panel to appear only when the Template Matching workflow is active, maintaining UI consistency.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.fwupd.org
    • Triggering command: /usr/bin/fwupdmgr refresh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of bHimes May 24, 2025 16:09

@bHimes bHimes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Okay, that got closer, the GUI was able to open, but there were several new problems. Rather than trouble shoot those individually, lets fall back to the first suggested solution from the last review.

That is, lets follow the pattern we had for the actions panel at the start of this issue. So actions_panel_spa and actions_panel_tm.

Let's extend that pattern for the results panel, i.e. creating a results_panel_tm and results_panel_spa. When making the changes for the results pannel, we will follow all the patterns and methods used to handle workflow switches that are in place for the actions panel.

Co-authored-by: bHimes <3077528+bHimes@users.noreply.github.com>

Copilot AI commented May 24, 2025

Copy link
Copy Markdown
Author

Okay, that got closer, the GUI was able to open, but there were several new problems. Rather than trouble shoot those individually, lets fall back to the first suggested solution from the last review....

I've implemented the first suggested solution, creating separate results panels for the different workflows. The implementation follows the same pattern used for the actions panels:

  1. Created ResultsPanelSpa and ResultsPanelTm classes that both inherit from ResultsPanel
  2. Added the MT Results panel permanently to the TM results panel
  3. Updated the workflow switching logic to swap between the two results panels when changing workflows

These changes (a51198d) ensure that the MT Results panel appears only in the Template Matching workflow without having to dynamically add or remove pages.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.fwupd.org
    • Triggering command: /usr/bin/fwupdmgr refresh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of bHimes May 24, 2025 16:24
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.

move match template results to the correct panel.

2 participants