Skip to content

refactor: migrate ServerSideSDKKeys to FC#7003

Draft
talissoncosta wants to merge 3 commits intomainfrom
refactor/server-side-sdk-keys-rtk-migration
Draft

refactor: migrate ServerSideSDKKeys to FC#7003
talissoncosta wants to merge 3 commits intomainfrom
refactor/server-side-sdk-keys-rtk-migration

Conversation

@talissoncosta
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #7002

Migrate ServerSideSDKKeys.js from a Flux class component to functional components with RTK Query, behind a feature flag (rtk_server_side_sdk_keys).

  • Extract into feature folder pages/sdk-keys/ following existing domain-driven patterns
  • Split into focused components: ServerSideSDKKeys, CreateServerSideKeyModal, ServerSideKeyRow
  • Replace ProjectStore.getEnvironment() with useGetEnvironmentsQuery (fixes Sentry FLAGSMITH-FRONTEND-4FX)
  • Replace imperative getStore().dispatch() with RTK Query hooks
  • Old ServerSideSDKKeys.js preserved untouched — feature flag toggles at SDKKeysPage level

How did you test this code?

  • TypeScript compiles with no errors
  • ESLint passes
  • Manual testing pending with feature flag enabled

🤖 Generated with Claude Code

talissoncosta and others added 3 commits March 18, 2026 15:45
Migrate ServerSideSDKKeys from Flux class components to functional
components with RTK Query hooks, split into smaller focused components:
- CreateServerSideKeyModal: modal for creating new keys
- ServerSideKeyRow: individual key row rendering
- ServerSideSDKKeys: main component using RTK Query hooks

This fixes FLAGSMITH-FRONTEND-4FX where ProjectStore.getEnvironment()
could return undefined and crash the modal render.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create the new SDKKeysPage within the pages/sdk-keys feature folder,
following the domain-driven folder pattern used by other features
(e.g. pages/features/, pages/organisation-settings/).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire up feature flag in the existing SDKKeysPage entry point to
switch between the legacy Flux-based implementation and the new
RTK Query version. When the flag is off, behaviour is unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Mar 20, 2026 3:19pm
flagsmith-frontend-staging Ready Ready Preview, Comment Mar 20, 2026 3:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Mar 20, 2026 3:19pm

Request Review

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Mar 20, 2026
@talissoncosta talissoncosta changed the title Migrate ServerSideSDKKeys to functional component with RTK Query refactor: migrate ServerSideSDKKeys to functional component with RTK Query Mar 20, 2026
@talissoncosta talissoncosta changed the title refactor: migrate ServerSideSDKKeys to functional component with RTK Query refactor: migrate ServerSideSDKKeys to FC Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant