The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-8576-66e46b39331fcee8e0eeee323147a875aa4be04c has succeeded. Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).
Head commit for run: 9562edb6ef4e1a63ddcf4ba6f60fc00b50b3f4dd / yangzhang75 <[email protected]> feat(workflow): match search and listings against the copy on show (#8576) ### What changes were proposed in this PR? A listing is where most people meet a workflow, so it has to agree with what opening it shows. This makes search and the hub match, display and link against the copy on show. - **Search matches the copy the caller may see.** One search returns both the caller's own workflows and public ones, so the filter is a disjunction of guarded filters — the working copy for rows they were granted, the frozen copy for rows they reach only because those are public. Written over bare columns rather than a `CASE`, so each side stays eligible for its own PGroonga index. A pinned workflow no longer turns up on keywords that exist only behind the pin, and the author still finds their own work on what they just typed. - **Listings show the frozen name and description** to a viewer without granted access — the same copy the detail page serves, so a card cannot advertise a title that opening it does not show. Both are NULL while following, which leaves the live values in place. - **The hub is the public shelf**, so everything on it is listed as the public sees it, for the author too: they are looking at the shelf, not at their own dashboard. - **One definition of "the public is behind".** `WorkflowPublishService.pinDiffersFromWorkingCopy` is the share dialog's comparison as a SQL condition, and the search projection and the hub listing both use it, so a card and the dialog cannot disagree about whether edits are held back. ### Any related issues, documentation, discussions? Closes #7940 Part of #7828. Design discussion: #7128. Builds on #7853 and #8575, both merged. ### How was this PR tested? 19 new cases in `WorkflowPublishSpec` plus `WorkflowSearchQueryBuilderSpec` and `UnifiedResourceSchemaSpec` (567 in the dashboard package): - search not matching a public workflow on anything that exists only in unpublished edits, and matching it on its published copy — content, name and description, each separately; - an unpinned public workflow still matching the author's latest, and the author still matching their own workflow on a name only they can see; - a listing showing a public viewer the published name and description, a collaborator the live ones, and a private workflow's own listing untouched; - the drift flag a card carries: true while a pin holds edits back, false for a workflow with nothing frozen, and equal to what the share dialog reports for the same workflow — including after a rename and after a change of view, the two fields most easily left out of one of the three places that answer this. The shared condition was checked by mutation: dropping the default-view term from it turns the card-versus-dialog case red. `scalafmtCheckAll` clean. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/40589871544 With regards, GitHub Actions via GitBox
