Skip to content

[_] feature/Added typescript check#1903

Open
CandelR wants to merge 7 commits intomasterfrom
feature/typescript-check
Open

[_] feature/Added typescript check#1903
CandelR wants to merge 7 commits intomasterfrom
feature/typescript-check

Conversation

@CandelR
Copy link
Collaborator

@CandelR CandelR commented Mar 26, 2026

Description

  • Added typescript commando to check type errors
  • The command has been added to run in the precommit and action stages.
  • Fixed related type errors

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

File Download

  • Download a single file from Drive
  • Download multiple files simultaneously
  • Cancel an progress download
  • Download a file using Firefox
  • Download a folder as ZIP (from Drive and Backups)

PDF Viewer

  • Open a valid PDF in the FileViewer, should render correctly
  • Open a corrupted or empty PDF, should show "preview unavailable" without crashing

Image Viewer

  • Open a JPEG/PNG image, should display correctly
  • Open a HEIC image, should convert and display
  • Open an image with a broken URL, should show "preview unavailable"

Version History

  • Open the version history sidebar for a file

PGP Key Generation / Sign Up

  • Create a new account, keys should be generated without errors (now uses ed25519Legacy)
  • Log in with an existing account, keys load correctly

Credential Update (not tested in local because CORS error)

  • Password update flow completes without errors
  • Verify the keys.private.{ ecc, kyber } payload is sent correctly to the backend

Additional Notes

@CandelR CandelR self-assigned this Mar 26, 2026
@CandelR CandelR requested review from a team, larryrider and xabg2 as code owners March 26, 2026 10:23
@CandelR CandelR added the enhancement New feature or request label Mar 26, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 26, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: b08c6c7
Status: ✅  Deploy successful!
Preview URL: https://f9e8666e.drive-web.pages.dev
Branch Preview URL: https://feature-typescript-check.drive-web.pages.dev

View logs

@CandelR CandelR requested review from a team and TamaraFinogina March 26, 2026 10:31
if (item) {
setCurrentVersion({
id: item.fileId,
id: item.uuid,
Copy link
Member

Choose a reason for hiding this comment

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

Is this expected @CandelR ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's fine, it's only used as a key. Here, the fileId is not used for downloading, as it may be null if an empty file has been uploaded, I have modified it so that it always uses a unique string value

Copy link
Contributor

Choose a reason for hiding this comment

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

then lets change it also to uuid so its consistent here:

id: restoredVersion.fileId as string,

Copy link
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

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

For all the reviewers here, be aware that although this PR is for enforcing types, there are logic changes that although could appear small or non-relevant, are still logic changes so they can trigger unintended effects, requiring a regression test.

cc @ValentynaBlahodyrQA

xabg2
xabg2 previously approved these changes Mar 26, 2026
test('When the file has no fileId, then it should indicate it is empty', () => {
const emptyFile = { size: 0, fileId: null } as DriveFileData;

expect(isFileEmpty(emptyFile)).toBe(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider using toBeTruthy()

larryrider
larryrider previously approved these changes Mar 26, 2026
@CandelR CandelR dismissed stale reviews from larryrider and xabg2 via 36ed181 March 26, 2026 11:57
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants