feat(frontend): add the Models page - #8068
Merged
Merged
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
Author
|
/request-review @aicam |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8068 +/- ##
============================================
+ Coverage 93.43% 93.45% +0.02%
Complexity 4710 4710
============================================
Files 1181 1193 +12
Lines 47801 48105 +304
Branches 5326 5343 +17
============================================
+ Hits 44663 44958 +295
- Misses 1698 1707 +9
Partials 1440 1440
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Aug 28, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Aug 28, 2026
### What changes were proposed in this PR? **Refactor.** `user-dataset-file-renderer`'s `did`/`dvid` inputs become `resourceId`/`versionId`, so a model no longer has to smuggle its ids through dataset-shaped names. `download` moves onto the resource descriptor: `card-item` and `list-item` both carried a `workflow`/`dataset` branch, and both now ask `descriptor.download`. One deliberate behavior change: the branch read `entry.workflow.workflow.name`, which a rename leaves stale, so downloading a just-renamed workflow produced a zip named after the old name. It now reads `entry.name`. Covered by a test. **The model detail page.** A read-only page at `/user/model/:mid`: name, created-at, public/downloadable/framework/format tags, placeholder view and like counters, cover image; a Model Card tab; and a Versions & Files tab with the version picker, file tree, file preview, and single-file and version-ZIP downloads. `ModelService` gains the read endpoints, `DownloadService` the three model downloads, and `ModelResourceDescriptor` a `privateRoute` — so the cards added in apache#8068 now open something. The file renderer takes a `resourceType` input, but resolves its fetch through a new `retrieveSingleFile` descriptor slot rather than growing a `type === "model"` arm, which is the point of the registry. **No Settings tab yet, on purpose.** Metadata editing (name, description, framework, format) lands with upload in the next PR; visibility, sharing and covers in the one after. **View and like counters read a constant `0`, deliberately.** The hub backend has no model entity — `hub/EntityType.scala` is `Seq(Workflow, Dataset)` with a throwing `fromString`, `EntityTables.forType` matches only those two, and there are no `model_user_likes` / `model_view_count` tables, so every hub call from this page would 400. The tags are there so the header matches the dataset page; they get wired up in the hub PR, alongside apache#7930. <img width="807" height="647" alt="Screenshot 2026-08-28 at 11 19 16 AM" src="https://github.com/user-attachments/assets/a22ec4e3-eccc-4a5d-bcb5-3fc5147921f6" /> <img width="1210" height="602" alt="Screenshot 2026-08-28 at 11 18 45 AM" src="https://github.com/user-attachments/assets/eaabec50-7c93-4d36-aa67-11650e4500d7" /> <img width="1228" height="687" alt="Screenshot 2026-08-28 at 11 18 33 AM" src="https://github.com/user-attachments/assets/8974de85-9633-4439-8a4d-4dec0d03e129" /> ### Any related issues, documentation, discussions? Part of apache#6499. Depends on apache#8068. ### How was this PR tested? New: 26 specs for the detail page, 7 for the new `ModelService` methods, 3 for the model downloads, 2 for the renderer's model branch, plus registry coverage for `download` and `retrieveSingleFile`. The refactor's proof is that all 353 existing `user-dataset` specs pass unmodified. Four specs elsewhere needed scaffolding changes, none of them changed expectations: three `card-item` template tests set `entry` without running the input pipeline and now call `initializeEntry()` (a pattern already used in that file), and one `list-item` test moved from `(component as any).downloadService` to `TestBed.inject(DownloadService)`,since the component no longer injects it. Full dashboard and hub suite: 1880 tests, all passing. Verified manually against a local stack. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code
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?
Adds the Models page: list, search, create, rename, delete.
To get there without adding a third
type === "..."arm everywhere, each resource kind now supplies a descriptor — icon, routes, ownership, rename, description, filter sources — aggregated byResourceRegistryService.card-item,list-itemandfiltersread that instead of branching on the entry type. Workflow, dataset, project and file behave exactly as before; models are just one more descriptor.The page lists from
/model/listand filters client-side, so models stay out of global search until the hub backend lands. That endpoint is now scoped to what the caller was granted:ResourceAccess.listVisibletakes anincludePublicflag, defaulted so/dataset/list— whose picker legitimately offers public datasets to read as workflow input — is unchanged. Your Work → Models therefore shows your own and shared models only, exactly like Your Work → Datasets.The sidebar and cards use Material Symbols
hub(Apache-2.0, attributed inLICENSE), registered once throughNzIconService. ng-zorro has no icon that reads as an ML model, and the denser Material glyphs are illegible at the sidebar's 15px.Any related issues, documentation, discussions?
Groundwork for #6499; does not close it.
models_enabledships false until the detail page lands./user/model/:midhas no component yet, so the model descriptor deliberately carries noprivateRoute— a model card does not navigate, rather than hitting the**wildcard and landing on Workflows — and creating a model refreshes the list instead. The flag is toggleable live in Admin → Settings, and hides the sidebar entry, not the route, same asdatasets_enabled.How was this PR tested?
56 new tests across the registry,
ModelService, the Models page and the create modal.Regression: 417 frontend tests across 15 spec files covering card/list items, filters, search and the sidebar, and 23 in
ModelResourceSpec. Plustsc --noEmit, eslint, prettier andscalafmtCheck.Four spec edits. Three are fixture or tab-count updates. The fourth is a behavior change stated on purpose:
"listModels should include public models owned by another user"is inverted toomit, since that assertion described the bug above; it now also checks the model is still reachable throughgetPublicModel, so public discovery stays covered.Manual: Admin → Settings → Models on, create a model, search it by framework, switch card/list views, rename inline, delete.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code Opus 5