-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
⚡️ perf: try to fix layout flick #8480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Reviewer's GuideRefactors sidebar navigation and layout composition to improve performance and flicker by extracting ChatAction, introducing a dynamic InnerLink with segmentVariants, switching to an async NewServerLayout, enhancing JWKS public key handling, and integrating OIDC authentication. Sequence diagram for OIDC authentication in checkAuth middlewaresequenceDiagram
participant Client
participant Middleware
participant OIDCProvider
Client->>Middleware: Send request with Oidc-Auth header
Middleware->>OIDCProvider: validateOIDCJWT(oidcAuthorization)
OIDCProvider-->>Middleware: OIDC payload (userId, ...)
Middleware->>Middleware: Merge OIDC userId into jwtPayload
Middleware->>Middleware: Skip checkAuthMethod if OIDC used
Class diagram for new and refactored navigation componentsclassDiagram
class TopActions {
+tab
+isPinned
}
class ChatAction {
+isPinned
+tab
}
class InnerLink {
+href
+children
+...props
}
TopActions --> ChatAction : uses
TopActions --> InnerLink : uses
ChatAction --> InnerLink : uses
Class diagram for new ServerLayout and related layout changesclassDiagram
class ServerLayout {
+Desktop
+Mobile
+children
}
class RouteVariants {
+getIsMobile(props)
}
ServerLayout ..> RouteVariants : uses
Class diagram for server config store changesclassDiagram
class ServerConfigState {
+featureFlags: IFeatureFlags
+isMobile?: boolean
+segmentVariants?: string
+serverConfig: GlobalServerConfig
}
class ServerConfigStoreProvider {
+featureFlags?
+isMobile?
+segmentVariants?
+serverConfig?
+children
}
ServerConfigStoreProvider --> ServerConfigState : provides
Class diagram for OIDC JWT verification refactorclassDiagram
class getVerificationKey {
+async()
}
class validateOIDCJWT {
+async(token: string)
}
validateOIDCJWT --> getVerificationKey : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8480 +/- ##
===========================================
+ Coverage 85.31% 96.26% +10.94%
===========================================
Files 907 17 -890
Lines 68464 2917 -65547
Branches 6268 515 -5753
===========================================
- Hits 58413 2808 -55605
+ Misses 10051 109 -9942
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
👍 @arvinxx Thank you for raising your pull request and contributing to our Community |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
Summary by Sourcery
Implement OIDC authentication support, introduce URL segment variant routing, refactor sidebar and server layouts to reduce flicker and unify link handling, and fix JWT public key import.
New Features:
Oidc-Auth
header in middleware and tRPC context.segmentVariants
property in the server config store and theInnerLink
component.Bug Fixes:
getVerificationKey
.Enhancements:
ChatAction
component and replace directnext/link
usage in sidebar withInnerLink
for consistent routing.NewServerLayout
for unified desktop/mobile rendering and refactor chat workspace layout to pass props asynchronously.LOBE_CHAT_OIDC_AUTH_HEADER
constant for header consistency.