Skip to content

fix(frontend): remove the clear button from the dataset version picker - #8343

Merged
aicam merged 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/dataset-version-clear
Sep 3, 2026
Merged

aicam merged 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/dataset-version-clear

Conversation

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor

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):

image image

After — same dropdown hovered, no clear button:

image

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.

cd frontend
npx ng test --include src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
# Tests  144 passed (144)

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)

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.
@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Sep 2, 2026
@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Sep 2, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 September 2, 2026 18:58
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. Requested review from @mengw15.
release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. Requested review from @xuang7.

Auto-label run.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@codecov-commenter

codecov-commenter commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.20%. Comparing base (30681cd) to head (af82e75).
⚠️ Report is 65 commits behind head on main.

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     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 30681cd
agent-service 99.32% <ø> (ø) Carriedforward from 30681cd
amber 90.05% <ø> (ø) Carriedforward from 30681cd
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 30681cd
config-service 87.00% <ø> (ø) Carriedforward from 30681cd
file-service 87.91% <ø> (ø) Carriedforward from 30681cd
frontend 96.96% <100.00%> (+0.09%) ⬆️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 30681cd
pyamber 98.47% <ø> (ø) Carriedforward from 30681cd
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 30681cd

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aicam aicam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aicam
aicam added this pull request to the merge queue Sep 3, 2026
Merged via the queue into apache:main with commit 83e71c2 Sep 3, 2026
39 of 48 checks passed
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backport PR opened: draft #8372 (#8372) to release/v1.2, assigned to @tanishqgandhi1908 — needs manual work because the cherry-pick conflicts.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backport to release/v1.3 failed. See job log.

@xuang7 xuang7 removed the release/v1.2 back porting to release/v1.2 label Sep 18, 2026
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 21, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clearing the version selector on a dataset's detail page throws a TypeError

5 participants