Skip to content

Conversation

@nolannbiron
Copy link
Member

@nolannbiron nolannbiron commented Nov 4, 2025

This PR reworks the Authorizations section + introduces a dedicated scopes section

CleanShot 2025-11-04 at 23 21 16@2x

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

⚠️ No Changeset found

Latest commit: 9ecad33

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@argos-ci
Copy link

argos-ci bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) ⚠️ Changes detected (Review) 5 changed Nov 6, 2025, 12:09 PM
v2-cloudflare (Inspect) ⚠️ Changes detected (Review) 5 changed Nov 6, 2025, 12:13 PM
v2-vercel (Inspect) ⚠️ Changes detected (Review) 6 changed Nov 6, 2025, 12:12 PM

Copy link
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

This PR adds a new "Required Scopes" disclosure section for OpenAPI operations that require authentication scopes. The refactoring extracts scope display logic from the securities section into a dedicated component and introduces state management for disclosure groups using Zustand stores.

  • Adds OpenAPIRequiredScopes component to display authentication scopes in a collapsible section
  • Implements getOrCreateDisclosureStoreByKey for managing disclosure state across multiple instances
  • Refactors OpenAPIDisclosureGroup to support synchronized state management via store keys
  • Updates styling to accommodate the new required scopes UI component

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/react-openapi/src/getOrCreateDisclosureStoreByKey.ts New file implementing Zustand store factory for disclosure group state management
packages/react-openapi/src/context.ts Adds lock icon to the OpenAPI client context
packages/react-openapi/src/OpenAPISecurities.tsx Refactors to use new OpenAPIRequiredScopes component and removes inline scope display logic
packages/react-openapi/src/OpenAPIRequiredScopes.tsx New component for displaying required authentication scopes in a disclosure group
packages/react-openapi/src/OpenAPIDisclosureGroup.tsx Adds state persistence via Zustand store and support for className prop
packages/react-openapi/src/OpenAPIDisclosure.tsx Adds defaultExpanded prop and conditional rendering of label and panel
packages/gitbook/src/components/DocumentView/OpenAPI/style.css Adds styling for required scopes component and refactors nested CSS selectors
packages/gitbook/src/components/DocumentView/OpenAPI/context.tsx Provides lock icon implementation for GitBook context

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

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