Skip to content

UFAL/Release hotfix 2026 03 11#1248

Merged
milanmajchrak merged 27 commits intocustomer/lindatfrom
ufal/release-hotfix-2026-03-11
Mar 11, 2026
Merged

UFAL/Release hotfix 2026 03 11#1248
milanmajchrak merged 27 commits intocustomer/lindatfrom
ufal/release-hotfix-2026-03-11

Conversation

@milanmajchrak
Copy link
Collaborator

Problem description

Analysis

(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)

Problems

(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)

Sync verification

If en.json5 or cs.json5 translation files were updated:

  • Run yarn run sync-i18n -t src/assets/i18n/cs.json5 -i to synchronize messages, and changes are included in this PR.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

Paurikova2 and others added 27 commits February 10, 2026 10:49
* used stahnout instead of odstranit

* Update confirmation text for withdrawal action

* removed two empty lines

* added empty lines as in origin

* removed spaces

---------

Co-authored-by: Kasinhou <129340513+Kasinhou@users.noreply.github.com>
…on (#1209)

* renamed dspace-import to dspace-import-clarin

* removed unwanted changes
* Preserve parameters when creating similar process

* Extract duplicate deep copy logic into helper

* Fix redundant parameter logic prevent empty accumulation
* Override pagesize and display all versions

* Changed hardcoded variable

---------

Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
(cherry picked from commit 21521d1)
(cherry picked from commit c296d87)
#1189)

* Rewrite OAI links in static page HTML with rest.baseUrl

Updated StaticPageComponent to rewrite OAI links in loaded HTML content to use the configured rest.baseUrl, ensuring correct API endpoint references. Added comprehensive tests to verify link rewriting, handling of missing baseUrl, avoidance of double slashes, and cases with no OAI links.

* Remove unused ComponentFixture import in test

Cleaned up the static-page.component.spec.ts file by removing the unused ComponentFixture import to improve code clarity.

* Fix OAI URL construction and improve test coverage

Corrects the construction of the OAI URL in StaticPageComponent to avoid double slashes by removing the extra slash in the base URL. Also updates the unit test to properly instantiate the component and check its creation.

(cherry picked from commit cb86d07)

Co-authored-by: Amad Ul Hassan <hassan@ufal.mff.cuni.cz>
Use dspace-import-clarin path instead of dspace-import
Removed unnecessary comments and improved logging for volume removal.
#1222)

* Use `dspace:dspace` permissions for the assetstore - not ubuntu:ubuntu

* Change permissions as root
…dpoint (#1215)

* fix: generate correct curl download URLs using backend handle endpoint

Updates the curl command generation to use the new backend endpoint
GET /api/core/bitstreams/handle/{prefix}/{suffix}/{filename} instead
of the non-existent /api/bitstream/{handle}/{seq}/{filename}.

Key changes:
- Uses correct backend endpoint path: /core/bitstreams/handle/{handle}/
- Removes unnecessary sequence index from URLs (uses filename only)
- Quotes the URL to prevent shell brace expansion
- For single file, uses -o with explicit filename

Fixes: #1210

* Fixed formatting of the file names

* fix: use -o with real filename to avoid percent-encoded names from curl -O

curl -O uses the URL path as the saved filename, so percent-encoded
characters (e.g. %20, %2B, %28) stay encoded in the output file.

Now generates separate 'curl -o realname url' for each file joined
with &&, ensuring files are saved with their actual names.

* fix: use curl -OJ with brace expansion for compact download command

* removed duplicates logic

* fix: use curl -o instead of -OJ to fix non-ASCII filenames on Windows

curl -J (Content-Disposition) cannot create files with non-ASCII characters
on Windows because it interprets the header bytes using the console code page.
Changed to curl -o filename url format where the shell passes the
filename directly to the OS, correctly handling Unicode on all platforms.
Also added tests for UTF-8 filenames and double-quote escaping.

* fix: use inline encodeURIComponent instead of encodeRFC3986URIComponent

encodeRFC3986URIComponent calls decodeURIComponent first, which throws
URIError on filenames containing a literal percent sign (e.g. '100% done.txt')
because '%' followed by non-hex chars is not a valid escape sequence.

Replaced with inline encodeURIComponent() + parentheses encoding directly
on the raw filename. Added test for literal percent sign in filenames.

* fix: restore brace expansion {} in curl URL with -o for filenames

curl command now uses brace expansion for compact URL:
  curl -o file1 -o file2 baseUrl{/encoded1,/encoded2}

This combines:
- {} brace expansion in the URL (compact, one URL for all files)
- -o flags with real filenames (handles UTF-8 correctly via shell)

* test: add complex filename test (diacritics, plus, hash, unmatched paren)

New FE test for 'Media (+)#9) ano' verifying correct URL encoding in brace
expansion and real filename in -o flag.

* fix: use separate -o url pairs instead of curl brace expansion

curl URL globbing ({}) does NOT support per-file -o flags. When using
  curl -o f1 -o f2 url{/a,/b}
curl maps the -o flags to URL arguments, not to globbed expansions,
resulting in 'Got more output options than URLs' and only one file saved.

Changed to separate -o + URL pairs per file:
  curl -o file1 url/file1 -o file2 url/file2

Updated all 12 test expectations to match.

* feat: show curl command in modal dialog with copy button

Replace inline command display with a centered NgbModal (size: lg) that
shows the curl command in a scrollable pre block. Includes a copy-to-clipboard
button with visual feedback (checkmark + 'Copied!' for 2s).

- Added NgbModal injection and openCommandModal()/copyCommand() methods
- Removed old isCommandLineVisible toggle and #command-div hover styles
- Added i18n keys for en, cs, de (copy/copied/close)
- Updated spec to import NgbModalModule

* Revert unnecessary changes

* Address Copilot review suggestions: accessibility, security, test fixes

- Reset canShowCurlDownload at start of generateCurlCommand()
- Add aria-labelledby to modal for screen reader accessibility
- Add .catch() to navigator.clipboard.writeText() for error handling
- Escape dollar signs and backticks in filenames for shell safety
- Fix ConfigurationDataService mock to return RemoteData-shaped object
- Add tests for canShowCurlDownload reset and shell injection protection

* fix: add fakeAsync/tick to CC license test for debounced getCcLicenseLink

---------

Co-authored-by: Paurikova2 <michaela.paurikova@dataquest.sk>
* fix: resolve duplicate HTML element IDs across pages

* fix: use [attr.*] binding syntax for aria-* attributes in templates

* fix: revert dynamic form ID changes to fix e2e test failures

Reverts DsDynamicFormLayoutService and all form template changes that
were appending _N suffixes to form element IDs, breaking Cypress e2e
selectors like input#dc_title and label[for=local_hasCMDI].

Only static HTML duplicate ID fixes are retained (pagination, ds-select,
epeople-registry, etc.) along with aria-* attribute binding fixes.

* fix: address Copilot review comments - sanitize bundleName for IDs, remove invalid file-tree ID, fix conditional aria-describedby

---------

Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
…ding (#1231)

* Force fresh bitstream fetch to avoid stale SSR 404s

* Separate bundle follow links to prevent invalid bundle/item/primaryBitstream path

* removed unwanted changes
* Resolve duplicate HTML IDs in submission form.

* refactor for unique ID registry

* fix: remove unused baseId param from release in UniqueIdRegistry

* fix: propagate unique ID from container to child form controls for accessibility

* fix: recycle released suffixes in UniqueIdRegistry to preserve stable IDs across re-renders

* refactor: deduplicate UniqueIdRegistry usage, store instanceKey, and add unit tests

* Refactored the code to make this fix more simple

* Updated components to make IT pass

* refactor: replace UniqueIdRegistry with inline static counter for unique form IDs

* Add tests to verify _idState cleanup and reuse of base id after ngOnDestroy

---------

Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk>
…lling

UFAL/Refactor running rest tests in deploy
* fix: include dc_identifier in ViewTrackerResolverService event properties for Matomo custom dimensions

* Fixed linting error
Copilot AI review requested due to automatic review settings March 11, 2026 07:53
@milanmajchrak milanmajchrak merged commit ed36ed4 into customer/lindat Mar 11, 2026
7 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hotfix-focused PR improving DOM id uniqueness/accessibility across multiple Angular templates and stabilizing related unit tests, plus a small analytics enrichment and OAI link rewriting fix for static pages.

Changes:

  • Make various HTML id / aria-labelledby attributes unique to avoid duplicate IDs when components repeat on a page.
  • Improve dynamic form control ID generation to avoid collisions and reset ID state between tests.
  • Add dc_identifier to page view tracking and adjust static-page OAI link rewriting (with updated tests).

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/test.ts Resets dynamic-form unique-id counters after each test to avoid state leakage.
src/app/submission/sections/clarin-license-resource/section-license.component.html Makes license option IDs unique per license.
src/app/statistics/angulartics/dspace/view-tracker-resolver.service.ts Adds dc_identifier metadata to emitted analytics event properties.
src/app/statistics/angulartics/dspace/view-tracker-resolver.service.spec.ts Adds unit tests for the resolver analytics payload.
src/app/static-page/static-page.component.ts Fixes OAI URL rewriting to preserve REST namespace paths.
src/app/static-page/static-page.component.spec.ts Updates/extends tests for the revised OAI rewriting logic.
src/app/shared/pagination/pagination.component.html Makes pagination control IDs unique per pagination instance id.
src/app/shared/pagination/pagination.component.spec.ts Updates selectors to match the new generated pagination IDs.
src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.html Makes pool task actions ID unique per DSO.
src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts Implements per-baseId unique ID generation and cleanup; propagates unique IDs to child controls.
src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts Adds tests for the new unique ID behavior and cleanup semantics.
src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html Updates label id to align with the unique container id.
src/app/shared/ds-select/ds-select.component.ts Adds per-instance unique ID for ds-select instances.
src/app/shared/ds-select/ds-select.component.html Uses per-instance IDs for label/button/menu and ARIA wiring.
src/app/item-page/simple/field-components/preview-section/file-description/file-tree-view/file-tree-view.component.spec.ts Updates DOM selector in test after removing a hardcoded id.
src/app/item-page/simple/field-components/preview-section/file-description/file-tree-view/file-tree-view.component.html Removes hardcoded id from file node name span.
src/app/item-page/simple/field-components/clarin-sponsor-item-field/clarin-sponsor-item-field.component.spec.ts Updates test selectors to match new indexed IDs.
src/app/item-page/simple/field-components/clarin-sponsor-item-field/clarin-sponsor-item-field.component.html Makes sponsor field value IDs unique via index.
src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts Adds sanitizedBundleName to build valid/unique IDs.
src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html Applies bundle-based unique IDs to headers and pagination controls.
src/app/item-page/clarin-ref-featured-services/clarin-ref-featured-services.component.html Makes featured service dropdown IDs unique via index.
src/app/bitstream-page/bitstream-page.resolver.ts Fixes embed-follow config so bundle sub-embeds don’t chain incorrectly.
src/app/access-control/epeople-registry/epeople-registry.component.html Avoids duplicate id by renaming the search label id.

Comment on lines 47 to 51
it('should display the node name', () => {
waitForAsync(() => {
const nodeNameElement = fixture.debugElement.query(By.css('#folderName')).nativeElement;
const nodeNameElement = fixture.debugElement.query(By.css('span')).nativeElement;
expect(nodeNameElement.textContent).toContain('TestFolder');
});
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In should display the node name, waitForAsync is being called but its returned wrapper function is never used by Jasmine, so the assertions inside don’t actually run. Convert this to it('...', waitForAsync(() => { ... })) (or remove waitForAsync and keep the assertions synchronous) so the test truly validates the DOM content.

Copilot uses AI. Check for mistakes.
Comment on lines 87 to 90
<th class="bitstream-name row-element {{ columnSizes.columns[0].buildClasses() }}"
scope="row" id="{{ entry.nameStripped }}" headers="{{ bundleName }} name">
scope="row" id="{{ entry.nameStripped }}" headers="{{ bundleName }} name-{{ sanitizedBundleName }}">
<div class="drag-handle text-muted float-left p-1 mr-2" tabindex="0" cdkDragHandle
(keydown.enter)="select($event, entry)" (keydown.space)="select($event, entry)" (click)="select($event, entry)">
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headers attributes still include bundleName as an ID token (e.g. headers="{{ bundleName }} name-..."). Since bundleName may contain whitespace (as noted in the new TS comment), this can produce invalid header references for screen readers. Use a consistently-sanitized ID value for both the referenced header cell id and all headers tokens (and keep bundleName only for visible text).

Copilot uses AI. Check for mistakes.
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.

6 participants