[PM-23631] Delete unused jslib models and misc code#819
Merged
Conversation
- Delete cipher.ts, cipherView.ts, sortedCiphersCache.ts - Delete search-ciphers.pipe.ts and icon.component files - Remove cipher methods from StateService abstractions and implementations - Remove unused IconComponent and SearchCiphersPipe from app.module.ts - Preserve ciphers property in AccountData as 'any' type for data compatibility
…slib - Delete cipherData.ts, cipherResponse.ts, linkedIdType.ts - Delete field-related files (fieldData.ts, field.ts, fieldApi.ts, fieldView.ts) - Delete sync, emergency access, and attachment upload response files - Delete card and identity view files - Delete linkedFieldOption decorator - Change remaining references to 'any' type for compatibility - Preserve data structure while removing type dependencies
- Delete Send domain models: send.ts, sendAccess.ts, sendFile.ts, sendText.ts - Delete Send data models: sendData.ts, sendFileData.ts, sendTextData.ts - Delete Send view models: sendView.ts, sendAccessView.ts, sendFileView.ts, sendTextView.ts - Delete Send API models: sendFileApi.ts, sendTextApi.ts - Delete Send response models: sendAccessResponse.ts, sendFileDownloadDataResponse.ts, sendFileUploadDataResponse.ts, sendResponse.ts - Delete Send enum: sendType.ts - Delete Send specs: send.spec.ts, sendAccess.spec.ts, sendFile.spec.ts, sendText.spec.ts - Remove Send methods from StateService abstractions and implementations - Remove getDecryptedSends/setDecryptedSends and getEncryptedSends/setEncryptedSends methods - Change sends property in AccountData to 'any' type for data compatibility - Fix import formatting and remove empty lines
- Delete Core domain models: card.ts, identity.ts, secureNote.ts, attachment.ts - Delete Core data models: cardData.ts, identityData.ts, secureNoteData.ts, attachmentData.ts - Delete Core view models: secureNoteView.ts, attachmentView.ts - Delete Core API models: cardApi.ts, identityApi.ts, secureNoteApi.ts - Delete Core response models: attachmentResponse.ts - Delete Core enum: secureNoteType.ts - Delete Core specs: card.spec.ts, identity.spec.ts, secureNote.spec.ts, attachment.spec.ts
- Delete folder and collection domain models, data models, view models, response models, and spec files
- Delete folder and collection domain models, data models, view models, response models, and spec files
- Remove 20 password manager specific interface methods: - Autofill methods (4): getAutoFillOnPageLoadDefault, setAutoFillOnPageLoadDefault, getEnableAutoFillOnPageLoad, setEnableAutoFillOnPageLoad - Browser integration methods (4): getEnableBrowserIntegration, setEnableBrowserIntegration, getEnableBrowserIntegrationFingerprint, setEnableBrowserIntegrationFingerprint - Notification methods (4): getDisableAddLoginNotification, setDisableAddLoginNotification, getDisableChangedPasswordNotification, setDisableChangedPasswordNotification - Favicon methods (2): getDisableFavicon, setDisableFavicon - Gravatar methods (2): getEnableGravitars, setEnableGravitars - Card/Identity tab methods (4): getDontShowCardsCurrentTab, setDontShowCardsCurrentTab, getDontShowIdentitiesCurrentTab, setDontShowIdentitiesCurrentTab
Contributor
|
Great job, no security vulnerabilities found in this Pull Request |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #819 +/- ##
=========================================
- Coverage 12.60% 7.72% -4.89%
=========================================
Files 68 68
Lines 2760 2757 -3
Branches 477 477
=========================================
- Hits 348 213 -135
- Misses 2384 2529 +145
+ Partials 28 15 -13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JimmyVo16
approved these changes
Jul 11, 2025
|
sso-bitwarden
pushed a commit
to sso-bitwarden/directory-connector
that referenced
this pull request
Aug 28, 2025
* Remove unused cipher-related code from jslib - Delete cipher.ts, cipherView.ts, sortedCiphersCache.ts - Delete search-ciphers.pipe.ts and icon.component files - Delete cipherData.ts, cipherResponse.ts, linkedIdType.ts - Delete field-related files (fieldData.ts, field.ts, fieldApi.ts, fieldView.ts) - Delete sync, emergency access, and attachment upload response files - Delete card and identity view files - Delete linkedFieldOption decorator - Remove cipher methods from StateService abstractions and implementations - Preserve ciphers property in AccountData as 'any' type for data compatibility * Remove unused Send feature and related password manager code from jslib - Delete Send domain models: send.ts, sendAccess.ts, sendFile.ts, sendText.ts - Delete Send data models: sendData.ts, sendFileData.ts, sendTextData.ts - Delete Send view models: sendView.ts, sendAccessView.ts, sendFileView.ts, sendTextView.ts - Delete Send API models: sendFileApi.ts, sendTextApi.ts - Delete Send response models: sendAccessResponse.ts, sendFileDownloadDataResponse.ts, sendFileUploadDataResponse.ts, sendResponse.ts - Delete Send enum: sendType.ts - Delete Send specs: send.spec.ts, sendAccess.spec.ts, sendFile.spec.ts, sendText.spec.ts - Remove Send methods from StateService abstractions and implementations - Remove getDecryptedSends/setDecryptedSends and getEncryptedSends/setEncryptedSends methods - Change sends property in AccountData to 'any' type for data compatibility - Fix import formatting and remove empty lines * Remove misc unused password manager models from jslib - Delete Core domain models: card.ts, identity.ts, secureNote.ts, attachment.ts - Delete Core data models: cardData.ts, identityData.ts, secureNoteData.ts, attachmentData.ts - Delete Core view models: secureNoteView.ts, attachmentView.ts - Delete Core API models: cardApi.ts, identityApi.ts, secureNoteApi.ts - Delete Core response models: attachmentResponse.ts - Delete Core enum: secureNoteType.ts - Delete Core specs: card.spec.ts, identity.spec.ts, secureNote.spec.ts, attachment.spec.ts * Remove unused Organization files (folders/collections) - Delete folder and collection domain models, data models, view models, response models, and spec files * Remove unused UI/UX settings methods from state service - Remove 20 password manager specific interface methods: - Autofill methods (4): getAutoFillOnPageLoadDefault, setAutoFillOnPageLoadDefault, getEnableAutoFillOnPageLoad, setEnableAutoFillOnPageLoad - Browser integration methods (4): getEnableBrowserIntegration, setEnableBrowserIntegration, getEnableBrowserIntegrationFingerprint, setEnableBrowserIntegrationFingerprint - Notification methods (4): getDisableAddLoginNotification, setDisableAddLoginNotification, getDisableChangedPasswordNotification, setDisableChangedPasswordNotification - Favicon methods (2): getDisableFavicon, setDisableFavicon - Gravatar methods (2): getEnableGravitars, setEnableGravitars - Card/Identity tab methods (4): getDontShowCardsCurrentTab, setDontShowCardsCurrentTab, getDontShowIdentitiesCurrentTab, setDontShowIdentitiesCurrentTab * Fix build errors * Delete leftover data models and stateService methods * Delete iframes and passwordReprompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-23631
📔 Objective
Delete the last of the low-hanging unused code in jslib. This focused on entire files that were unused.
Corresponding get/set methods in
StateServicehave been deleted. However, any account properties inAccountandStateMigrationServicehave been left intact as these represent data structures saved to disk.Note the small impact on the remaining files and actual app code.
There is still more work to do in this repo, however the remaining files are more tightly coupled and require a bit more thought before tackling - e.g. it's probably better to rewrite StateService with the methods and logic we actually need, rather than continuing to pare down the current implementation.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes