Skip to content

Wire up the has_hed filter (currently a dead control) #139

Closed

Description

@neuromechanist

Problem

The "Has HED annotation" checkbox in src/components/FilterSidebar.astro (name="has_hed") is a dead control:

  • filterStateToAPIQuery() (src/lib/filters.ts) never sends has_hed to the API.
  • applyClientFilters() has no HED predicate.
  • there is no has_hed field on the Dataset row type.

So checking it filters nothing, and non-HED datasets (e.g. on007058) still show up.

Fix (depends on nemar-cli backend)

Blocked on nemarOrg/nemar-cli#869 (per-version HED detection), which adds has_hed + hed_version to the /datasets API and a server-side ?has_hed=1 filter.

Once that ships:

  1. filterStateToAPIQuery(): when state.hasHed, set q.has_hed = "1" (server-side filter, like modality/license).
  2. Add has_hed (and optionally hed_version) to the Dataset type in src/lib/types.ts.
  3. Optionally surface a HED badge / version on dataset cards and the detail page.

Upstream

nemarOrg/nemar-cli#869 (epic), specifically the API filter phase (nemar-cli#873).

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

    bugSomething isn't workingfeatureNew feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions