Using uuid instead of crypto.randomUuid#28990
Merged
Merged
Conversation
Contributor
|
Contributor
🟡 Playwright Results — all passed (13 flaky)✅ 4301 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 88 skipped
🟡 13 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
shrabantipaul-collate
approved these changes
Jun 12, 2026
Code Review ✅ ApprovedReplaces crypto.randomUUID() with the uuid package in the document upload modal for consistent ID generation. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
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.



Describe your changes:
The UploadDocumentModal crashed when a file was selected in AUT.
Error - TypeError: crypto.randomUUID is not a function
crypto.randomUUID is a Web Crypto API that is only available in secure contexts (HTTPS or localhost). AUT environments run over HTTP, so the call throws immediately on file selection, preventing the upload flow from completing.
Fixes #
I worked on ... because ...
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
crypto.randomUUID()withuuidv4()from theuuidpackage inUploadDocumentModal.component.tsxfor consistent ID generation.ContextCenter.spec.tsby defining a standarduploadFileobject and streamlining the file upload interaction.This will update automatically on new commits.