Skip to content

NXT-4467: Close version panel when entering shared component#121

Open
xnhp wants to merge 2 commits intomasterfrom
enh/NXT-4467-close-version-history-panel
Open

NXT-4467: Close version panel when entering shared component#121
xnhp wants to merge 2 commits intomasterfrom
enh/NXT-4467-close-version-history-panel

Conversation

@xnhp
Copy link
Contributor

@xnhp xnhp commented Feb 13, 2026

NXT-4467 (Close version history panel when entering a shared component)

@xnhp xnhp requested a review from a team as a code owner February 13, 2026 13:45
@xnhp xnhp requested review from Copilot and knime-ghub-bot and removed request for a team February 13, 2026 13:45
Copy link
Contributor

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 implements functionality to automatically close the version history panel when a user enters a shared (linked) component. This improves the user experience by ensuring the version panel doesn't remain open in contexts where it's not relevant.

Changes:

  • Added logic to detect when entering a linked component and automatically deactivate version mode
  • Imported WorkflowInfo enum and useWorkflowVersionsStore to support the new functionality
Comments suppressed due to low confidence (1)

org.knime.ui.js/src/store/application/lifecycle.ts:607

  • The new logic to close the version panel when entering a shared component lacks test coverage. Consider adding a test case that verifies the version panel is deactivated when entering a linked component, similar to the existing tests in lifecycle.test.ts that verify afterSetActivateWorkflow is called.
    afterSetActivateWorkflow() {
      const activeWorkflow = useWorkflowStore().activeWorkflow;
      if (
        activeWorkflow?.info.linked &&
        activeWorkflow.info.containerType ===
          WorkflowInfo.ContainerTypeEnum.Component
      ) {
        const versionsStore = useWorkflowVersionsStore();
        if (versionsStore.activeProjectVersionsModeStatus !== "inactive") {
          void versionsStore.deactivateVersionsMode();
        }
      }
      useComponentInteractionsStore().checkForLinkedComponentUpdates({
        auto: true,
      });
    },

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

xnhp and others added 2 commits February 13, 2026 16:35
NXT-4467 (Close version history panel when entering a shared component)
NXT-4467 (Close version history panel when entering a shared component)
@hriverahdez hriverahdez force-pushed the enh/NXT-4467-close-version-history-panel branch from 9ce804b to 44458e6 Compare February 13, 2026 15:35
Copilot AI review requested due to automatic review settings February 13, 2026 15:35
Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud
Copy link

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