resolve archived item hang and false Archived badge in MyDSpace#146
Open
amadulhaxxani wants to merge 1 commit into
Open
Conversation
resolve archived item hang and false Archived badge in MyDSpace
There was a problem hiding this comment.
Pull request overview
This PR addresses MyDSpace/item-page navigation issues by reducing stale cached item data usage, adding defensive guards around missing resolved data, and correcting Archived badge display logic.
Changes:
- Forces fresh item/submission fetches and expands submission item follow links to include item-page-related embeds.
- Adds guards for missing version/theme/view-tracking data and clears route loading state on navigation errors.
- Updates MyDSpace submission list badge logic and related tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/app/app.component.ts |
Clears route loading state on NavigationError. |
src/app/core/submission/resolver/submission-links-to-follow.ts |
Expands embedded item links for submission resolution. |
src/app/core/submission/resolver/submission-object.resolver.ts |
Disables cache-first submission object resolution. |
src/app/item-page/item.resolver.ts |
Disables cache-first item-page resolution. |
src/app/item-page/versions/notice/item-versions-notice.component.ts |
Adds fallback observables when item version data is absent. |
src/app/shared/theme-support/themed.component.ts |
Guards dynamic component creation when view/content references are missing. |
src/app/statistics/angulartics/dspace/view-tracker-resolver.service.ts |
Skips tracking emission when resolved DSO data is missing. |
src/app/statistics/angulartics/dspace/view-tracker-resolver.service.spec.ts |
Updates missing-DSO tracking expectation. |
src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.ts |
Shows Archived badge only when item.isArchived is true. |
src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts |
Updates badge-context expectations. |
Comment on lines
+28
to
29
| filter(() => !!this.getNestedProperty(routeSnapshot.data, dsoPath)), | ||
| take(1), |
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.
Problem description
This PR addresses two MyDSpace issues:
Console errors resolved
Cannot read properties of undefined (reading 'pipe')inItemVersionsNoticeComponentCannot read properties of undefined (reading 'createComponent')inThemedComponentCannot read properties of undefined (reading 'uuid')inStatisticsServiceAnalysis
Root cause was a multi-part resolver/cache/lifecycle interaction:
ItemVersionsNoticeComponentandThemedComponentcaused runtime exceptions in these edge flows.NavigationError.item.isArchivedflag.Changes
src/app/app.component.tsNavigationErrorhandling to route loader resetsrc/app/core/submission/resolver/submission-links-to-follow.tsversion,versionhistory,relationships,owningCollection,thumbnail)src/app/core/submission/resolver/submission-object.resolver.tsuseCachedVersionIfAvailabletofalsesrc/app/item-page/item.resolver.tsuseCachedVersionIfAvailabletofalsesrc/app/item-page/versions/notice/item-versions-notice.component.tsitem.versionis absentsrc/app/shared/theme-support/themed.component.tscreateComponentwhenvcrorthemedElementContentis missingsrc/app/statistics/angulartics/dspace/view-tracker-resolver.service.tssrc/app/statistics/angulartics/dspace/view-tracker-resolver.service.spec.tssrc/app/shared/object-list/.../item-search-result-list-element-submission.component.tsitem.isArchivedbefore showing "Archived" badgesrc/app/shared/object-list/.../item-search-result-list-element-submission.component.spec.tsCopilot review