Skip to content

Refactor#117

Merged
EdiWang merged 2 commits into
masterfrom
refactor
May 31, 2026
Merged

Refactor#117
EdiWang merged 2 commits into
masterfrom
refactor

Conversation

@EdiWang
Copy link
Copy Markdown
Owner

@EdiWang EdiWang commented May 31, 2026

No description provided.

EdiWang added 2 commits May 31, 2026 18:50
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.
Copilot AI review requested due to automatic review settings May 31, 2026 10:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DeleteLinkCommand into the Elf.Admin.Features namespace and use the cancellation-token overload of FindAsync; drop the now-stale using Elf.Api.Features; in LinkController.
  • Tidy using ordering and remove restated/inline comments across several Admin features, models, and entities; minor whitespace fixes in Program.cs and IPLocationService.cs.
  • Add DeleteLinkCommandHandler tests, 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.

@EdiWang EdiWang merged commit fe83ca8 into master May 31, 2026
2 checks passed
@EdiWang EdiWang deleted the refactor branch May 31, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants