Skip to content

Phase 5: Browser integration for rejection and cleaning workflows #99

Closed

Description

@suraj-ranganath

🤖 Phase 5 for the EEGBrowser epic. Target branch: feature/eegbrowser-completion.

Dependency

Start after Phase 4 merges. This can run in parallel with Phase 6.

Goal

Re-enable browser-dependent paths in existing rejection, selection, and cleaning workflows without regressing the non-browser behavior already implemented.

Implementation scope

  • Re-enable pop_select Scroll dataset button.
  • Re-enable pop_rejmenu Scroll Data / Scroll Acts buttons and mark update flows.
  • Integrate browser display/reject paths in pop_eegthresh, pop_jointprob, pop_rejkurt, pop_rejtrend, pop_rejspec, pop_rejcont, and pop_autorej.
  • Integrate clean_rawdata’s “Pop up scrolling data window with rejected data highlighted” parity path where applicable.
  • Keep existing no-display/non-browser code paths stable.

Acceptance criteria

  • Existing non-browser behavior remains unchanged when visual display is off.
  • When display/reject options are on, EEGPrep opens EEGBrowser with EEGLAB-compatible marks and accept behavior.
  • Rejection fields preserve EEGLAB naming and shape for data and ICA modes.
  • Tests cover no-display, display-only, reject-on-close, cancel, and superpose paths.
  • No runtime code depends on src/eegprep/eeglab.

Tests and evidence

  • Regression tests for all touched pop rejection functions.
  • GUI tests for browser launch and accept/cancel behavior from each workflow.
  • Console/session tests where browser accept mutates EEG/history.
  • Visual parity screenshots attached to the phase PR as GitHub user attachments.
  • uv run --no-sync ruff check .
  • uv run --no-sync ruff format --check .
  • uv run --no-sync ty check
  • Focused pytest for changed tests.

/goal prompt

/goal Integrate EEGBrowser into rejection, selection, and cleaning workflows from this issue. Re-enable browser-dependent buttons/options while preserving existing non-browser behavior. Verify EEGLAB parity for rejection marks, sample_data user flows, GUI/console synchronization, visual parity captures, MATLAB parity helpers, ruff/format/ty, and focused pytest.

Required references for every phase

  • AGENTS.md
  • .agents/skills/eegprep-feature-development/SKILL.md
  • .agents/skills/eeglab-gui-visual-parity/SKILL.md for GUI features
  • .agents/skills/gui-agent-flow-qa/SKILL.md for end-user flow QA
  • EEGLAB reference under src/eegprep/eeglab, used only as development/parity input.

Core EEGLAB references

  • src/eegprep/eeglab/functions/sigprocfunc/eegplot.m
  • src/eegprep/eeglab/functions/sigprocfunc/eegplotlegacy.m
  • src/eegprep/eeglab/functions/sigprocfunc/eegplot2event.m
  • src/eegprep/eeglab/functions/sigprocfunc/eegplot2trial.m
  • src/eegprep/eeglab/functions/sigprocfunc/trial2eegplot.m
  • src/eegprep/eeglab/functions/popfunc/pop_eegplot.m
  • src/eegprep/eeglab/functions/popfunc/eeg_rejmacro.m
  • src/eegprep/eeglab/functions/popfunc/eeg_multieegplot.m

Activity

  1. added
    phase
    on May 31, 2026
  2. claude commented on May 31, 2026

    @claude
    Contributor

    🤖 Plan:

    • Read AGENTS.md, fix-issue, pull-request skills
    • Fetch issue and run duplicate-work preflight
    • Inspect current package state for browser/eegplot integration
    • Post analysis (no PR — blocked + out of single-PR scope)

    Research

    Phase 5 is blocked: it explicitly depends on Phase 4 (#98), which is still open. Phase 4 must deliver pop_eegplot and the menu/console wiring that Phase 5 plugs into the rejection/cleaning workflows. There is also no Phase 1-3 work landed yet — feature/eegbrowser-completion is 0 commits ahead of develop (and 42 behind), and the package contains no pop_eegplot* module and no EEGBrowser/eegplot references in the rejection pop functions. The browser-dependent buttons are currently disabled placeholders, e.g. ControlSpec(\"pushbutton\", \"Scroll dataset\", ..., enabled=False) in pop_select.py:657 and the \"Scroll Data\"/\"Scroll Acts.\" labels in pop_rejmenu.py:54, with pop_eegplot carrying excluded_reason=\"eegbrowser\" metadata in menu_placeholders.py:39.

    Relevant code

    Open/Merged PRs: none for the EEGBrowser epic. Last merged work was the STUDY epic (#86).

    Proposed Approach (for human review)

    This is a multi-module new-feature epic phase — well beyond the <100-line, single-PR fix-issue scope. Not opening a PR. Two blockers and a scoping note:

    1. Hard dependency: Phases 1-4 deliver the browser data model (Phase 1: Browser data model, rendering foundation, and eegplot API #95), UI/menus (Phase 2: Core browser UI, navigation, menus, and visual shell parity #96), winrej/marking (Phase 3: Interactive marking, winrej, and rejection conversion parity #97), and pop_eegplot API + menu wiring (Phase 4: pop_eegplot menu workflows and session-console integration #98). None of those exist in the package yet. Phase 5 should not start until at least Phase 4: pop_eegplot menu workflows and session-console integration #98 lands on feature/eegbrowser-completion, otherwise there is nothing to call.
    2. Branch state: feature/eegbrowser-completion is stale (42 behind develop, 0 ahead). It needs a rebase/merge once Phase 1-4 work begins; otherwise Phase 5 PRs will conflict with whatever Phase 4 introduces in popfunc/, guifunc/, and menu_placeholders.py.
    3. Scope when unblocked: even alone, Phase 5 touches 9+ user-facing modules (pop_select, pop_rejmenu, 7 rejection pop functions) plus the clean_rawdata "rejected data highlighted" path, each requiring GUI + console + history tests and visual parity captures. Recommend splitting along EEGLAB callsite groupings (e.g. selection/menu, threshold-family, prob/kurt/trend/spec, cont/autorej, clean_rawdata) rather than one mega-PR, mirroring how EEGLAB's eeg_rejmacro.m is invoked from each pop_rej*.m.

    Recommend closing/holding this issue until #98 merges, then having a human kick off Phase 5 as a series of scoped PRs against feature/eegbrowser-completion.

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