Skip to content

fix(dataset): load cover image on detail page for private datasets#5284

Merged
aicam merged 3 commits into
apache:mainfrom
xuang7:fix/dataset-cover-private-403
May 29, 2026
Merged

fix(dataset): load cover image on detail page for private datasets#5284
aicam merged 3 commits into
apache:mainfrom
xuang7:fix/dataset-cover-private-403

Conversation

@xuang7
Copy link
Copy Markdown
Contributor

@xuang7 xuang7 commented May 28, 2026

What changes were proposed in this PR?

This PR fixes the cover image failing to load on the dataset detail page for private datasets, and removes the default placeholder shown when no cover image is set.

Changes:

  • Adds a JWT-aware endpoint GET /dataset/{did}/cover-url that returns the presigned S3 URL as JSON. The detail page calls it via Angular HttpClient (which carries the JWT), then sets the returned URL on <img src> (presigned URL needs no auth).
  • Removes the meaningless default blue placeholder on the detail page: if no cover image is set, nothing is rendered.
  • The existing 307-redirect endpoint /cover is preserved for the hub browse page, which serves only public datasets and consumes the redirect directly. Both endpoints now have doc comments cross-referencing each other.

Demo:
With cover image:
with-cover

Without cover image:
without-cover

Any related issues, documentation, discussions?

Closes #5283

How was this PR tested?

Added test cases for the new endpoint.
Manually verified on a local instance.

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

Generated-by: Claude Opus 4.7

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI platform Non-amber Scala service paths labels May 28, 2026
@xuang7 xuang7 requested a review from aicam May 28, 2026 23:10
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 28, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.12%. Comparing base (ec12c88) to head (ab8b5eb).

Files with missing lines Patch % Lines
.../dashboard/service/user/dataset/dataset.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5284   +/-   ##
=========================================
  Coverage     49.12%   49.12%           
- Complexity     2378     2379    +1     
=========================================
  Files          1051     1051           
  Lines         40348    40350    +2     
  Branches       4279     4279           
=========================================
+ Hits          19821    19822    +1     
- Misses        19368    19369    +1     
  Partials       1159     1159           
Flag Coverage Δ *Carryforward flag
access-control-service 41.89% <ø> (ø)
agent-service 33.76% <ø> (ø) Carriedforward from ec12c88
amber 51.56% <ø> (ø) Carriedforward from ec12c88
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 38.42% <100.00%> (+0.42%) ⬆️
frontend 41.07% <0.00%> (-0.01%) ⬇️
python 90.79% <ø> (ø) Carriedforward from ec12c88
workflow-compiling-service 56.81% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

@aicam aicam left a comment

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 May 28, 2026
Merged via the queue into apache:main with commit 4cc7539 May 29, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover image fails to load on dataset detail page for private datasets

3 participants