feat(cloud): add SHA-256 file integrity checksum verification UI (#282) - #289
Conversation
|
kindly review this pr. |
DenizAltunkapan
left a comment
There was a problem hiding this comment.
Thanks for this, the checksum flow is a nice addition and the dialog states (loading / error / result / verify) are well thought out.
Before I can approve there are a few things to sort out.
1. Merge conflicts (blocking)
The branch is out of date with main and conflicts in five files, all from the recent cloud work that already landed:
- frontend/src/app/pages/cloud/cloud.component.ts
- frontend/src/app/pages/cloud/cloud.component.html
- frontend/src/app/pages/cloud/cloud.component.spec.ts
- frontend/src/app/services/cloud.service.ts
- frontend/src/app/services/cloud.service.spec.ts
Please rebase onto latest main and resolve these. Since the conflicts touch the same regions as the virus-scan and unsaved-edit changes, double check nothing gets dropped on either side while resolving, and rerun the full spec suite afterwards.
The inline comments below can be handled in the same pass.
|
@priyanshuvishwakarma273403 thanks for resolving the conflicts, but the resolution dropped tests that are on main. cloud.component.spec.ts on main has three describe blocks (virus scan, Secure Send Flow, unsaved-edit guard), your branch now only keeps the virus scan one. The Secure Send and unsaved-edit guard specs from #287 and #290 are gone, and CI is green simply because deleted tests cannot fail. Please restore those two blocks from main and merge your checksum specs alongside them. Also, the four inline comments from my review are still unaddressed. Happy to take another look once both are in. |
…nd address code review feedback
DenizAltunkapan
left a comment
There was a problem hiding this comment.
Thanks for the follow-up, this is close now. The spec blocks from main are all restored (virus scan, Secure Send, unsaved-edit guard) alongside the new checksum specs, the conflict resolution is clean with no production code lost, and the dialog dismiss now routes through onChecksumDialogHide with a full reset. The checksumRequestId guard against stale responses is a nice extra.
One item from the earlier review is still open: the clipboard copy reports success unconditionally. Details inline. Fix that and I am happy to approve.
📌 Description
This PR resolves #282 by adding a complete file integrity verification feature to the Cloud page UI. Users can now compute, view, copy, and compare the SHA-256 checksum of any stored file directly from the Cloud interface.
🚀 Key Changes
1. Service Layer & DTO (
CloudService&FileChecksumDto)FileChecksumDto(filePath,checksum,algorithm).getFileChecksum(filePath: string)method inCloudServiceconsuming the backend SHA-256 checksum endpoint (GET /api/files/checksum?path=...).checksum,hash,sha256).2. UI Action & Checksum Dialog (
CloudComponent)pi pi-shield) to every file entry row in the Cloud file browser table.p-dialog):pi pi-copy) with instantUiToastServicefeedback.