Skip to content

feat(frontend): add the model detail page - #8072

Open
tanishqgandhi1908 wants to merge 3 commits into
apache:mainfrom
tanishqgandhi1908:feat/model-detail-page
Open

feat(frontend): add the model detail page#8072
tanishqgandhi1908 wants to merge 3 commits into
apache:mainfrom
tanishqgandhi1908:feat/model-detail-page

Conversation

@tanishqgandhi1908

@tanishqgandhi1908 tanishqgandhi1908 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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 #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 #7930.

Screenshot 2026-08-28 at 11 19 16 AM Screenshot 2026-08-28 at 11 18 45 AM Screenshot 2026-08-28 at 11 18 33 AM

Any related issues, documentation, discussions?

Part of #6499. Depends on #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

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Neilk1021, @mengw15, @eugenegujing
    You can notify them by mentioning @Neilk1021, @mengw15, @eugenegujing in a comment.

@github-actions github-actions Bot added feature frontend Changes related to the frontend GUI docs Changes related to documentations platform Non-amber Scala service paths labels Aug 28, 2026
@github-actions github-actions Bot removed docs Changes related to documentations platform Non-amber Scala service paths labels Aug 28, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.51337% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.52%. Comparing base (b3ff4b7) to head (e5973dd).

Files with missing lines Patch % Lines
...el/user-model-explorer/model-detail.component.html 91.35% 14 Missing ⚠️
...odel/user-model-explorer/model-detail.component.ts 90.84% 8 Missing and 5 partials ⚠️
...ashboard/service/user/download/download.service.ts 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8072      +/-   ##
============================================
- Coverage     93.52%   93.52%   -0.01%     
  Complexity     4709     4709              
============================================
  Files          1193     1195       +2     
  Lines         48113    48463     +350     
  Branches       5344     5378      +34     
============================================
+ Hits          45000    45324     +324     
- Misses         1671     1693      +22     
- Partials       1442     1446       +4     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from b3ff4b7
agent-service 99.32% <ø> (ø) Carriedforward from b3ff4b7
amber 89.59% <ø> (ø) Carriedforward from b3ff4b7
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from b3ff4b7
config-service 86.73% <ø> (ø) Carriedforward from b3ff4b7
file-service 87.91% <ø> (ø) Carriedforward from b3ff4b7
frontend 95.86% <92.51%> (-0.06%) ⬇️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from b3ff4b7
pyamber 98.54% <ø> (ø) Carriedforward from b3ff4b7
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from b3ff4b7

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor Author

/request-review @aicam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants