Skip to content

Phase 3 file modals: Vis/View buttons in BIDS tree + FileVis/FileView dialogs #25

Closed

Description

@neuromechanist

Tracking the second half of original Phase 3 (issue #4 / PR #11). The data-quality half (QualityPanel + charts) shipped via #24.

Scope

Per-file inspection from the BIDS tree:

  1. Modify src/lib/render-tree.ts so leaf .set rows emit Vis and View action buttons with data-open-vis="<bids-path>" / data-open-view="<bids-path>" attributes. (Today the tree is rendered as a static string by render-tree.ts rather than as the Phase 3-era component-based BidsDirChildren.astro.)
  2. Port FileVisModal.astro from the original Phase 3 branch (feature/issue-4-phase3-qa-hed, commit e374c50): a <dialog> showing the 4-stat strip + 5 SVG plots per file.
  3. Port FileViewModal.astro: TSV preview (first 100 rows) with sticky header.
  4. Mount both modals in [id].astro alongside QualityPanel.
  5. Add a client-side script that:
    • Listens for clicks on [data-open-vis] / [data-open-view] inside the BidsTree placeholder
    • Fetches per-file data via getFileQa / TSV via direct manifest URL
    • Populates and opens the matching modal

Out of scope

References

  • Original Phase 3 components: feature/issue-4-phase3-qa-hed branch — src/components/FileVisModal.astro, src/components/FileViewModal.astro (those files were deliberately not copied into phase 3: QualityPanel with runtime aggregator from per-file dataqual #24 to keep the PR focused)
  • BIDS tree render today: src/lib/render-tree.ts (string templates) consumed by src/pages/api/dataset/[id]/tree.ts

Activity

  1. neuromechanist commented on Jul 30, 2026

    @neuromechanist
    ContributorAuthor

    Closing as superseded. Per-file inspection from the BIDS tree shipped, but by a different route than this issue specified, so none of the five steps above map onto the code as written.

    What actually landed:

    • "View" half — BidsTree.astro renders each leaf as a .tree__preview-btn; clicking expands an inline preview that renders markdown, JSON, and TSV in place. No FileViewModal.astro, no data-open-view attribute, no 100-row cap.
    • "Vis" half — the Zarr-backed WebGL signal viewer (src/lib/eeg-viewer/), mounted into the page-level EegViewerDialog.astro. That is a live, scrubbing, montage-aware trace viewer with topomaps, not the five static SVG plots FileVisModal.astro was going to draw.

    The reference implementation this issue pointed at is also no longer reachable in the shape described: src/lib/render-tree.ts was replaced by the component-based BidsTree.astro / BidsDirChildren.astro pair, so step 1 has no file to modify.

    The one thing genuinely not delivered is the per-file QA stat strip (the 4 stats + quality plots). That depends on nemarOrg/nemar-cli#511 (/qa/* endpoint), which is still not started; src/lib/qa.ts and the fixtures under test/fixtures/ hold the contract for when it lands. Tracking that against #511 rather than keeping this issue open, since reviving it would mean re-specifying against components that no longer exist.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions