Skip to content

Conversation

rabea-al
Copy link
Contributor

@rabea-al rabea-al commented Sep 3, 2025

Description

This PR addresses two issues with template library installation:

  1. Duplicate prompts for already installed libraries

    • Added canon() function to normalize library names (e.g., xai_flaskflask) before comparison.
    • Prevents re-install prompts when libraries are already present.
  2. Multiple confirmation dialogs for missing libraries

    • Replaced per-library confirmations with a single aggregated confirm dialog listing all missing libraries.
    • Uses handleInstall(..., { silent: true }) to skip internal confirms and only show one confirmation to the user.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

1. Already installed libraries

Goal: Ensure templates no longer prompt for libraries that are already installed.
Steps:

  1. Install xai_flask libraries.
  2. Open Service Template from the Launcher.
  3. Verify: no confirmation dialog appears for this library, and the template open directly.

2. Missing library

Goal: Confirm dialog appears only once when one library is missing.
Steps:

  1. Uninstall or remove the xai_agent and xai_openai libraries.

  2. Open Agent Template.

  3. Verify:

    • A single confirm dialog appears asking to install AGENT and OPENAI.
    • After accepting, the install runs silently.
    • Template file opens automatically.

3. Cancel install

Goal: Verify user cancellation aborts correctly.
Steps:

  1. Uninstall xai_agent.

  2. Open Agent Template.

  3. In the confirm dialog, click Cancel.

  4. Verify:

    • No library install occurs.
    • Template is not opened.

Tested on? Specify Version.

  • Windows
  • Linux
  • Mac
  • Others (State here -> xxx )

Copy link

github-actions bot commented Sep 3, 2025

Binder 👈 Launch a binder notebook on branch rabea-al/xircuits/fix/template-install-check

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.

1 participant