Skip to content

Phase 3: Extension Manager UX, curated catalog metadata, and safe install guidance #115

Closed

Description

@suraj-ranganath

Summary

Upgrade the current bundled-only plugin manager into an EEGPrep Extension Manager that helps researchers understand what is installed, what is curated, what failed, and how to install extensions safely.

EEGPrep should not host or unzip arbitrary extension code. The manager should guide package-manager installation and show trusted metadata.

Key Work

  • Extend plugin_menu, plugin_status, and related public APIs to use the new extension registry while preserving EEGLAB-style naming where useful.
  • Build a GUI Extension Manager that shows bundled, installed, curated, disabled, incompatible, failed, and missing-dependency states.
  • Add details panel: extension description, version, maintainer, package name, docs URL, source, capabilities, errors, and install/update guidance.
  • Define a curated catalog metadata schema. The catalog should point to packages/repos/docs and never store code zips.
  • Support a local/catalog JSON file for tests and future catalog download integration.
  • Generate safe install commands such as uv add eegprep-ext-foo, pip install eegprep-ext-foo, or uv add git+https://... without silently executing them.
  • Add clear user copy about trust: installing Python packages executes third-party code.
  • Keep headless plugin_menu(show=False) useful for scripts and console.

Edge Cases To Cover

  • Catalog lists an extension that is not installed.
  • Installed extension is absent from catalog.
  • Catalog metadata conflicts with installed package metadata.
  • Extension is installed but incompatible with current EEGPrep.
  • Extension is disabled.
  • Extension load failed but catalog metadata is available.
  • No internet / no catalog available.
  • Private lab extension installed from editable path.

Acceptance Criteria

  • Extension Manager is useful both headlessly and in GUI.
  • It clearly separates installed state from catalog/curation state.
  • It never downloads/unzips/runs installation without explicit user action.
  • Tests cover installed-only, catalog-only, installed-plus-catalog, incompatible, disabled, failed, and private/local extension states.
  • GUI layout is visually polished and consistent with EEGPrep's EEGLAB-inspired UI.
  • Docs explain how to install extensions from PyPI, GitHub, and local editable paths.

/goal Prompt

/goal Build EEGPrep's Extension Manager around the extension registry and a metadata-only curated catalog. Preserve plugin_menu/plugin_status compatibility where useful, never host or unzip arbitrary code, provide safe install guidance, support headless and GUI use, cover installed/catalog/failure edge cases, add docs, visual QA, lint/type checks, and focused tests.

Activity

  1. added
    phase
    on Jun 2, 2026
  2. claude commented on Jun 2, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    Phase 3 is an epic-scale GUI + catalog + state-model rebuild, not a small bug fix. It is also explicitly gated by Phase 1 (#113, defines ExtensionSpec + registry + entry-point discovery + status enum) and coordinated with Phase 2 (#114, runtime menu/console/help integration). Phase 1 has not landed: no eegprep.extensions module, no ExtensionSpec, no importlib.metadata entry-point discovery, and no real status model — just a hard-coded bundled tuple.

    Relevant code

    • src/eegprep/functions/adminfunc/plugin_menu.py#L14-L80 — hard-coded _BUNDLED_PLUGINS, no registry, no catalog
    • src/eegprep/functions/adminfunc/plugin_menu.py#L88-L148 — plugin_status / plugin_menu API surface to preserve
    • src/eegprep/functions/adminfunc/plugin_menu.py#L192-L252 — current read-only Qt dialog (5 cols, no details panel, no states)
    • src/eegprep/functions/guifunc/menu_actions.py#L907-L910 — dispatcher entry point for the manager
    • src/eegprep/functions/guifunc/session.py#L92 — EEGPrepSession.PLUGINLIST mirror that must stay sync'd
    • tests/test_plugin_menu.py — current coverage to extend (not replace)

    Duplicate-work preflight: no open PRs touch this area. Open siblings: #113 (Phase 1), #114 (Phase 2), #116 (Phase 4), #117 (Phase 5), #118 (Phase 6). Per epic #112: "Phase 1 must merge first because it defines the extension API and registry contract."

    Proposed Approach (for human review)

    Scope is well over 100 lines and crosses multiple modules (admin/plugin_menu, new catalog module, new GUI dialog, session, menu_actions, docs, tests, help resource). Following fix-issue guidance ("do NOT open a parallel implementation PR" when overlapping work exists), this should not be merged before #113 lands, because the status model, ExtensionSpec, and discovery behavior define the data Phase 3 renders.

    Suggested sequencing once #113 is merged:

    1. Catalog metadata schema in src/eegprep/functions/adminfunc/extension_catalog.py — CatalogEntry dataclass (name, display_name, package, version_constraints, source_type {pypi|git|local}, source_url, docs_url, maintainer, capabilities, description, tags). Loader for a packaged default JSON + override via EEGPREP_EXTENSION_CATALOG path. No network fetch in Phase 3.
    2. Packaged default catalog JSON at src/eegprep/resources/extension_catalog.json (curated metadata only, never code).
    3. Merge layer in plugin_menu.py that joins (a) Phase 1 registry records, (b) bundled inventory, (c) catalog entries into a single normalized record with a state field: bundled, installed, curated, disabled, incompatible, failed, missing_dependency, installed_uncurated, catalog_metadata_conflict. Preserve plugin_status / plugin_menu / format_plugin_menu signatures.
    4. Safe install-command generator: build_install_commands(entry) -> {\"uv\": \"uv add ...\", \"pip\": \"pip install ...\", \"git\": \"uv add git+...\"}. Returns strings; never executes. Headless plugin_menu(show=False) exposes them on each record.
    5. GUI rewrite of _show_plugin_dialog: left table with state-colored badges + filter bar; right details panel (description, version, maintainer, package, docs URL, source, capabilities, errors, copy-to-clipboard install commands); trust banner above install commands. Visual parity loop via the eeglab-gui-visual-parity skill.
    6. Help resource src/eegprep/resources/help/plugin_menu.md wired through the existing Help button path.
    7. Docs page under docs/source/ covering install from PyPI / GitHub / local editable + trust warning.
    8. Tests in tests/test_plugin_menu.py (extend, don't replace) covering all eight states from the edge-cases list, headless safe-command output, EEGPrepSession.PLUGINLIST sync, dispatcher round-trip, and catalog-override env var.

    Open questions for a human before implementation:

    No PR opened — awaiting Phase 1 (#113) and approach sign-off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

phase

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions