From 68ed1c80ce5edf546081e86e9cb62309fff4112a Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sat, 22 Jun 2024 21:47:18 -0600 Subject: [PATCH] update todos --- web/projects/ui/src/app/app.providers.ts | 2 +- .../ui/src/app/modals/generic-form/generic-form.page.ts | 1 - .../pages/apps-routes/app-actions/app-actions.page.ts | 9 ++------- web/projects/ui/src/app/pages/init/init.service.ts | 1 + web/projects/ui/src/app/services/api/api.fixures.ts | 6 +++--- web/projects/ui/src/app/services/api/mock-patch.ts | 2 +- .../ui/src/app/services/patch-db/patch-db-source.ts | 1 + 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/web/projects/ui/src/app/app.providers.ts b/web/projects/ui/src/app/app.providers.ts index c6a8d756e..e93c323d0 100644 --- a/web/projects/ui/src/app/app.providers.ts +++ b/web/projects/ui/src/app/app.providers.ts @@ -64,7 +64,7 @@ export function appInitializer( return () => { storage.migrate036() auth.init() - localStorage.init() // @TODO pretty sure we can navigate before this step + localStorage.init() router.initialNavigation() } } diff --git a/web/projects/ui/src/app/modals/generic-form/generic-form.page.ts b/web/projects/ui/src/app/modals/generic-form/generic-form.page.ts index eb690a787..e74c65d47 100644 --- a/web/projects/ui/src/app/modals/generic-form/generic-form.page.ts +++ b/web/projects/ui/src/app/modals/generic-form/generic-form.page.ts @@ -54,7 +54,6 @@ export class GenericFormPage { return } - // @TODO make this more like generic input component dismissal const success = await handler(this.formGroup.value) if (success !== false) this.modalCtrl.dismiss() } diff --git a/web/projects/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts b/web/projects/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts index a48ac8185..fc008a17a 100644 --- a/web/projects/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts +++ b/web/projects/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts @@ -44,12 +44,7 @@ export class AppActionsPage { status: T.Status, action: { key: string; value: T.ActionMetadata }, ) { - if ( - status && - action.value.allowedStatuses.includes( - status.main.status, // @TODO - ) - ) { + if (status && action.value.allowedStatuses.includes(status.main.status)) { if (!isEmptyObject(action.value.input || {})) { const modal = await this.modalCtrl.create({ component: GenericFormPage, @@ -91,7 +86,7 @@ export class AppActionsPage { await alert.present() } } else { - const statuses = [...action.value.allowedStatuses] // @TODO + const statuses = [...action.value.allowedStatuses] const last = statuses.pop() let statusesStr = statuses.join(', ') let error = '' diff --git a/web/projects/ui/src/app/pages/init/init.service.ts b/web/projects/ui/src/app/pages/init/init.service.ts index 3cca42a58..7102c9db5 100644 --- a/web/projects/ui/src/app/pages/init/init.service.ts +++ b/web/projects/ui/src/app/pages/init/init.service.ts @@ -58,6 +58,7 @@ export class InitService extends Observable { } }), catchError(e => { + // @TODO this toast is presenting when we navigate away from init page. It seems other websockets exhibit the same behavior, but we never noticed because the error were not being caught and presented in this manner this.errorService.present(e) return EMPTY diff --git a/web/projects/ui/src/app/services/api/api.fixures.ts b/web/projects/ui/src/app/services/api/api.fixures.ts index 38ee4774b..acebdfdfb 100644 --- a/web/projects/ui/src/app/services/api/api.fixures.ts +++ b/web/projects/ui/src/app/services/api/api.fixures.ts @@ -714,7 +714,7 @@ export module Mock { value: 'https://guessagain.com', }, }, - } as any // @TODO why is this necessary? + } export const ConfigSpec: RR.GetPackageConfigRes['spec'] = { bitcoin: { @@ -1419,7 +1419,7 @@ export module Mock { health: {}, }, }, - actions: {}, // @TODO need mocks + actions: {}, serviceInterfaces: { ui: { id: 'ui', @@ -1618,7 +1618,7 @@ export module Mock { icon: 'assets/img/service-icons/btc-rpc-proxy.png', kind: 'exists', registryUrl: 'https://community-registry.start9.com', - versionSpec: '>2.0.0', // @TODO + versionSpec: '>2.0.0', configSatisfied: false, }, }, diff --git a/web/projects/ui/src/app/services/api/mock-patch.ts b/web/projects/ui/src/app/services/api/mock-patch.ts index ee96f9fe2..755799522 100644 --- a/web/projects/ui/src/app/services/api/mock-patch.ts +++ b/web/projects/ui/src/app/services/api/mock-patch.ts @@ -127,7 +127,7 @@ export const mockPatchData: DataModel = { }, }, }, - actions: {}, // @TODO + actions: {}, serviceInterfaces: { ui: { id: 'ui', diff --git a/web/projects/ui/src/app/services/patch-db/patch-db-source.ts b/web/projects/ui/src/app/services/patch-db/patch-db-source.ts index 803fbce2c..0b80370d0 100644 --- a/web/projects/ui/src/app/services/patch-db/patch-db-source.ts +++ b/web/projects/ui/src/app/services/patch-db/patch-db-source.ts @@ -41,6 +41,7 @@ export class PatchDbSource extends Observable[]> { catchError((_, original$) => { this.state.retrigger() + // @TODO this is returning right away, but we need to wait until state emits again from the retrigger() above. return this.state.pipe( filter(current => current === 'running'), take(1),