Skip to content

[_]: Decouple release callback logic#277

Open
AlexisMora wants to merge 2 commits intomainfrom
fix/br-1151-error-opening-files
Open

[_]: Decouple release callback logic#277
AlexisMora wants to merge 2 commits intomainfrom
fix/br-1151-error-opening-files

Conversation

@AlexisMora
Copy link

@AlexisMora AlexisMora commented Mar 18, 2026

What is Changed / Added

Extracted the find and upload temporal file logic from ReleaseCallback into a dedicated
handler. Added JSDoc on TemporalFile and on ReleaseCallback to document the overall logic
Extracted the TEMPORAL_FOLDER INTERNXT_DRIVE_TMP to the dedicated Paths object


Why

The original callback was doing too much with no named concepts, making it hard to follow when reading it. The JSDocs provides better context and the why behind the logic

@AlexisMora AlexisMora changed the title Fix/br 1151 error opening files [_]: Decouple release callback logic Mar 18, 2026
@sonarqubecloud
Copy link

@@ -0,0 +1,44 @@
import { logger } from '@internxt/drive-desktop-core/build/backend';
Copy link
Author

Choose a reason for hiding this comment

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

the behaviour of this handler is the same as the previous code inside ReleaseCallback, the only difference is that gives more context about what is really happening and providing better naming (For example const temporalFile = await findTemporalFile(path); instead of const document = await this.findDocument(path); at a first glance it is more explicit about the intention

@AlexisMora AlexisMora marked this pull request as ready for review March 18, 2026 10:03
@AlexisMora AlexisMora self-assigned this Mar 18, 2026
@AlexisMora AlexisMora requested a review from egalvis27 March 18, 2026 10:04
Comment on lines +18 to +20
beforeEach(() => {
vi.clearAllMocks();
});

Choose a reason for hiding this comment

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

In the general test settings, cleanup after each test is already set by default, so there is no need to clean up the mocks.

Comment on lines +31 to +33
beforeEach(() => {
vi.clearAllMocks();
});

Choose a reason for hiding this comment

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

In the general test settings, cleanup after each test is already set by default, so there is no need to clean up the mocks.

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