fix: keep API key migration instructions visible after JWT migration by awaseem · Pull Request #45156 · supabase/supabase · GitHub
Skip to content

fix: keep API key migration instructions visible after JWT migration#45156

Open
awaseem wants to merge 1 commit intomasterfrom
aliwaseem/fe-3055-keep-api-key-migration-instructions-visible-after-click
Open

fix: keep API key migration instructions visible after JWT migration#45156
awaseem wants to merge 1 commit intomasterfrom
aliwaseem/fe-3055-keep-api-key-migration-instructions-visible-after-click

Conversation

@awaseem
Copy link
Copy Markdown
Contributor

@awaseem awaseem commented Apr 23, 2026

Summary

Fixes FE-3055.

Fix: keep the callout mounted whenever disableLegacyJwtSecretRotation is on, while preserving the original behavior for the legacy flow.

- {!isPending && !legacyKey && (
+ {!isPending && (disableLegacyJwtSecretRotation || !legacyKey) && (

Test plan

  • On a project with a legacy JWT secret and disableLegacyJwtSecretRotation enabled, open the legacy JWT secret page — callout is visible
  • Click Migrate JWT secret on the JWT Signing Keys page, return to the legacy JWT secret page — callout remains visible with all 4 steps
  • With disableLegacyJwtSecretRotation off, verify the original behavior is unchanged (callout hides once legacyKey exists)

Summary by CodeRabbit

  • Features
    • Expanded legacy JWT secret rotation UI visibility to display under additional configuration scenarios, enhancing access to secret migration functionality.

…(FE-3055)

The callout on the legacy JWT secret page that explains how to migrate to
the new API keys was gated on !legacyKey, which made it disappear as soon
as the user clicked "Migrate JWT secret". The callout describes a 4-step
flow, so steps 2-4 need to remain visible after step 1.

Keep the callout mounted whenever disableLegacyJwtSecretRotation is on
(the new migration flow), while preserving the original behavior for the
legacy "Change legacy JWT secret" UX.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 23, 2026

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

The conditional rendering logic for the legacy JWT secret rotation UI was extended to display not only when requests are not pending and no legacy key exists, but also whenever the disableLegacyJwtSecretRotation feature flag is enabled.

Changes

Cohort / File(s) Summary
JWT Settings UI Logic
apps/studio/components/interfaces/JwtSecrets/jwt-settings.tsx
Extended conditional rendering logic to show legacy JWT secret rotation UI when the disableLegacyJwtSecretRotation feature flag is enabled, in addition to existing conditions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A flag now flips, the secrets aligned,
Legacy rotations no longer confined,
One line of logic, a change oh so neat,
JWT magic, our rabbit's treat! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: keeping API key migration instructions visible after JWT migration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description includes a clear summary with issue reference, code changes, and comprehensive test plan covering all scenarios including edge cases.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aliwaseem/fe-3055-keep-api-key-migration-instructions-visible-after-click

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.

@awaseem awaseem marked this pull request as ready for review April 23, 2026 13:34
@awaseem awaseem requested a review from a team as a code owner April 23, 2026 13:34
@github-actions
Copy link
Copy Markdown
Contributor

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