refactor: modernise Server-side SDK Keys page#7003
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ffb4bba to
c4ade31
Compare
frontend/web/components/pages/sdk-keys/components/CreateServerSideKeyModal.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Zaimwa9
left a comment
There was a problem hiding this comment.
Nice overall thanks. It would be preferable IMO to target the feature flag and get rid now of the previous SDKPage instead of duplicating it
Zaimwa9
left a comment
There was a problem hiding this comment.
Thanks for making the changes but one question on your radar: Have the changes been made in the right duplicated page?
It looks like the one in pages/sdk-keys got removed while the one in components stayed?
New functional components with TypeScript, RTK Query hooks, and React 19 useActionState for the Server-side SDK Keys page. Component structure: - pages/sdk-keys/SDKKeysPage.tsx — page layout with environment query - pages/sdk-keys/components/ServerSideSDKKeys.tsx — permission check, list - pages/sdk-keys/components/CreateServerSideKeyModal.tsx — useActionState form - pages/sdk-keys/components/ServerSideKeyRow.tsx — per-row delete loading - pages/sdk-keys/hooks/useServerSideKeys.tsx — data fetching + CRUD Improvements over legacy: - RTK Query replaces Flux store (fixes Sentry FLAGSMITH-FRONTEND-4FX) - Per-row delete loading via originalArgs tracking - Icons use currentColor instead of hardcoded fill - Correct data-test IDs and target attributes - opacity-50 utility class added Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d19370a to
0d22e96
Compare
Add SDKKeysGate component that switches between legacy and new page based on the feature flag. Route points to the gate — legacy SDKKeysPage.tsx is completely untouched. When the flag is removed (#7140), delete the gate and legacy file, update the route to point to SDKKeysPage directly. Also fixes cache invalidation tags in useServersideEnvironmentKey.ts so the keys list refreshes after create/delete. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0d22e96 to
bf5963d
Compare
…tKeysSettings Per review feedback — avoid short-lived Gate naming convention. SDKKeysPage is now the route entry point with the flag switch, SDKEnvironmentKeysSettings is the clean new page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers the server-side SDK keys flow: navigate to SDK Keys page, create a key, verify it appears in the list, delete it, verify it's removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
docs/if required so people know about the feature.Changes
Contributes to #7002
Migrate
ServerSideSDKKeys.jsfrom a Flux class component to functional components with RTK Query, behind a feature flag (rtk_server_side_sdk_keys).Migration
ProjectStore.getEnvironment()withuseGetEnvironmentsQuery(fixes Sentry FLAGSMITH-FRONTEND-4FX)getStore().dispatch()with RTK Query hooksuseHasPermissionhookComponent structure
Feature flag strategy
Old
ServerSideSDKKeys.jspreserved untouched — feature flag toggles atSDKKeysPagelevel:React 19
CreateServerSideKeyModalusesuseActionStateto manage form submission —isPendingand error state are handled automatically, replacing manualuseStateforisSaving.Bug fixes
providesTagsnow matchesinvalidatesTags(LISTtag) so the keys list refreshes automatically after create/deleteoriginalArgsto track which row is being deleted — only the affected row fades outfill='#656D7B', icons usecurrentColorviatext-bodyclassCleanups
segments-page→sdk-keys-page,org-members-list→server-side-keys-list,remove-feature→remove-sdk-keytarget='__blank'→_blankfilterRowto use.includes()handleCreateKeyfrom inline callbackuseServerSideKeyshook to separate data logic from UIopacity-50reusable utility classEnvironmentPermission.ADMINenum instead of raw stringReviewer notes
rtk_server_side_sdk_keysis offuseServersideEnvironmentKey.ts(cache tag fix) — this is a no-op for the legacy path since it manually refetchesHow did you test this code?
npm run typecheck)