Skip to content

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

Merged
aicam merged 3 commits into
apache:mainfrom
tanishqgandhi1908:feat/model-detail-page
Aug 28, 2026
Merged

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

@aicam aicam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aicam
aicam added this pull request to the merge queue Aug 28, 2026
Merged via the queue into apache:main with commit b59c740 Aug 28, 2026
22 checks passed
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Aug 31, 2026
### What changes were proposed in this PR?

Models can now be uploaded to and versioned from the UI. PR 3 of the
ML-model frontend series, on top of apache#8068 and apache#8072, both merged.

**What you can do:** upload files to a model, watch them upload, revert
or delete staged changes, and commit them as a version. A new Settings
tab edits the model's name, description, framework and format. Admin →
Settings gains a Model card for the model upload limits.

**1. Refactor — no behavior change.** The dataset detail page owned the
whole upload machinery. This pulls it out into resource-agnostic pieces,
addressed by a `FileResourceEndpoint` descriptor (base path, name query
param, and the four
`site_settings` keys):

- `service/user/file-resource/multipart-upload.service.ts` — the
~280-line multipart engine, out of `DatasetService`
- `service/user/file-resource/staged-file.service.ts` — diff, revert,
delete
- `component/user/version-uploader/` — the whole "Create New Version"
panel (file picker, progress panels, staged list, version box)
- `component/user/staged-objects-list/` — moved out of `user-dataset/`

**2. Feature — models.** `MODEL_FILE_RESOURCE_ENDPOINT`, `ModelService`
version/framework/format calls, the model page's upload panel and
Settings tab, and the Admin Model upload card.

**Two bugs fixed along the way.**

- Renaming a model while an upload was in flight stranded it. The upload
engine captures the resource name when the upload starts, so the
remaining part and finish calls kept addressing the old name, and the
abort — which reads the name at click time — 404'd as well. The Settings
tab now blocks a rename until the panel is idle.
- Renaming a model left its file tree pointing at the old name. File
paths embed the resource name and both preview and single-file download
resolve by that path, so every file 404'd until the page was reloaded.
The Model Card's "Latest version file" went stale the same way. Renaming
now refreshes both and reopens the file you were reading rather than
resetting to the version's first. The dataset page has the same bug; it
is deliberately left alone here so this PR changes no dataset behavior,
and is queued with three other pre-existing dataset fixes for one
cleanup PR at the end of the series.

**Deliberately not here:** Access & visibility (public/private,
downloadable) lands in PR 4 — both can be set when creating a model,
just not changed afterwards yet. Delete stays on the Models list card.
View and like counts stay static `0` until models reach the hub in PR 5.


<img width="1202" height="703" alt="Screenshot 2026-08-28 at 1 49 22 PM"
src="https://github.com/user-attachments/assets/ea601483-b68b-4d1e-ab49-5f3246e84211"
/>
<img width="1138" height="748" alt="Screenshot 2026-08-28 at 1 49 31 PM"
src="https://github.com/user-attachments/assets/24240b49-acc3-4da9-9b3d-abfa3519cb04"
/>
<img width="1070" height="446" alt="Screenshot 2026-08-28 at 1 55 54 PM"
src="https://github.com/user-attachments/assets/22c4cb19-1dda-4cff-98f6-72d35a57d585"
/>

### Any related issues, documentation, discussions?

Closes apache#6499.

Follows apache#8068 (Models page) and apache#8072 (model detail page), both merged.
Does not touch unified search, so it does not depend on apache#7930.

### How was this PR tested?

532 tests pass across the thirteen affected specs, including 72 in the
new `version-uploader.component.spec.ts`.

Every dataset upload test still exists — they moved to the component
that now owns that code rather than being deleted. That includes the
three `loadUploadSettings` fallback tests, which pin the invariant the
code comments warn about: a failed or unparsable settings fetch must
leave the tuning fields alone, because a NaN concurrency limit stalls
the queue outright (`activeUploads < NaN` is never true). Two `ngOnInit`
assertions changed: the dataset page no longer fetches upload tuning
itself, so it no longer calls
`getPublicSetting` on load; the panel does, when it renders. No dataset
behavior changed.

New coverage: the model endpoint and its own settings keys, version
creation, framework/format editing with rollback on failure, and the
Admin upload cards run against both resource families so one cannot
write the other's keys.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5)

---------

Co-authored-by: Claude Opus 5 <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
…9644)

### What changes were proposed in this PR?

Remove unused and inert SCSS rules, an empty component stylesheet,
unread callback and lifecycle parameters, and a duplicate module import
across the Angular frontend (**+13/-134 lines**). There is no observable
UI or runtime behavior change.

- **Detail-page SCSS selectors:** Remove unmatched `.file-title`,
`.file-size`, `.versions-tab-content`, `nz-layout`, `html, body`,
`.grayed-out`, `.disabled-click`, and `.ant-collapse-content-box` rules
from `DatasetDetailComponent` SCSS, and unmatched
`.versions-tab-content` and `nz-layout` rules from
`ModelDetailComponent` SCSS. Both components use Angular's default
`ViewEncapsulation.Emulated`, `apache#8942` moved the version browser markup
and styles to `VersionsFilesBrowserComponent`, and zero matching
elements remain in either component template.
- **Unused and inert cross-component SCSS rules:** Remove unmatched
`#googleButton`, `.hidden` (dashboard and hub templates use HTML
`hidden` / `[hidden]` / `aria-hidden` attributes rather than a CSS
class), unused Sass variable `$dashboard-navigation-height`,
`.uploaded-files-list`, empty `.file-uploader-banner {}`,
`.dataset-menu-bar`, `.condition-input-popup.fade-out`, and
`.ai-fix-field` (zero template or TypeScript references in
`frontend/src`), along with the `opacity: 1` and `transition: opacity 1s
ease-in-out` declarations on `.condition-input-popup` that only existed
to animate `.fade-out`. Remove emulated `.ant-table-thead > tr > th` and
`.ant-table` rules in `WorkflowExecutionHistoryComponent` SCSS (default
`ViewEncapsulation.Emulated` scopes them to host attributes that cannot
match `nz-table` internal DOM without `::ng-deep`), remove obsolete
`.ant-collapse-content-box` overrides in global `styles.scss`
(`ng-zorro-antd` 21 emits `.ant-collapse-body` with zero
`.ant-collapse-content-box` occurrences), and delete the empty
license-only `hub.component.scss` along with its `styleUrls` entry in
`HubComponent`.
- **Unread subscriber callback parameters:** Drop six unread `(res:
Response)` and `(err: unknown)` parameters in `DatasetDetailComponent`
(`onPublicStatusChange`, `onDownloadableStatusChange`, and
`onPreviouslyUploadedFileDeleted`) that were never read in their
callback bodies.
- **Unread lifecycle parameter and import:** Drop the unread `changes:
SimpleChanges` parameter and orphaned `SimpleChanges` import in
`BrowseSectionComponent.ngOnChanges`, along with two placeholder `{} as
any` arguments in `browse-section.component.spec.ts`.
- **Duplicate module import:** Merge the duplicate `import` from
`ui-udf-parameters-parser.service` in `UiUdfParametersComponent` into
the existing import block from the same module.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Detail SCSS: apache#2413 (2024-02-26), apache#2927 (2024-10-14),
apache#4928 (2026-05-04), apache#7043 (2026-07-30), apache#6953 (2026-08-03), apache#8072
(2026-08-28); other SCSS and empty `hub.component.scss`: apache#1634
(2022-10-04), apache#2413 (2024-02-26), apache#2435 (2024-03-17), apache#2502
(2024-03-27), apache#2571 (2024-04-05), apache#2737 (2024-07-15), apache#2776
(2024-08-19), apache#2878 (2024-09-27), apache#2953 (2024-10-25), apache#3415
(2025-05-03), apache#4484 (2026-05-01), apache#8637 (2026-10-28); unread parameters
and duplicate import: apache#2515 (2024-03-27), apache#3296 (2025-03-10), apache#3363
(2025-04-10), apache#3663 (2025-08-16), apache#6897 (2026-09-21, duplicating apache#7551
from 2026-08-13) |
| Usage removed by | Detail version styles: apache#8942 (2026-10-10,
`refactor(frontend): extract shared VersionsFilesBrowser component`);
`.ant-collapse-content-box`: apache#5895 (2026-06-22, `chore: upgrade
ng-zorro-antd to 21.3.1`); remaining selectors, empty
`hub.component.scss`, unread parameters, and duplicate import: unused or
inert since introduction or prior UI refactors |

As of 2026-11-23, the `.ai-fix-field` rule has been unused for about 4
weeks, the orphaned detail-page version styles for 6 weeks, the
duplicate import for 2 months, the obsolete `.ant-collapse-content-box`
rules for 5 months, and the remaining rules and unread parameters for 15
to 49 months.

### Any related issues, documentation, discussions?

Closes apache#9643.

### How was this PR tested?

Ran in `frontend/` on `ff6361f2ea` (Node 24, `node
.yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds`):

```bash
node .yarn/releases/yarn-4.14.1.cjs format:ci
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.app.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.spec.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs build
node .yarn/releases/yarn-4.14.1.cjs test
```

- `format:ci` (`prettier-eslint --list-different` and `eslint ./src`):
passed.
- `tsc --noEmit` (`src/tsconfig.app.json` and `src/tsconfig.spec.json`):
passed.
- `build` (production Angular AOT build): passed.
- `test` (Vitest, JUnit XML): `255` suites passed (`7,385` passed, `0`
failed, `0` errors, `1` pre-existing skipped in untouched
`operator-property-edit-frame.component.spec.ts`).

Review follow-up `aacada02e9` only removes the two inert declarations on
`.condition-input-popup`; it was checked locally with `prettier --check`
(3.2.5) and a `sass` (1.71.1) compile of the changed stylesheet, and CI
runs the full build and tests on the new head.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Antigravity (Gemini 4 Neon)
Generated-by: Claude Code (Opus 5.5), review follow-up `aacada02e9`

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove redundant code from the frontend, the licensing scripts, two
Scala sources and the agent service (**+26/−41 lines**). There is no
behavior change.

- **Dataset and model detail pages:** each `route.params` emission was
switched to `this.route.data`, and the empty `.subscribe()` threw away
what that emitted. The pages now `tap` the params, so the same fetches
run in the same order without the extra subscription. The dataset page's
`THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and
the hub spec import the copy in `hub-workflow-detail.component.ts`,
never this one.
- **Version uploader:** the abort handler's 404 branch called `done()`
and returned, which is what the handler already does for every error it
does not retry. Its three constants become file-local: nothing imported
`FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two.
The spec now states the retry policy it expects.
- **Computing-unit actions:** `confirmAndTerminate` reads
`unit.computingUnit.uri` and `unit.computingUnit.name` before
`unit?.computingUnit.type`, so the `?.` goes.
- **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec
imported it, and the spec now checks the backend's `"LoopEnd"` name
directly.
- **Agent interaction:** two imports from `agent.service` become one.
- **Licensing scripts:** `audit_jar_licenses.py` stored each group's
notice hash in a field that nothing reads, and the NOTICE test helper
`make_jar` had an `extra` parameter that no caller passes.
- **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import
javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers.
- **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms
list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case
AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`.
The `_` matches those types as well, so each becomes `case _`.
- **`agent-service/.dockerignore`:** Docker reads the ignore file at the
root of the build context. CI's image matrix
(`build-and-push-images.yml`) and `bin/build-images.sh` both use the
repository root as the context, and the agent Dockerfile copies
`agent-service/...` paths from there, so the root `.dockerignore`
applies and this file is never read.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269
(2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05),
moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09);
loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13);
licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10);
`PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013
(2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25);
`agent-service/.dockerignore`: apache#4495 (2026-04-28) |
| Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01)
added the agent image's Dockerfile with paths from the repository root,
so no build has read the file. Everything else: unused or redundant
since introduction. |

As of 2026-11-25:
- The SQL sources' fallback arms have listed redundant types for over 5
years.
- The dataset page's discarded subscription is almost 3 years old.
- The version uploader's 404 branch has been redundant for over 10
months.
- `agent-service/.dockerignore` has gone unread for almost 7 months.
- The duplicate agent import is 12 days old.

### Any related issues, documentation, discussions?

Closes apache#9691.

### How was this PR tested?

Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24
with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff`
0.14.7; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
pytest bin/licensing
ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py
python bin/licensing/audit_jar_licenses.py <directory of 60 jars>
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check"
```

- **Frontend:** the six specs run 379 tests, all passing on both sides.
Both typechecks, prettier-eslint and ESLint pass.
- **Python:** the licensing tests run 53 tests and 5 subtests, all
passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints
the same report on both sides for 60 jars from the local Coursier cache.
- **Scala:**
  - The 11 `source.sql` suites run 204 tests, all passing on both sides.
- The two PVE resource suites run 75 tests on both sides: 74 pass and 1
is canceled. The canceled test needs a file that is not executable,
which this Windows filesystem cannot represent.
  - scalafmt and scalafix pass on both modules.
- **`agent-service/.dockerignore`:** no image was built. The build
context comes from `context="."` for every
`bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from
the `..` that `bin/build-images.sh` passes from `bin/`.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
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.

3 participants