yangzhang75 opened a new pull request, #8576:
URL: https://github.com/apache/texera/pull/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. Stacked on #7853 and #8575; until 
those merge this PR
   shows their commits too, and the review here is the last one.
   
   ### How was this PR tested?
   
   22 new cases in `WorkflowPublishSpec` plus `WorkflowSearchQueryBuilderSpec` 
and
   `UnifiedResourceSchemaSpec` (559 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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to