Skip to content

Feat/annotation management system#136

Open
sam4coding wants to merge 7 commits intoPytorchConnectomics:mainfrom
sam4coding:feat/annotation-management-system
Open

Feat/annotation management system#136
sam4coding wants to merge 7 commits intoPytorchConnectomics:mainfrom
sam4coding:feat/annotation-management-system

Conversation

@sam4coding
Copy link
Copy Markdown
Collaborator

@sam4coding sam4coding commented Mar 26, 2026

Title: feat: integrate annotation management system and align with upstream refactoring

Description:
This PR introduces the Project Manager module for handling large-scale scientific image annotation tasks. It also includes critical fixes to align the codebase with the recent upstream/main refactoring (specifically the sunset synanno changes).

Key Changes:

Module Integration: Added ProjectManager for task distribution, tracking, and high-priority assignments.

Upstream Alignment: * Cleaned up deprecated component references (WorkflowSelector, ProofReading, WormErrorHandling, EHTool) following the upstream synanno sunset.

    Reorganized view directory structures to match the new official module layout.

Bug Fixes: * Resolved CORSMiddleware configuration conflicts in server_api/main.py.

    Fixed module import paths in Views.js and MaskProofreading.js caused by directory restructuring.

Backend Support: Updated the API server to handle dynamic task queries and JSON-based persistence.

Verification:

npm run build passes successfully.

python3 -m py_compile verifies backend syntax.

Manual test: Verified ProjectManager displays tasks and correctly handles assignee filtering.

…nectomics#125)

- Implemented Login UI and Auth context with localStorage persistence.
- Added Admin/Worker role-based view gating.
- Integrated mock data for 19 real volumes from cluster export.
- Resolved merge conflicts with upstream/main and handled WorkflowSelector sunset.
…nectomics#125)

- Implemented Login UI and Auth context with localStorage persistence.
- Added Admin/Worker role-based view gating.
- Integrated mock data for 1000 volumes (real data ingestion pending).
- Resolved merge conflicts with upstream/main.
@sam4coding sam4coding force-pushed the feat/annotation-management-system branch from 4067897 to 8b59a5b Compare April 10, 2026 18:34
@sam4coding
Copy link
Copy Markdown
Collaborator Author

Key Changes:
Standardized Data Pooling: Implemented dataReader.js and updated

ProjectManagerContext.js
to decouple the UI from specific file paths, allowing for "pooled" metadata resolution.
External Metadata Resolution: The backend now supports dynamic metadata loading via the PROJECT_METADATA_JSON and DATA_ROOT_EM environment variables.
Ingestion Pipeline: Added

scripts/ingest_data.py
, an industrial-grade crawler that recursively scans storage for .h5 files, automatically excluding development artifacts (like .venv).
Frontend Stabilization: Resolved build failures by Safely commenting out sunsetted components (ProofReading, EHTool) and setting the Project Manager as the default application entry point.
Session Persistence: Integrated localStorage to ensure Admin/Worker login sessions persist across browser restarts.
Verification Plan

  1. Ingestion & Storage Sync
    Set the following environment variables:
    DATA_ROOT_EM: Path to your directory containing .h5 files.
    PROJECT_METADATA_JSON: Path to where you want the metadata "database" (JSON) to reside.
    Start the app and log in as admin (password: admin123).
    Navigate to Project Manager > Volume Tracker.
    Click "Sync with Storage".
    Verify: The "Volume List" should now reflect your physical files (e.g., "228 matching" for the test dataset) and the global progress counts should update accordingly.
  2. RBAC & Persistence
    Log in as any worker (e.g., alex / alex123).
    Verify that the "Sync with Storage" button and sensitive Admin tabs are hidden.
    Refresh the browser and verify the session remains active.
  3. Frontend Integrity
    Run cd client && npm run build to ensure all "rescue" modifications in

Views.js
are syntactically correct.
Verify the Mask Proofreading tab displays the fallback "Disabled" state rather than crashing the application.

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