Conversation
| { provide: ErrorHandler, useClass: SentryErrorHandler }, | ||
| { provide: SwRegistrationOptions, | ||
| useFactory: () => ({ registrationStrategy: 'registerWithDelay:5000' }) } | ||
| useFactory: () => ({ registrationStrategy: 'registerWhenStable:30000' }) } |
There was a problem hiding this comment.
Good catch on the registerWhenStable vs registerWithDelay, but what's the reasoning behind the change from 5000 to 30000?
There was a problem hiding this comment.
registerWithDelay:5000 (Hard Delay): The app always waits 5 seconds. Even if the app loads instantly, the Service Worker sits idle for 5s.
registerWhenStable:30000 (Timeout / Safety Net):
Standard Behavior: Registers immediately as soon as the app is stable (e.g., at 2s).
Fallback Behavior: If the app never stabilizes (e.g., due to polling), it forces registration at 30s.
It made sense with difference in strategy with instead of hard polling, though if you think a 5 second timeout safety net would make sense, feel free to suggest.
There was a problem hiding this comment.
No, this seems reasonable to me, I was just wondering as to the logic of the time increase. Carry on :)
There was a problem hiding this comment.
The reason it was WithDelay not WhenStable was (according to my notes): isStable does not / ever happen, in an app that starts scheduled tasks on startup (which the index worker does) - https://v17.angular.io/api/core/ApplicationRef#is-stable-examples .. I recall that when I tried WhenStable stuff did not work, thus using the WithDelay option
Change made to the description of the 2FA unlock codes to match what is displayed in runbox 6 as an unlock code is now a requirement
antoniskalou
left a comment
There was a problem hiding this comment.
Approved, a very minor comment on one file, otherwise looks good to me 👍
5ef299f to
08d1476
Compare
There was a problem hiding this comment.
The build system adds+commits this file, PRs should not contain it (unless I am missing something.. ?)
| console.error('Worker: Failed to add text to document', messageId, e); | ||
| } | ||
| }); | ||
| })).toPromise(); |
There was a problem hiding this comment.
This lost a toPromise which did not get replaced by a firstValueFrom or a lastValueFrom (but there is still an "await" at the beginning).. what should it be?
There was a problem hiding this comment.
FWIW "monster branch" has
await lastValueFrom(this.postMessagesToXapianWorker(messagesMissingBodyText.map(searchIndexEntry => {
https://github.com/runbox/runbox7/blob/kirill/claudex-fixes/src/app/xapian/index.worker.ts#L696
| { provide: ErrorHandler, useClass: SentryErrorHandler }, | ||
| { provide: SwRegistrationOptions, | ||
| useFactory: () => ({ registrationStrategy: 'registerWithDelay:5000' }) } | ||
| useFactory: () => ({ registrationStrategy: 'registerWhenStable:30000' }) } |
There was a problem hiding this comment.
The reason it was WithDelay not WhenStable was (according to my notes): isStable does not / ever happen, in an app that starts scheduled tasks on startup (which the index worker does) - https://v17.angular.io/api/core/ApplicationRef#is-stable-examples .. I recall that when I tried WhenStable stuff did not work, thus using the WithDelay option
|
|
||
| @include mat.all-legacy-component-themes($rmm-default-theme); | ||
|
|
||
| // GTA 13.06.2018: Load custom fonts |
There was a problem hiding this comment.
possibly daft Q: what changes (or does not change?) if we just drop these fonts?
There was a problem hiding this comment.
Is this change from an existing PR? feels like I've seen/got this one somewhere..
Summary of Objectives
For some context, recently a branch was created by km where he went ham with Claude Code to deal with a lot of major things. However, the workload is a monster and we wanted human review and touch on it all. Therefore, the work is being split into 6 parts:
provideHttpClient, Build System Update,standalone: false.This is an incredibly terse summary of the plan and the scope of each but splitting it into six steps should make it tolerable to review. By taking the work from km's branch (after I made my own fixes so it passes tests etc.), I am systematically going through each aspect and documenting the changes so we can see what is occurring.
This is the first part of it and the changes made have been described below for a summary, including justifications. No tests additionally break compared to master (I tried fixing them more up but failed and left the effort for later, seeing it as wasted effort after hours of failing). The software itself compiles totally fine and the console is not screaming any additional errors in the browser console while looking at the end rendered product.
Detailed Modifications and Justifications
1. RxJS 7 Migration
.toPromise()method withfirstValueFromandlastValueFromacross 27 files.rxjs-compatpackage frompackage.json.firstValueFromandlastValueFromexplicitly convey intent and offer improved error handling.2. Tooling Updates
@typescript-eslint/semi(error level) and@typescript-eslint/no-unused-vars(warn level, ignoring underscore-prefixed identifiers) rules to.eslintrc.json.@typescript-eslint/member-ordering.npm run lint -- --fix) to 31 files, addressing:OnInit,OnChanges,DoBootstrap) to component classes and their respective imports.3. Service Worker Gating
src/app/app.module.tsfromregisterWithDelay:5000toregisterWhenStable:30000.4. Code Cleanup
src/app/folder/folderlist.component.ts:OnDestroylifecycle hook withprivate destroy$ = new Subject<void>();andtakeUntil(this.destroy$)for proper subscription cleanup (expansionModel.changedandfolderssubscriptions).ngOnChanges()to prevent stacking.document.getElementById('thedragcanvas')?.remove();).standalone: false.MatLegacyDialogtoMatDialog.src/app/http/progress.service.ts:httpRequestInProgress$: Observable<boolean> = this.httpRequestInProgress.pipe(delay(0));to preventExpressionChangedAfterItHasBeenCheckedErrorin templates.ExpressionChangedAfterItHasBeenCheckedErrorby ensuring proper change detection timing and subscription management.OnDestroyimplementation andtakeUntil.5. Styling Cleanup
@font-facedeclarations for "Avenir Next Pro Regular" and "Avenir Next Pro Medium" insrc/styles.scss.src/app/changelog/changelog.component.scssfor readability.Testing Information