From 38806b39b9b0143ca3d172f5fbeede9177c0df14 Mon Sep 17 00:00:00 2001 From: Ed Eykholt Date: Mon, 12 Aug 2024 20:11:53 -0700 Subject: [PATCH] Set priorities for some TODOs. HomePage counts to 0 if unknown --- .../Helper/UrlBuilderTests.cs | 8 ++++---- KeriAuth.BrowserExtension/Helper/JSInteropHelper.cs | 2 +- KeriAuth.BrowserExtension/Models/Website.cs | 2 +- .../Services/AppSwMessagingService.cs | 2 +- .../Services/ExtensionEnvironmentService.cs | 2 +- .../Services/HttpClientService.cs | 4 ++-- .../Services/IdentifiersService.cs | 4 ++-- .../Services/PreferencesService.cs | 2 +- KeriAuth.BrowserExtension/Services/StateService.cs | 2 +- KeriAuth.BrowserExtension/Services/StorageService.cs | 4 ++-- KeriAuth.BrowserExtension/UI/Pages/HomePage.razor | 10 +++++----- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/KeriAuth.BrowserExtension.Tests/Helper/UrlBuilderTests.cs b/KeriAuth.BrowserExtension.Tests/Helper/UrlBuilderTests.cs index 0ed738b..25ceee3 100644 --- a/KeriAuth.BrowserExtension.Tests/Helper/UrlBuilderTests.cs +++ b/KeriAuth.BrowserExtension.Tests/Helper/UrlBuilderTests.cs @@ -17,7 +17,7 @@ public void CreateUrlWithEncodedQueryStrings_EncodesQueryParamsCorrectly() var queryParams = new List> { new("key1", "value1"), - // TODO adjust code so this test passes + // TODO P3 adjust code so this test passes // new("key2", "value with space"), // new("key3", "value&with&special"), // new("key&with&special", "value&with&special") @@ -33,7 +33,7 @@ public void CreateUrlWithEncodedQueryStrings_EncodesQueryParamsCorrectly() // Assert.Contains("key%26with%26special=value%26with%26special", result); } - /* /* TODO adjust code so this test passes + /* /* TODO P3 adjust code so this test passes [Fact] public void CreateUrlWithEncodedQueryStrings_HandlesEmptyQueryParams() { @@ -64,7 +64,7 @@ public void DecodeUrlQueryString_DecodesQueryParamsCorrectly() Assert.Equal("value&with&special", result["key&with&special"]); } - /* TODO adjust code so this test passes + /* TODO P3 adjust code so this test passes [Fact] public void DecodeUrlQueryString_ThrowsExceptionOnNullValue() { @@ -77,7 +77,7 @@ public void DecodeUrlQueryString_ThrowsExceptionOnNullValue() } */ - /* TODO adjust code so this test passes + /* TODO P3 adjust code so this test passes [Fact] public void DecodeUrlQueryString_ReturnsEmptyDictionaryForNoQueryParams() { diff --git a/KeriAuth.BrowserExtension/Helper/JSInteropHelper.cs b/KeriAuth.BrowserExtension/Helper/JSInteropHelper.cs index dece607..de97287 100644 --- a/KeriAuth.BrowserExtension/Helper/JSInteropHelper.cs +++ b/KeriAuth.BrowserExtension/Helper/JSInteropHelper.cs @@ -8,7 +8,7 @@ namespace KeriAuth.BrowserExtension.Helper { public class JSInteropHelper(IJSRuntime jsRuntime) { - // TODO set shorter timeout depending on #debug + // TODO P3 set shorter timeout depending on #debug #if DEBUG private static readonly TimeSpan DefaultTimeout = TimeSpan.FromMilliseconds(22222000); diff --git a/KeriAuth.BrowserExtension/Models/Website.cs b/KeriAuth.BrowserExtension/Models/Website.cs index fc55998..d9764d7 100644 --- a/KeriAuth.BrowserExtension/Models/Website.cs +++ b/KeriAuth.BrowserExtension/Models/Website.cs @@ -56,7 +56,7 @@ public enum AutoSignInMode public record WebsiteInteraction { - // TODO: Implement this record + // TODO P2: Implement this record // RequestingTabId // RequestingOrigin // RequestedAt diff --git a/KeriAuth.BrowserExtension/Services/AppSwMessagingService.cs b/KeriAuth.BrowserExtension/Services/AppSwMessagingService.cs index d3a94b4..ac7e972 100644 --- a/KeriAuth.BrowserExtension/Services/AppSwMessagingService.cs +++ b/KeriAuth.BrowserExtension/Services/AppSwMessagingService.cs @@ -25,7 +25,7 @@ public async Task SendToServiceWorkerAsync(string message, T payload) { if (_port != null) { - // TODO make the message payload typed + // TODO P2 make the message payload typed //var messagePayload = new MessagePayload //{ // Message = message, diff --git a/KeriAuth.BrowserExtension/Services/ExtensionEnvironmentService.cs b/KeriAuth.BrowserExtension/Services/ExtensionEnvironmentService.cs index 31b479b..74b35fe 100644 --- a/KeriAuth.BrowserExtension/Services/ExtensionEnvironmentService.cs +++ b/KeriAuth.BrowserExtension/Services/ExtensionEnvironmentService.cs @@ -27,7 +27,7 @@ public void Initialize(Uri uri, string contextType) InitialUriQuery = query; if (uri.AbsoluteUri.Contains("chrome-extension")) { - // TODO: better to get this environment value from the chrome.runtime.getContexts() API, filtered by the current context. See UIHelper.GetChromeContexts() + // TODO P3: better to get this environment value from the chrome.runtime.getContexts() API, filtered by the current context. See UIHelper.GetChromeContexts() if (QueryHelpers.ParseQuery(query).TryGetValue("environment", out var environment)) { if (Enum.TryParse(environment.FirstOrDefault(), true, out ExtensionEnvironment extensionEnvironment)) diff --git a/KeriAuth.BrowserExtension/Services/HttpClientService.cs b/KeriAuth.BrowserExtension/Services/HttpClientService.cs index 7c013ed..c52a2c4 100644 --- a/KeriAuth.BrowserExtension/Services/HttpClientService.cs +++ b/KeriAuth.BrowserExtension/Services/HttpClientService.cs @@ -16,7 +16,7 @@ public class HttpClientService public HttpClientService(HttpClient httpClient) { _httpClient = httpClient; - logger = new Logger(new LoggerFactory()); // TODO: insert via DI + logger = new Logger(new LoggerFactory()); // TODO P4: insert via DI // Define a timeout policy that times out after 2 seconds. var timeoutDuration = TimeSpan.FromSeconds(2); @@ -76,7 +76,7 @@ public async Task> SendAsync(HttpMethod m public async Task> GetJsonAsync(string url) { - TimeSpan timeout = TimeSpan.FromSeconds(3); // TODO. Consider making this configurable and also providing an external cts source. Apply pattern elsewhere. + TimeSpan timeout = TimeSpan.FromSeconds(3); // TODO P2. Consider making this configurable and also providing an external cts source. Apply pattern elsewhere. HttpResponseMessage httpResponseMessage; using var cts = new CancellationTokenSource(timeout); try diff --git a/KeriAuth.BrowserExtension/Services/IdentifiersService.cs b/KeriAuth.BrowserExtension/Services/IdentifiersService.cs index bc1edc7..6619f98 100644 --- a/KeriAuth.BrowserExtension/Services/IdentifiersService.cs +++ b/KeriAuth.BrowserExtension/Services/IdentifiersService.cs @@ -60,10 +60,10 @@ public async Task>> GetIdentifierHeadlines() //// logger.LogWarning("GetIdentifierHeadlines: GetIdentifierService salty {1}", (object)aid.Salty); //logger.LogWarning("GetIdentifierHeadlines: GetIdentifierService transferable {1}", aid.Transferable); //// logger.LogWarning("GetIdentifierHeadlines: GetIdentifierService windexes {1}", (object)aid.Windexes); - //// TODO !! parse? + //// TODO P4 parse? - // TODO ?? set the current identifierService in the Headline? + // TODO P3 set the current identifierService in the Headline? var identifierService = new IdentifierService(item.Prefix, item.Name, Guid.NewGuid(), logger, storageService); headlines.Add(new IdentifierHeadline(item.Prefix, identifierService.cachedAid.Alias, Guid.NewGuid())); } diff --git a/KeriAuth.BrowserExtension/Services/PreferencesService.cs b/KeriAuth.BrowserExtension/Services/PreferencesService.cs index 670f603..286eb01 100644 --- a/KeriAuth.BrowserExtension/Services/PreferencesService.cs +++ b/KeriAuth.BrowserExtension/Services/PreferencesService.cs @@ -12,7 +12,7 @@ public class PreferencesService(IStorageService storageService, ILogger GetPreferences() diff --git a/KeriAuth.BrowserExtension/Services/StateService.cs b/KeriAuth.BrowserExtension/Services/StateService.cs index cd2199e..6d46a4a 100644 --- a/KeriAuth.BrowserExtension/Services/StateService.cs +++ b/KeriAuth.BrowserExtension/Services/StateService.cs @@ -84,7 +84,7 @@ public async Task NotifyObservers() { foreach (var observer in stateObservers) observer.OnNext(stateMachine.State); - await Task.Delay(0); // hack + await Task.Delay(0); return; } diff --git a/KeriAuth.BrowserExtension/Services/StorageService.cs b/KeriAuth.BrowserExtension/Services/StorageService.cs index bbb022e..951b12e 100644 --- a/KeriAuth.BrowserExtension/Services/StorageService.cs +++ b/KeriAuth.BrowserExtension/Services/StorageService.cs @@ -51,7 +51,7 @@ public async Task Initialize() logger.Log(ServiceLogLevel, "Registering handler for storage change event"); // Set up to listen for storage changes. Could alternately have implemented this in the background script and/or https://github.com/mingyaulee/WebExtensions.Net - // TODO investigate using https://github.com/mingyaulee/WebExtensions.Net + // TODO P2 investigate using https://github.com/mingyaulee/WebExtensions.Net IJSObjectReference _module = await jsRuntime.InvokeAsync("import", "/scripts/es6/storageHelper.js"); await _module.InvokeVoidAsync("addStorageChangeListener", _dotNetObjectRef); } @@ -404,7 +404,7 @@ public async Task NotifyStorageChanged(Dictionary Credentials - 5 + 0 Multi-Sig Groups - 1 + 0 Configured Websites - 4 + 0 KERI Agent Requests - 2 + 0 Notifications - 1 + 0