Skip to content

Restrict Train Aligners to datasets with manual alignments - #176

Open
BeckettFrey wants to merge 1 commit into
developfrom
feature/train-aligners-manual-filter
Open

Restrict Train Aligners to datasets with manual alignments#176
BeckettFrey wants to merge 1 commit into
developfrom
feature/train-aligners-manual-filter

Conversation

@BeckettFrey

Copy link
Copy Markdown
Member

No description provided.

Implements the counter-proposal from #166 instead of gating the sidebar
step. Train Aligners stays reachable and browsable; the constraint is
enforced where the user is already looking, at the point of selection.

Both dropdowns now filter:

- Dataset dropdown lists only datasets carrying at least one hand or
  corrected alignment.
- Alignment dropdown lists only that dataset's manual alignments.

An inline note above the dataset dropdown states the rule and the
consequence, and is repeated as the dropdown's tooltip. Inline rather than
tooltip-only on purpose: the message explains an absence, and a user whose
dataset is missing has no reason to hover a control to find out why -- when
the list is empty the dropdown is disabled anyway.

The predicate lives in storage/alignments.py as is_manual_alignment, with
list_manual_alignments and has_manual_alignments over it. It is defined as
"not automatic" rather than an allow-list of {hand, corrected}, because
create_corrected_alignment takes an arbitrary alignment_type string -- the
Correct Alignments page exposes it as free text defaulting to "corrected",
so values like "corrected-v2" reach storage and an allow-list would
silently hide real hand-corrected work.

The two empty states stay distinct. "No datasets registered" and "No
datasets with manual alignments" are different problems: telling a user who
already has datasets that none are registered would send them off to
register a duplicate.

Also folds the dataset-population logic in build_ui and reload_datasets
into one method. Those two copies had already drifted -- build_ui showed
Name/Date/Description while reload_datasets showed Name/Description/ID, so
the columns changed under the user on tab switch. Both now use the
Name/Date/Description form the other stackers use.

Verified end to end against real storage, not just the mocks: a dataset
whose only alignment is automatic is excluded from the dropdown, and one
with a hand alignment is listed with that alignment selectable.
@BeckettFrey BeckettFrey changed the title feat: restrict Train Aligners to datasets with manual alignments Restrict Train Aligners to datasets with manual alignments Aug 24, 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