Ma77Ball opened a new pull request, #5704:
URL: https://github.com/apache/texera/pull/5704
### What changes were proposed in this PR?
- Add a `workflow_cover_image(wid, image)` table (cover stored as a
downscaled JPEG data URL, FK to `workflow` with `ON DELETE CASCADE`) in
`texera_ddl.sql` plus a `sql/updates/25.sql` migration.
- Add access-gated `GET`/`PUT`/`DELETE /workflow/{wid}/cover` endpoints on
`WorkflowResource`: read access to fetch (404 when unset), write access to
set/delete, with data-URL and size validation on set.
- Add `WorkflowCoverService` (frontend) that downscales/re-encodes the
chosen file to a small JPEG data URL before upload, fetches the cover, and
clears it.
- Add hover controls on the workflow card (camera to pick an image, rollback
to reset), shown only to the owner in private search; `previewImage` now
prefers the stored cover.
### Any related issues, documentation, discussions?
Closes: #5703
### How was this PR tested?
- Run `cd frontend && yarn test
--include='**/workflow-cover.service.spec.ts' --watch=false`, expect the
WorkflowCoverService specs to pass (GET maps the image, 404 resolves to
undefined, DELETE is issued).
- Manual: open the dashboard in private search as a workflow owner, hover a
card, click the camera icon, pick an image, expect the card preview to update;
reload in another browser and expect the same cover (synced via backend).
- Manual: click the rollback icon, expect the card to revert to the default
background and the cover to be gone after reload.
- Note: the three new `WorkflowResource` cover endpoints have no automated
backend test (no DB-backed test harness exists for these jOOQ endpoints); they
were exercised manually only.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF
--
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]