yangzhang75 opened a new pull request, #7857:
URL: https://github.com/apache/texera/pull/7857

   Part of #7828. Stacked on #7856 — the review here is the last commit, 
`feat(workflow): match search and listings against the copy on show`.
   
   Search and the listings it feeds read the author's live columns. For a 
pinned workflow that is the one copy the public cannot open: a draft would turn 
up in a public search under a title nobody has seen, and the card would 
advertise a name the detail page does not show.
   
   ## One filter, applied to the copy the caller may see
   
   `onVisibleCopy` builds each filter twice — over the live columns for rows 
the caller was granted access to, over the frozen ones for rows they reach only 
because the workflow is public — and ORs the two. A disjunction over bare 
columns rather than a `CASE`, so each side stays eligible for its own fulltext 
index. Unpinned public rows fall back to the live columns, so a following 
workflow searches exactly as it does today.
   
   This covers both halves of what public search indexes: the words in a 
workflow, and the operators in it.
   
   ## Two more things listings carry
   
   From the same query, no second round trip:
   
   - the frozen name and description, shown to a viewer without granted access, 
so a listing agrees with what opening it shows;
   - whether the copy on show is behind the author's working copy — an 
aggregate, which is what a hub card needs to know to open the copy it is 
advertising.
   
   The hub's own listing query gets the same treatment. It is the public shelf, 
so everything on it is listed as the public sees it — the author included, who 
is looking at the shelf and not at their own dashboard.
   
   `constructWhereClause` takes `includePublic` for this; the dataset and 
project builders accept and ignore it.
   
   ## Tests
   
   +27 backend cases. Search: a draft is unfindable by a keyword or an operator 
that exists only in it, while the author still finds their own; a pinned 
workflow matches its frozen title and not its live one, and an unpinned one 
matches its live title. Listings: the frozen values shown to a stranger and the 
live ones to the author and to a collaborator; drift reported only for a 
workflow that actually has a frozen copy. Plus the record-mapping cases, 
including that an unknown access answer counts as public — the reverse is the 
leak.
   


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