Repository navigation
fix(studio): hide AI chat panel before login and center auth loading spinner - #1195
Merged
Merged
Conversation
…nner Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/5fb6f6a0-3113-43a8-be7f-fe05b9313bad Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
xuyushun441-sys
April 20, 2026 12:55
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Studio's
/login(and any unauthenticated state) the AI chat toggle was visible, and the pre-auth loading spinner rendered flush to the left edge instead of centered.Root causes
<AiChatPanel />was rendered unconditionally in__root.tsx, outside any session gate.SidebarProviderwraps children in a row-flex (flex h-svh w-full). The loading container usedflex min-h-screen items-center justify-centerwith no width, so as a flex item it shrank to content width —justify-centercentered the spinner only within that shrink-wrapped box.Changes (
apps/studio/src/routes/__root.tsx)AuthedAiChatPanelthat consumesuseSession()inside the existingSessionProviderand returnsnullwhenuseris absent. Replaces the direct<AiChatPanel />render.w-full flex-1to theRequireAuthloading container so it fillsSidebarProvider's flex row, makingjustify-centereffective horizontally.The
RootComponent-level "Connecting to ObjectStack…" spinner renders outsideSidebarProviderand was already correctly centered — left untouched.