Skip to content

fix(studio): redirect session failures to login#159

Merged
iipanda merged 1 commit into
mainfrom
fix/session-login-redirect
May 28, 2026
Merged

fix(studio): redirect session failures to login#159
iipanda merged 1 commit into
mainfrom
fix/session-login-redirect

Conversation

@iipanda
Copy link
Copy Markdown
Collaborator

@iipanda iipanda commented May 28, 2026

Summary

  • Redirect cookie-authenticated Studio session verification failures to /admin/login with returnTo instead of rendering the session verification error screen.
  • Keep token-authentication failures inline because the host app owns bearer-token recovery.
  • Document the Studio auth-gate behavior in SPEC-006 and cover the redirect helper with regression tests.

Test Plan

  • bun test --cwd packages/studio ./src/lib/runtime-ui/app/admin/layout.test.tsx
  • bun test --cwd packages/studio ./src
  • bun run format:check
  • bun run check

Note: baseline bun run unit was not used as the final gate because the clean worktree baseline hit the existing server schema.contract.test.ts database/connection failure before this change.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@iipanda, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 44 minutes. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66173fec-7430-468d-baa0-c59dbe69546d

📥 Commits

Reviewing files that changed from the base of the PR and between ee1789d and 325c370.

📒 Files selected for processing (3)
  • docs/specs/SPEC-006-studio-runtime-and-ui.md
  • packages/studio/src/lib/runtime-ui/app/admin/layout.test.tsx
  • packages/studio/src/lib/runtime-ui/app/admin/layout.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/session-login-redirect

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 and usage tips.

@iipanda iipanda merged commit 22bf803 into main May 28, 2026
6 checks passed
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.

1 participant