Repository navigation
Improve OAuth application administration - #2544
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
When updating an application that already has organization associations, this calls FromApplication without the name dictionary, whose fallback sets every organization's Name to its ID. Consequently, the PUT response disagrees with the list and detail responses and exposes incorrect display names; map the updated application through MapApplicationsAsync before returning it.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c949baffe7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
When multiple OAuth applications have the same name, the new offset-paged endpoint sorts only by that non-unique field. Elasticsearch may order tied documents differently between page requests, particularly across shards or replicas, causing applications to be duplicated or skipped as an administrator pages through the table. Append a stable secondary sort such as Id.
Exceptionless/src/Exceptionless.Web/Api/Handlers/OAuthApplicationHandler.cs
Lines 138 to 142 in 1885d7c
When an application retains an association to a subsequently deleted organization, filtering by that organization's exact ID returns no applications because this lookup uses the repository's default active-only soft-delete mode. The association remains on the OAuth application and is still displayed as its ID, so the documented historical administration data becomes unsearchable; resolve IDs with soft deletes included or pass an exact object ID directly to the application query.
When more than one page of matching organizations crosses a group that shares the same name, search-after cannot resume reliably from this non-unique sort value and can skip the remaining organizations with that name, making associated OAuth applications disappear from the filter results. The current all-page fix still sorts only by non-unique Name; append Id as a stable secondary sort.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
API and behavior
Verification
dotnet build tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-restoreOAuthApplicationEndpointTests— 9 passedPopulateOAuthApplicationOrganizationIdsMigrationTests— 1 passedMigrationRegistrationTests— 3 passedEndpointManifestTests— 1 passednpm run checknpm run lintnpm run buildBreaking changes
None.