Skip to content

fix(ui): hide the empty scope list when only offline_access is requested - #9877

Merged
wobsoriano merged 2 commits into
mainfrom
rob/fix-9852
Sep 22, 2026
Merged

wobsoriano merged 2 commits into
mainfrom
rob/fix-9852

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Sep 22, 2026

Copy link
Copy Markdown
Member

Description

When an OAuth client requests only offline_access, the "This will allow X access to:" header still rendered over an empty list. This PR hides the list when there are no scopes to show.

Before

Screenshot 2026-09-22 at 3 26 41 PM

After

Screenshot 2026-09-22 at 3 22 58 PM

Fixes #9852

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: de53659

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Sep 22, 2026 10:29pm UTC
swingset Ready Ready Preview Sep 22, 2026 10:29pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: 2f5c1860-36eb-472d-b368-25589e5ff643

📥 Commits

Reviewing files that changed from the base of the PR and between 5e72bb8 and de53659.

📒 Files selected for processing (5)
  • .changeset/quiet-scopes-offline.md
  • packages/ui/src/components/OAuthConsent/OAuthConsent.tsx
  • packages/ui/src/components/OAuthConsent/__tests__/OAuthConsent.test.tsx
  • packages/ui/src/components/OAuthDeviceVerification/OAuthDeviceVerification.tsx
  • packages/ui/src/components/OAuthDeviceVerification/__tests__/OAuthDeviceVerification.test.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

Included review availability: 8 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

This change updates OAuthConsent and OAuthDeviceVerification so they render the scope-list section only when displayedScopes has at least one item. It adds test coverage for normal scope rendering in OAuthConsent and for offline_access-only requests in both flows. In those cases, the session-duration notice still appears, but the scope-list heading does not. A changeset records a patch release for @clerk/ui.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to de536

The empty permissions section is removed while the offline-access notice remains covered. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: hiding the empty scope list when only offline_access is requested.
Description check ✅ Passed The description explains the empty-list issue and the change that hides the permissions section when no scopes are displayed.
Linked Issues check ✅ Passed [#9852] requires the permissions group to be hidden, or an offline_access row to be shown, when offline_access is the only requested scope. OAuthConsent.tsx now renders the group only when displayedSc…
Out of Scope Changes check ✅ Passed The changes to OAuthDeviceVerification use the same displayedScopes condition and address the same empty permissions group for offline_access-only requests. The added test covers this case. The Change…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

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

@github-actions github-actions Bot added the ui label Sep 22, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9877

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9877

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9877

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9877

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9877

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9877

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9877

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9877

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9877

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9877

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9877

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9877

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9877

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9877

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@9877

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9877

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9877

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9877

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9877

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9877

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9877

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9877

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9877

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9877

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9877

commit: de53659

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-09-22T22:31:15.563Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on de53659.

@wobsoriano
wobsoriano merged commit 8664695 into main Sep 22, 2026
53 checks passed
@wobsoriano
wobsoriano deleted the rob/fix-9852 branch September 22, 2026 22:43

This branch was successfully deployed

2 active deployments
Preview – swingset de536597 Deployed Sep 22, 2026 by vercel[bot]
Preview – clerk-js-sandbox de536597 Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuthConsent shows an empty permissions list when only offline_access is requested

2 participants