Skip to content

Conversation

siltomato
Copy link
Collaborator

@siltomato siltomato commented Oct 3, 2025

This PR fixes all lint no-floating-promises warnings. All files used the void methodology to handle the floating promises (maintaining existing fire-and-forget behavior) except for the two instances described below.

  1. In the lynx-insight-panel.component.ts onLeafNodeClick() function, the promise chain is changed to async/await. This is more of a readability change than functional, as, in both cases, the nav completes before the call to update display state.

  2. In the realtime-doc.ts delete() function:

async delete(): Promise<void> {
  await this.adapter.delete();
  await this.updateOfflineData();
  await this.realtimeService.onLocalDocUpdate(this);
}

await this.adapter.delete() was chosen instead of void this.adapter.delete() with the idea to maintain data consistency in the case that the adapter.delete() call fails. Please review if this is the correct approach.


This change is Reviewable

@siltomato siltomato marked this pull request as ready for review October 3, 2025 23:10
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 77.68595% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.32%. Comparing base (88f2f8c) to head (c001568).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...Forge.Scripture/ClientApp/src/app/app.component.ts 57.14% 6 Missing ⚠️
...ientApp/src/xforge-common/user-projects.service.ts 0.00% 4 Missing ⚠️
...slate/draft-generation/draft-generation.service.ts 62.50% 3 Missing ⚠️
...ntApp/src/app/translate/editor/editor.component.ts 84.21% 3 Missing ⚠️
...p/src/app/machine-api/remote-translation-engine.ts 33.33% 2 Missing ⚠️
...e/ClientApp/src/app/shared/project-router.guard.ts 0.00% 2 Missing ⚠️
...anslate/biblical-terms/biblical-terms.component.ts 71.42% 0 Missing and 2 partials ⚠️
...eneration/draft-sources/draft-sources.component.ts 0.00% 2 Missing ⚠️
...nx-insights-panel/lynx-insights-panel.component.ts 50.00% 2 Missing ⚠️
...pp/src/xforge-common/exception-handling.service.ts 50.00% 2 Missing ⚠️
... and 25 more
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3492   +/-   ##
=======================================
  Coverage   82.32%   82.32%           
=======================================
  Files         613      613           
  Lines       36879    36881    +2     
  Branches     6042     6047    +5     
=======================================
+ Hits        30359    30361    +2     
  Misses       5628     5628           
  Partials      892      892           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nateowami
Copy link
Collaborator

Thanks for tackling this @siltomato. One major concern I have is that it's going to create a slew of merge conflicts with #3199, which is already big, difficult, and affects async/await in a lot of places. Maybe we should merge the two instances you found that you think should be awaited, and then have the rest of them updated after #3199 to reduce conflicts (or at least to simplify the conflicts, since adding void is a lot simpler than the other PR's changes)?

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

Successfully merging this pull request may close these issues.

2 participants