fix(frontend): remove the clear button from the dataset version picker - #8343
Conversation
The version dropdown on a dataset's detail page carried nzAllowClear, so clicking the x emitted null into onVersionSelected(version: DatasetVersion), which read this.selectedVersion.dvid and threw an uncaught TypeError. The page was left half-cleared: the main pane said "No version is selected" while the header still showed the cleared version's file path and the file tree still listed its files. Clearing the selection means nothing on a page whose entire content is one version, so the button goes away. onVersionSelected also takes an optional version now and skips the fetch without a dvid, so an empty selection cannot throw even if the control pushes one. This mirrors the model detail page. Closes apache#8342.
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8343 +/- ##
============================================
+ Coverage 94.10% 94.20% +0.10%
Complexity 4809 4809
============================================
Files 1197 1197
Lines 48811 49891 +1080
Branches 5906 6201 +295
============================================
+ Hits 45934 47002 +1068
- Misses 1422 1433 +11
- Partials 1455 1456 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Backport PR opened: draft #8372 (#8372) to |
|
Backport to |
apache#8624) ### What changes were proposed in this PR? Reverts apache#8379. GitHub will not create the `Merge Queue (release)` ruleset it adds — asfyaml has rejected it on every push to main since that PR merged, 38 mails to `commits@` so far, the first 49 seconds after the merge: ``` Validation failed while creating ruleset 'Merge Queue (release)': ['Actor GitHub Actions integration must be part of the ruleset source or owner organization'] ``` The fail-safe ordering apache#8379 built held: the apply aborts on that ruleset, so `Merge Queue` was never shrunk and the release branches were never left uncovered. But the abort takes the whole `github` feature with it, so nothing in `.asf.yaml`'s `github:` block has been applied to this repo since 2026-09-11 — the next label, notification or collaborator change would merge, do nothing, and say so only on a list its author does not read. Two side effects of apache#8379 go with it. The `push-backports` job's permissions were narrowed to `actions`, `contents`, `issues` and `statuses`; commenting on a pull request is scoped by `pull-requests`, not `issues`, so since 2026-09-11 the step that annotates the original PR when a backport fails has taken four 403s and given up with a warning, leaving the step green. The 2026-09-03 failures (apache#8347, apache#8343) did comment and were noticed; apache#8432, apache#8494 and apache#8562 did not. Dropping the block restores the workflow-level scope, which has `pull-requests: write`. The push also goes back to `AUTO_MERGE_TOKEN`, and the `workflow_dispatch` of `Required Checks` that only a `GITHUB_TOKEN` push needed goes with it. This does not revive the backport fast path — that push stays rejected, as it has been since 2026-07-24. Routing a clean backport through a pull request instead is apache#8378's job, and apache#8377 stays open until it lands. ### Any related issues, documentation, discussions? Relates to apache#8377 (closed by apache#8379, not actually fixed) and apache#8379. ### How was this PR tested? `git revert` applies cleanly to main, and the resulting `.asf.yaml` is byte-identical to the commit before apache#8379 — the file was not touched in between — so applying it asks asfyaml for exactly the configuration `GET /repos/apache/texera/rulesets` already returns. `.github/scripts/test_asf_rulesets.sh` is removed with the rest of apache#8379. Its duplicate-key-strict parse of `.asf.yaml` and every workflow is worth keeping and comes back on its own, without the ruleset assertions that no longer have a subject. ### Was this PR authored or co-authored using generative AI tooling? Yes. Generated-by: Claude Code (claude-opus-5)
What changes were proposed in this PR?
The version dropdown on a dataset's detail page carried nzAllowClear, so clicking the × emitted null into onVersionSelected(version: DatasetVersion), which read this.selectedVersion.dvid and threw an uncaught TypeError. The page was left half-cleared: the main pane said "No version is selected" while the header still showed the cleared version's file path and the file tree still listed its files.
Clearing the selection is not a meaningful action on a page whose entire content is one version, so the button goes away. The model detail page already works this way.
dataset-detail.component.html — drop nzAllowClear from the version nz-select.
dataset-detail.component.ts — onVersionSelected takes DatasetVersion | undefined and skips the fetch when there is no dvid, so an empty selection cannot throw even if the control pushes one (an empty version list, for instance). Mirrors model-detail.component.ts.
Picking a version behaves exactly as before: same request, same arguments.
Before — the × in the dropdown, and the page after clicking it (console output overlaid so it fits in one screenshot):
After — same dropdown hovered, no clear button:
Any related issues, documentation, discussions?
Closes #8342
How was this PR tested?
Two cases added to dataset-detail.component.spec.ts:
survives the version select being emptied — onVersionSelected(undefined) neither throws nor fetches. Without the signature change it does not compile.
offers no way to empty the selection — the rendered picker has no clear control.
Also checked by hand against a local stack: hovering the version dropdown on a dataset with two versions no longer offers a ×, switching versions still reloads the file tree and preview, and the console stays clean.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)