-
Notifications
You must be signed in to change notification settings - Fork 366
NAS-139176 / 26.04 / update directory listing to use decrypted names if available #13058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Claude finished @stavros-k's task —— View job Code Review Complete ✅Great fix! The change correctly interprets the 🎯 Key Issue IdentifiedThe The interface currently defines Decrypted?: string; // Already marked optional in latest commitHowever, based on the review comments and the implementation pattern ( Status: ✅ This has already been addressed in the review comments and the interface correctly marks it as optional. ✨ What's Working Well
📝 Test Coverage NoteThe codecov report shows 0% coverage for the changed lines. While this PR's logic is straightforward, the lack of tests for the
Recommendation: Consider adding integration tests or component tests that mock the 🔍 Type Safety ConsiderationAll three implementations use the same safe pattern: name: file.Decrypted ? file.Decrypted : file.NameSince SummaryThis is a solid bug fix that correctly addresses the misinterpretation of the |
| IsDir: boolean; | ||
| Decrypted: boolean; | ||
| // The decrypted name of the file or directory | ||
| Decrypted: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #13058 +/- ##
==========================================
- Coverage 86.69% 86.69% -0.01%
==========================================
Files 1847 1847
Lines 69413 69416 +3
Branches 8584 8587 +3
==========================================
+ Hits 60178 60180 +2
- Misses 9235 9236 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the directory listing functionality to properly handle decrypted file names. The key change is correcting the interpretation of the Decrypted field from a boolean flag to a string containing the decrypted name. When available, the decrypted name is now displayed in the UI instead of the encrypted name, improving user experience for cloud sync and backup operations with encrypted filenames.
Key Changes:
- Updated
CloudSyncDirectoryListinginterface to defineDecryptedas a string type instead of boolean - Modified directory listing logic in three components to display decrypted names when available, falling back to the original name
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/app/interfaces/cloud-sync-task.interface.ts |
Updated Decrypted field type from boolean to string and added clarifying comment |
src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component.ts |
Updated directory node creation to use decrypted name when available |
src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts |
Updated directory node creation to use decrypted name when available |
src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.ts |
Updated directory node creation to use decrypted name when available |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
After figuring out why the UI wouldnt show the decrypted dir names (truenas/webui#13058) I saw that one of my buckets wouldn't show the decrypted names for the root dir, but would for subdirs. It looks like the cryptdecode has a hard limit of 10 items per call (https://github.com/rclone/rclone/blob/28c187b9b49a9785a7f47a802c74e8a8aedf11c6/cmd/cryptdecode/cryptdecode.go#L48). So in this PR i'm batching the file names to cryptdecode. Backport to 25.10.2 would be nice.
AlexKarpov98
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
This PR has been merged and conversations have been locked. |
The decrypted field is the decrypted file name, not whether is decrypted or not.
If it has decrypted name, use that.
A backport to 25.10.2 would be nice!
Before:

After:
