Skip to content

[Port to dtq-dev] Refresh file listings on breadcrumb navigation after bitstream upload#1280

Open
kosarko wants to merge 1 commit intodataquest-dev:dtq-devfrom
ufal:backport-112-to-dtq-dev
Open

[Port to dtq-dev] Refresh file listings on breadcrumb navigation after bitstream upload#1280
kosarko wants to merge 1 commit intodataquest-dev:dtq-devfrom
ufal:backport-112-to-dtq-dev

Conversation

@kosarko
Copy link
Copy Markdown

@kosarko kosarko commented Apr 28, 2026

Port of ufal#112 by @amadulhaxxani to dtq-dev.

…#112)

* Refresh file listings on breadcrumb navigation after bitstream upload

Refresh file listings on breadcrumb navigation after bitstream upload

* Move refresh logic to ngOnChanges

Move refresh logic to ngOnChanges

* Set related requests stale instead of removing cache

Set related requests stale instead of removing cache

* Use setStaleByHrefSubstring for metadatabitstreams cache

Use setStaleByHrefSubstring for metadatabitstreams cache

* Add null checks for nested RemoteData access

Add null checks for nested RemoteData access

* Use local bitstream refs and clear caches

Replace uses of this.bitstream with the local bitstream observable in edit-bitstream-page to reference the correct stream when computing image/IIIF/enabled flags.

After removing bitstreams, clear relevant caches in item-bitstreams: mark bundle bitstreams hrefs stale and invalidate metadatabitstreams search-by-handle (both encoded and raw variants) so file lists, previews and CLARIN file sections refresh correctly.

* Fix memory leak, null guard, and style issues from PR review

- PreviewSectionComponent: store and unsubscribe configService subscription
  in ngOnDestroy to prevent memory leak
- ItemBitstreamsComponent: add hasValue() null guard before bundles.forEach()
  for idiomatic style

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 45bacd6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants