Skip to content

This PR tightens several workflow contracts across the desktop app so local file-backed usage is more predictable and less brittle.#134

Merged
akgohain merged 6 commits intomainfrom
fix/neuroglancer-public-url
Mar 26, 2026
Merged

This PR tightens several workflow contracts across the desktop app so local file-backed usage is more predictable and less brittle.#134
akgohain merged 6 commits intomainfrom
fix/neuroglancer-public-url

Conversation

@akgohain
Copy link
Copy Markdown
Collaborator

GPT summarizes as the following, but TLDR is that this is some cleanup of some backend bugs along with finally removing the label prompt from inference tab (obviously never needed in inference for pytc models...):

What Changed

Inference

  • Removed label input from the inference setup flow
  • Ensured inference config preparation clears any stale persisted label path
  • Kept training label behavior unchanged

File Classification

  • Reworked /check_files label detection to use generic integer-volume heuristics instead of the old brittle behavior
  • Added regression coverage using the SNEMI fixture without hardcoding a user-specific fixture path

Workspace Hygiene

  • Added DELETE /files/workspace to clear indexed mounted content and app-managed uploads for the current workspace
  • Preserved mounted source directories on disk
  • Filtered known OS junk files like .DS_Store and Thumbs.db during upload, mount, and listing
  • Added a secondary Reset Workspace action in Files Manager instead of promoting destructive bulk actions in the main toolbar

Files Manager Scalability

  • Extended GET /files with optional parent=<root|id> support
  • Switched Files Manager and the sidebar tree to lazy folder loading
  • Removed dependence on the initial full workspace dump
  • Added regression coverage for parent-scoped file listing and initial Files Manager loading

Neuroglancer URL Contract

  • Added PYTC_NEUROGLANCER_PUBLIC_BASE
  • Backend now normalizes Neuroglancer viewer URLs using either:
    • PYTC_NEUROGLANCER_PUBLIC_BASE, or
    • the incoming request scheme/host with Neuroglancer port 4244
  • Removed the frontend localhost host-rewrite hack
  • Documented the new runtime setting

Validation

Backend:

  • PYTHONPATH=. uv run pytest -q tests/test_runtime_settings.py tests/test_neuroglancer_url_contract.py tests/test_file_workspace_routes.py tests/test_check_files_route.py tests/test_pytc_runtime_routes.py

Frontend:

  • CI=true npx react-scripts test --watch=false --runInBand --runTestsByPath src/views/FilesManager.test.js src/components/InputSelector.test.js src/configSchema.test.js
  • npm run build

@akgohain akgohain merged commit 6fe2469 into main Mar 26, 2026
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