tanishqgandhi1908 opened a new pull request, #8299:
URL: https://github.com/apache/texera/pull/8299
### What changes were proposed in this PR?
Models can now be shared, published and given a cover image. The three
surfaces that grew a per-type branch for each new resource kind move onto the
resource-descriptor registry instead, so the model arm is a descriptor rather
than another `if (type === ...)`.
**Refactor:** `ResourceDescriptor` gains `isPublic`/`setPublished`,
`coverUrl`/`setCover` and `affordances`. `ShareAccessComponent`'s four
publish/unpublish methods become one `setPublished(next)`, and it stops
injecting `WorkflowPersistService` and `DatasetService`. `card-item` and
`list-item` build one share-modal config instead of two and gate the Share
button on the descriptor, which retires the dead button on file cards.
`browse-section` asks the descriptor for a cover instead of concatenating a
URL, so the hub and the cards render the same picture.
**Feature:** `ModelService` gains publicity, downloadable, cover and owners
calls; the model detail page gets an **Access & visibility** card; and the file
tree's existing "Set as cover" control is wired up.
Three deliberate behavior changes, worth a reviewer's attention:
- Publishing a **dataset or model** no longer warns about "the right to
clone your work". Only workflows are clonable — `cloneWorkflow` is the only
clone in the codebase, and `cloneCount` is hardcoded to 0 for every
other kind — so datasets were being warned about a capability that does
not exist.
- The share modal's Private card read `this workflow {{ type }}`, rendering
"this workflow dataset". The stray word is removed.
- A `file`-typed share email no longer appends a broken `<origin>/<id>`
link, since the file descriptor has no private route.
Published models are not discoverable yet: `listModels` passes
`includePublic = false` and models have no hub surface, so publishing makes a
model readable by direct URL only. Discovery arrives with the hub PR.
<img width="1238" height="672" alt="Screenshot 2026-08-31 at 11 37 25 AM"
src="https://github.com/user-attachments/assets/5786cfca-9582-4213-a2fb-165146ee41aa"
/>
<img width="910" height="525" alt="Screenshot 2026-08-31 at 11 37 35 AM"
src="https://github.com/user-attachments/assets/a0865622-b80f-4375-b406-4a48908e3178"
/>
<img width="695" height="806" alt="Screenshot 2026-08-31 at 11 41 34 AM"
src="https://github.com/user-attachments/assets/3fa68e48-d974-4ac2-8847-e9f42cef4919"
/>
<img width="770" height="249" alt="Screenshot 2026-08-31 at 11 42 05 AM"
src="https://github.com/user-attachments/assets/31a5d4f1-7720-4356-b483-3966249dd59c"
/>
### Any related issues, documentation, discussions?
Part of #6501. Fourth in the model frontend series.
### How was this PR tested?
New tests: model publicity/downloadable/cover/owners requests in
`model.service.spec`; both toggles with a rejected-request rollback, cover path
prefixing and the no-version guard in `model-detail.component.spec`;
descriptor slot presence, the `clonable` affordance and model delegation in
`resource-registry.service.spec`; and the clone-warning copy in
`share-access.component.spec`. The share-access publish tests moved onto
`setPublished`, and the browse-section cover specs now assert the resolved URL
rather than a concatenated one.
2746 tests pass across `dashboard`, `hub`, `common` and the workspace
menu/power-button specs. `tsc --noEmit` and Prettier are clean.
Manually verified: sharing a model with a second user (grant, level change,
revoke), publishing from both the share modal and the Settings tab, the
downloadable toggle as owner and as a collaborator, setting a cover from a
committed image and seeing it on the detail page and the model card, and
regression checks on dataset and workflow sharing, publishing and covers
including the workspace's in-canvas publish state.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)
--
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]