Conversation
Add two tests for DeleteLink: one verifies a link is removed and its tag relationship is cleared, the other ensures deleting a non-existent link does not throw. Change DeleteLinkCommand namespace to Elf.Admin and update FindAsync usage. Remove an unused using in LinkController and strip inline DB-column comments from LinkEntity. Remove several redundant comments across feature handlers to simplify code. Update README: add a Development section with dotnet test instructions and change the flowchart error from 500 to 404.
Update AssemblyVersion, FileVersion, and Version in src/Directory.Build.props from 8.4.1 to 8.4.2 to publish a patch release.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is primarily a cleanup refactor: it removes obsolete leftover comments, reorders using directives, fixes an incorrect namespace on DeleteLinkCommand, removes a now-unused using in LinkController, modernizes FindAsync to pass the cancellation token, bumps version to 8.4.2, updates the README (adds a Development section and corrects the forwarder flowchart's invalid-default-URL terminal node to 404 to match ForwardController.HandleNotFoundLinkAsync), and adds tests for DeleteLinkCommandHandler.
Changes:
- Move
DeleteLinkCommandinto theElf.Admin.Featuresnamespace and use the cancellation-token overload ofFindAsync; drop the now-staleusing Elf.Api.Features;inLinkController. - Tidy
usingordering and remove restated/inline comments across several Admin features, models, and entities; minor whitespace fixes inProgram.csandIPLocationService.cs. - Add
DeleteLinkCommandHandlertests, bump version to 8.4.2, and update README with a Development section and the 404 fix in the forwarder flowchart.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Elf.Api/Services/IPLocationService.cs | Remove unused System.Net.Http.Json using (covered by implicit usings); reorder imports. |
| src/Elf.Api/Program.cs | Whitespace-only cleanup in GetIPv6Subnet. |
| src/Elf.Api.Tests/DistributedCacheExtensionsTests.cs | Drop redundant using Elf.Api; (test lives in Elf.Api.Tests, extensions resolve via namespace). |
| src/Elf.Admin/Models/LinkEditModel.cs | Reorder using directives. |
| src/Elf.Admin/Features/ListLinkQuery.cs | Remove restated inline comments. |
| src/Elf.Admin/Features/GetLinkTrackingDateCountByLinkIdQuery.cs | Remove restated inline comments. |
| src/Elf.Admin/Features/GetClientTypeCountsByLinkIdQuery.cs | Remove restated inline comments. |
| src/Elf.Admin/Features/EditLinkCommand.cs | Remove restated inline comments. |
| src/Elf.Admin/Features/DeleteLinkCommand.cs | Move to Elf.Admin.Features namespace; pass cancellation token to FindAsync. |
| src/Elf.Admin/Features/CreateLinkCommand.cs | Remove restated inline comments. |
| src/Elf.Admin/Data/TagEntity.cs | Reorder using directives. |
| src/Elf.Admin/Data/LinkEntity.cs | Remove SQL-type trailing comments on properties. |
| src/Elf.Admin/Controllers/LinkController.cs | Remove unused using Elf.Api.Features;. |
| src/Elf.Admin.Tests/DataIntegrityCommandTests.cs | Add tests for delete success (with tag preservation) and no-op for missing id. |
| src/Directory.Build.props | Bump version 8.4.1 → 8.4.2. |
| README.md | Add Development section; correct flowchart invalid-default-URL outcome to 404. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.