Conversation
…ure-state-view-unified
Co-authored-by: Zaimwa9 <wadii.zaim@flagsmith.com>
…ent-feature-state-view # Conflicts: # frontend/web/components/feature-page/FeatureFilters.tsx # frontend/web/components/pages/FeaturesPage.js # frontend/web/components/pages/UserPage.tsx # frontend/web/components/tables/TableValueFilter.tsx
Co-authored-by: Zaimwa9 <wadii.zaim@flagsmith.com>
Co-authored-by: Zaimwa9 <wadii.zaim@flagsmith.com>
…ent-feature-state-view # Conflicts: # frontend/web/components/modals/AssociatedSegmentOverrides.js
…ent-feature-state-view
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 (oss - depot-ubuntu-latest-arm-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 (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
|
| const envId = project?.environments?.find( | ||
| (env) => env.api_key === environmentId, | ||
| )?.id | ||
| if (!envId) { | ||
| setUserOverridesNoPermissionState() | ||
| return | ||
| } |
There was a problem hiding this comment.
I think I might have found a bug
This is comparing api_key (a string like "RAvjEqbj96SXiJP4hQHd5E") with environmentId which is now a numeric ID (e.g. "123") after #6322. They'll never match, so it always falls into the no-permission state.
environmentId is already the numeric ID, so this lookup can be removed and environmentId passed directly to getPermission.
I am getting this:
| getPermission( | ||
| getStore(), | ||
| { | ||
| id: envId, | ||
| level: 'environment', | ||
| }, | ||
| { forceRefetch }, | ||
| ) |
There was a problem hiding this comment.
| getPermission( | |
| getStore(), | |
| { | |
| id: envId, | |
| level: 'environment', | |
| }, | |
| { forceRefetch }, | |
| ) | |
| getPermission( | |
| getStore(), | |
| { | |
| id: environmentId, | |
| level: 'environment', | |
| }, | |
| { forceRefetch }, | |
| ) |
it seems to do the trick
| const environment = project?.environments?.find( | ||
| (env) => env.api_key === environmentId, | ||
| ) |
There was a problem hiding this comment.
Same api_key vs numeric ID issue as above — environment is always undefined, so isVersioned and is4Eyes are always false. This silently bypasses 4-eyes/change requests for segment overrides.
There was a problem hiding this comment.
| const environment = project?.environments?.find( | |
| (env) => env.api_key === environmentId, | |
| ) | |
| const environment = getEnvironment(environmentId) |
frontend/web/components/modals/create-feature/tabs/IdentityOverridesTab.tsx
Show resolved
Hide resolved
…rridesTab.tsx Co-authored-by: Talisson <talisson.odcosta@gmail.com>
fe307fc to
d77370d
Compare
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Migrates all tabs including the create feature modal itself to TypeScript, no type errors to do with creating / editing a feature and also reduces the feature modal by ~1200 LoC.
Migrates a few components to ES export
How did you test this code?