Skip to content

feat: add warning about use of old/removed/invalid experiments #12962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review comments
Signed-off-by: Danny Kopping <danny@coder.com>
  • Loading branch information
dannykopping committed Apr 17, 2024
commit a604f17fb7e202e2ea1fe4ddb413428516b01bdc
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@ const GeneralSettingsPage: FC = () => {
const enabledExperimentsQuery = useQuery(experiments());
const safeExperimentsQuery = useQuery(availableExperiments());

const safeExperiments: string[] = [];
const invalidExperiments: string[] = [];

(safeExperimentsQuery.data?.safe ?? []).forEach((value) =>
safeExperiments.push(value),
);

(enabledExperimentsQuery.data ?? []).forEach(function (exp) {
const found = (safeExperimentsQuery.data?.safe ?? []).find((value) => {
return exp === value;
});

if (!found) {
invalidExperiments.push(exp);
}
});
const safeExperiments = safeExperimentsQuery.data?.safe ?? [];
const invalidExperiments =
enabledExperimentsQuery.data?.filter(exp => {
return !safeExperiments.includes(exp);
}) ?? [];

return (
<>
Expand Down
Loading