Skip to content

feat(ui): add scope restriction notice for user app form#152

Merged
appleboy merged 2 commits intomainfrom
worktree-buzzing-jingling-anchor
Apr 3, 2026
Merged

feat(ui): add scope restriction notice for user app form#152
appleboy merged 2 commits intomainfrom
worktree-buzzing-jingling-anchor

Conversation

@appleboy
Copy link
Copy Markdown
Member

@appleboy appleboy commented Apr 3, 2026

Summary

  • Add an info notice in the scope picker section when users create/edit apps, explaining that user-registered apps are limited to standard scopes (email, profile, openid, offline_access) and to contact an admin for custom scopes
  • Extract .admin-info-notice into a proper CSS class in admin-forms.css, replacing the inline styles previously used in user_app_form.templ

Test plan

  • Visit /apps → "Register New App" and verify the blue info notice appears above the scope picker
  • Visit /apps/:id/edit and verify the notice also appears on the edit form
  • Visit /admin/clients/new and verify the notice does NOT appear (admin form allows custom scopes)
  • Verify the "pending approval" notice in the user app form still renders correctly (no visual regression from removing inline styles)

🤖 Generated with Claude Code

- Add info notice in scope picker explaining that user-registered
  apps are limited to standard scopes
- Extract .admin-info-notice into a proper CSS class, replacing
  inline styles in user_app_form.templ

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 01:46
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

Adds a user-facing notice in the shared client scope picker to clarify that user-registered apps are limited to preset/standard scopes, and refactors the existing “admin approval required” notice styling to use a reusable CSS class.

Changes:

  • Added a conditional info notice above the scope picker when ScopePresetsOnly is enabled (user app form path).
  • Extracted the previously inline-styled “admin approval required” notice into a reusable .admin-info-notice CSS class.
  • Applied .admin-info-notice to the user app “pending approval” notice.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/templates/user_app_form.templ Removes inline styles and uses the shared .admin-info-notice class for the pending-approval notice.
internal/templates/static/css/pages/admin-forms.css Introduces the .admin-info-notice class to centralize notice styling.
internal/templates/client_shared.templ Adds a conditional scope restriction notice shown only when ScopePresetsOnly is true (user app form).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@appleboy appleboy merged commit 3ac68a0 into main Apr 3, 2026
24 of 25 checks passed
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