Skip to content

Unify OAuth application views - #1615

Open
skyfallwastaken wants to merge 2 commits into
mainfrom
unify-oauth-application-views
Open

Unify OAuth application views#1615
skyfallwastaken wants to merge 2 commits into
mainfrom
unify-oauth-application-views

Conversation

@skyfallwastaken

Copy link
Copy Markdown
Member

Summary of the problem

OAuth application management had separate owner and admin Svelte pages, which allowed the interfaces and their page props to drift apart.

Closes #1583.

Describe your changes

Admin routes now render the shared OAuth application index, detail and edit components while retaining admin actions and owner metadata. A shared page props presenter centralises application details, form configuration and scope options. The superseded admin pages and their unused icon component have been removed.

Screenshots / Media

Not included. The admin routes now use the existing owner-facing interface.

Copilot AI lite review requested due to automatic review settings August 20, 2026 13:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR consolidates owner and admin OAuth application pages around shared Inertia/Svelte components and a shared Rails presenter.

  • Admin index, detail and edit actions now render the common OAuth application pages with explicit admin-mode props and routes.
  • The presenter centralises summaries, form configuration, labels, scope options, owner metadata and secret presentation.
  • Admin controller coverage verifies shared components, admin context, verified-name editing, scope updates and validation errors.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified.

The shared presenter and Svelte mode branches preserve distinct owner and admin parameter keys, routes, permissions and actions, with focused controller coverage for the changed admin behavior.

Important Files Changed

Filename Overview
app/presenters/oauth_application_page_props.rb Centralises owner and admin index, show and form props while preserving mode-specific owner metadata, scope options and secret handling.
app/controllers/admin/oauth_applications_controller.rb Switches admin actions to shared pages and presenter props while retaining admin update, verification and secret-rotation behavior.
app/controllers/doorkeeper/applications_controller.rb Replaces duplicated owner-facing prop construction with the shared presenter while retaining owner scoping and scope normalization.
app/javascript/pages/OAuthApplications/Form.svelte Adds admin-aware routes, parameter names and verified-name editing to the shared form using Inertia submission.
app/javascript/pages/OAuthApplications/Index.svelte Adds admin-specific metadata and verification controls while preserving owner edit and delete controls.
app/javascript/pages/OAuthApplications/Show.svelte Adds admin owner metadata and mode-specific edit, rotation and navigation routes while keeping deletion owner-only.
test/controllers/admin/oauth_applications_controller_test.rb Covers shared admin component selection, props, verified-name editing, scope updates and validation-error rendering.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  OwnerRoute[Owner OAuth routes] --> OwnerController[Doorkeeper ApplicationsController]
  AdminRoute[Admin OAuth routes] --> AdminController[Admin OauthApplicationsController]
  OwnerController --> Presenter[OauthApplicationPageProps]
  AdminController --> Presenter
  Presenter --> SharedIndex[OAuthApplications Index]
  Presenter --> SharedShow[OAuthApplications Show]
  Presenter --> SharedForm[OAuthApplications New/Edit Form]
  SharedIndex -->|admin_mode false| OwnerActions[Owner routes and actions]
  SharedIndex -->|admin_mode true| AdminActions[Admin routes and actions]
  SharedShow -->|admin_mode false| OwnerActions
  SharedShow -->|admin_mode true| AdminActions
  SharedForm -->|doorkeeper_application params| OwnerController
  SharedForm -->|oauth_application params| AdminController
Loading

Reviews (1): Last reviewed commit: "Centralise OAuth application page props" | Re-trigger Greptile

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.

Unify OAuth2 applications view + admin OAuth2 apps view

2 participants