Skip to content

Commit 518b7ee

Browse files
Identify and document unfinished functionality (#171)
Scanned the codebase for comments and code paths indicating incomplete features or future work. - Added explicit TODO comments to `DownloadService`, `DuplicateService`, `QueryParser`, `Importer`, `Endpoints`, and `DownloaderFactory`. - Updated `TASKS.md` to track these new actionable items, including handling additional import types, subscription logic, and downloader error handling. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 56b16e5 commit 518b7ee

File tree

7 files changed

+18
-3
lines changed

7 files changed

+18
-3
lines changed

Octans.Client/Endpoints.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ private static void MapInfrastructureEndpoints(WebApplication app)
102102
{
103103
app
104104
.MapPost("/subscriptions",
105-
() => { throw new NotImplementedException("Subscription endpoint not yet implemented"); })
105+
() =>
106+
{
107+
// TODO: Implement subscription processing logic.
108+
throw new NotImplementedException("Subscription endpoint not yet implemented");
109+
})
106110
.WithName("SubmitSubscription")
107111
.WithDescription("Submits a subscription request for automated queries");
108112

Octans.Core/Downloads/DownloadService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public Task PauseDownloadAsync(Guid id)
9090
logger.LogInformation("Pausing download");
9191

9292
// TODO: Implement true pause/resume logic.
93-
// For now, we'll implement pause as cancel since we don't support resuming partial downloads
93+
// TODO: Implement true pause/resume logic. For now, pause is implemented as cancel since we don't support resuming partial downloads.
9494
CancelDownloadToken(id);
9595
stateService.UpdateState(id, DownloadState.Paused);
9696

Octans.Core/Downloads/Downloaders/DownloaderFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public virtual async Task<List<Downloader>> GetDownloaders()
4141

4242
if (downloader is null)
4343
{
44+
// TODO: Handle specific creation exceptions or surface errors to UI.
4445
// exception on creation
4546
continue;
4647
}

Octans.Core/Duplicates/DuplicateService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ public async Task Resolve(int candidateId, DuplicateResolution resolution, int?
178178
await fileDeleter.ProcessDeletion(new[] { deleteId });
179179

180180
// We don't save a DuplicateDecision if one is deleted, because the pair is broken.
181-
// Or maybe we should? If we delete B, and reimport B later, it will be a new HashItem (new ID? No, same ID if not hard deleted).
181+
// TODO: Determine if we should handle re-import of deleted duplicates.
182+
// If we delete B, and reimport B later, it will be a new HashItem (new ID? No, same ID if not hard deleted).
182183
// ReimportChecker reactivates existing hash.
183184
// So if we delete B, B.DeletedAt is set.
184185
// If B is reimported, B.DeletedAt is cleared.

Octans.Core/Importing/Importer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private async Task<ImportItemResult> ImportIndividualItem(ImportRequest request,
8585
{
8686
ImportType.File => file.GetRawBytes(item),
8787
ImportType.RawUrl => simple.GetRawBytes(item),
88+
// TODO: Implement additional import types.
8889
_ => throw new InvalidOperationException("Import type not supported")
8990
};
9091

Octans.Core/Querying/QueryParser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private SystemPredicate ParseSystemPredicate(RawQuery query)
4444
"inbox" => new RepositoryPredicate { Repository = RepositoryType.Inbox },
4545
"archive" => new RepositoryPredicate { Repository = RepositoryType.Archive },
4646
"trash" => new RepositoryPredicate { Repository = RepositoryType.Trash },
47+
// TODO: Implement remaining system predicates.
4748
_ => throw new NotImplementedException($"System predicate '{query.Query}' is not supported.")
4849
};
4950
}

TASKS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ Network.
2727
- **Task:** Implement "Post" Import tab.
2828
- **Task:** Implement "Gallery" Import tab.
2929
- **Task:** Implement "Watchable" Import tab.
30+
- **Task:** Implement additional import types in `Importer.cs`.
3031

3132
- [ ] **Layout & Navigation**
3233
- **Task:** Implement Status Bar in Layout (to show progress, etc.).
3334

3435
- [ ] **Subscriptions**
3536
- **Task:** Implement Subscription API endpoints (`Octans.Client/Endpoints.cs`).
37+
- **Task:** Implement subscription processing logic (TODO in `Octans.Client/Endpoints.cs`).
3638

3739
## 3. Extensibility
3840

@@ -47,6 +49,7 @@ Network.
4749
- Ensure indexes exist on foreign keys in `TagParents`, `TagSiblings`.
4850
- Monitor search performance with large tag sets.
4951
- **Task:** Optimize `DuplicateService` comparison algorithm (currently O(N^2)). Use BK-tree or similar.
52+
- **Task:** Determine if re-import of deleted duplicates should be handled in `DuplicateService`.
5053

5154
- [ ] **Code Refactoring**
5255
- **Task:** Review `TagSibling` and `TagParent` 'Status' property necessity (Hydrus legacy).
@@ -56,6 +59,10 @@ Network.
5659

5760
- [ ] **Integration Testing**
5861
- Add more integration tests for the full search pipeline with complex tag hierarchies.
62+
- **Task:** Verify `QueryParser` handles all system predicates correctly.
63+
64+
- [ ] **Error Handling**
65+
- **Task:** Surface downloader creation errors to the UI in `DownloaderFactory`.
5966

6067
## Unsorted
6168

0 commit comments

Comments
 (0)