fix(frontend, amber, v1.2): source filter owners per resource kind and apply them to datasets - #8061
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
…y them to datasets (#8060) ### What changes were proposed in this PR? The Owner filter on the Datasets pages was broken on both sides: 1. **Wrong list.** `<texera-filters>` always read its Owner and ID dropdowns from `WorkflowPersistService`, so Datasets listed workflow owners and offered a workflow-ID filter. 2. **No effect.** `VersionedResourceSearchQueryBuilder` applied the date, id and full-text filters but dropped `params.owners`, so selecting an owner changed nothing. ``` Before: Datasets -> filters -> workflowPersistService.retrieveOwners() -> workflow owners owner=<email> -> VersionedResourceSearchQueryBuilder -> ignored After: Datasets -> filters -> datasetService.retrieveOwners() -> dataset owners owner=<email> -> VersionedResourceSearchQueryBuilder -> USER.EMAIL predicate ``` Before - <img width="1239" height="533" alt="Screenshot 2026-08-27 at 3 36 49 PM" src="https://github.com/user-attachments/assets/ca1f0055-17d3-46cb-b4c8-65a1005bec5f" /> After - <img width="1227" height="598" alt="Screenshot 2026-08-27 at 4 41 05 PM" src="https://github.com/user-attachments/assets/294335e6-6028-44c2-af46-c2ad19781c97" /> - `filters.component.ts` gains `@Input() entityType`, defaulting to `Workflow`, so the Workflows and unified search pages are untouched. - `VersionedResourceSearchQueryBuilder` adds the `getContainsFilter(params.owners, USER.EMAIL)` the workflow builder already uses. The `USER` join was already in the FROM clause. - The id dropdown hides where no id endpoint exists. Adding `/dataset/user-dataset-ids` and `/model/user-model-ids` is left to a follow-up feature. ### Any related issues, documentation, discussions? Closes #8059. ### How was this PR tested? Five new tests in `filters.component.spec.ts` (owners per kind, ids only for workflows, dropdown hidden for datasets) and three in `DatasetSearchQueryBuilderSpec` (one owner renders the predicate, several OR together but AND with the id filter, none renders nothing). ```bash cd frontend && npx ng test $(grep -rl "FiltersComponent\|DatasetService" src/app | grep "spec.ts$" | sed 's/^/--include /' | tr '\n' ' ') sbt 'testOnly *DatasetSearchQueryBuilderSpec' ``` 909 frontend tests, 21 backend, all passing. Plus `tsc --noEmit`, eslint, prettier, `scalafmtCheck`. Manual: signed in as a user with a shared dataset plus their own workflow, the Datasets page now lists only the dataset's owner, ticking it narrows the list, and the id dropdown is gone. Workflows page unchanged. ### Was this PR authored or co-authored using generative AI tooling? (backported from commit eddec26) Generated-by: Claude Code Opus 5
Contributor
Author
|
The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review. Conflicting files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Automated backport of #8060 to
release/v1.2.Source: eddec26 · automation run
Any related issues, documentation, discussions?
Backport of #8060. Originally linked #8059.
How was this PR tested?
Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.
Was this PR authored or co-authored using generative AI tooling?
No.