Skip to content

feat: show provider badge in quick actions#955

Open
steveiliop56 wants to merge 2 commits into
mainfrom
feat/quick-actions-provider
Open

feat: show provider badge in quick actions#955
steveiliop56 wants to merge 2 commits into
mainfrom
feat/quick-actions-provider

Conversation

@steveiliop56

@steveiliop56 steveiliop56 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Quick Actions now shows the current login provider in the dropdown, with an icon and provider label for easier account recognition.
    • Added support for local, LDAP, OAuth, and Tailscale provider badges in the interface.
  • Bug Fixes

    • Prevented provider name conflicts by blocking reserved authentication provider names from being used in custom configuration.
  • Documentation

    • Added new translated labels for the provider display in the Quick Actions menu.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fce4711-c9c3-4709-95bf-e71f438079df

📥 Commits

Reviewing files that changed from the base of the PR and between 08af455 and 93f882e.

📒 Files selected for processing (5)
  • frontend/src/components/icons/local-auth.tsx
  • frontend/src/components/quick-actions/quick-actions.tsx
  • frontend/src/lib/i18n/locales/en.json
  • internal/bootstrap/app_bootstrap.go
  • internal/model/constants.go

📝 Walkthrough

Walkthrough

Adds a ReservedProviderNames constant (local, ldap, tailscale) in the Go model and uses it to reject OAuth providers with reserved IDs during bootstrap. On the frontend, introduces a LocalAuthIcon SVG component, adds an iconMap in QuickActions, computes per-provider display details, and renders a provider badge in the dropdown header.

Changes

Provider Badge Display and Reserved Name Enforcement

Layer / File(s) Summary
Reserved provider names constant and bootstrap validation
internal/model/constants.go, internal/bootstrap/app_bootstrap.go
Exports ReservedProviderNames = []string{"local", "ldap", "tailscale"} and adds a guard in the OAuth provider setup loop that returns an error if any configured provider ID matches a reserved name.
LocalAuthIcon, providerDetails logic, dropdown badge UI, and i18n
frontend/src/components/icons/local-auth.tsx, frontend/src/components/quick-actions/quick-actions.tsx, frontend/src/lib/i18n/locales/en.json
Adds LocalAuthIcon SVG component; imports all provider icons and defines iconMap; extracts oauth and tailscale from useUserContext; computes providerDetails (name + icon) via IIFE for local, ldap, oauth, and tailscale branches; renders auth.name and the provider badge in the dropdown header; adds quickActionsProviderLocal, quickActionsProviderLDAP, and quickActionsProviderOAuth i18n keys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A badge for each login, a guard for each name,
Local and LDAP now wear their own frame.
Tailscale nods proudly, OAuth waves too,
Reserved names stay safe — no impostor slips through.
Hop hop, the dropdown shines bright and new! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main user-facing change: adding a provider badge to Quick Actions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/quick-actions-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/bootstrap/app_bootstrap.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants