Skip to content

Commit 8d334aa

Browse files
committed
format, typecheck, fix build
1 parent 68a6492 commit 8d334aa

18 files changed

Lines changed: 450 additions & 418 deletions

File tree

apps/webapp/app/components/Feedback.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { getFormProps, getSelectProps, getInputProps, getTextareaProps, useForm } from "@conform-to/react";
1+
import {
2+
getFormProps,
3+
getSelectProps,
4+
getInputProps,
5+
getTextareaProps,
6+
useForm,
7+
} from "@conform-to/react";
28
import { parseWithZod } from "@conform-to/zod/v4";
39
import { InformationCircleIcon, ArrowUpCircleIcon } from "@heroicons/react/20/solid";
410
import { EnvelopeIcon, ShieldCheckIcon } from "@heroicons/react/24/solid";
@@ -89,9 +95,17 @@ export function Feedback({ button, defaultValue = "bug", onOpenChange }: Feedbac
8995
type === "concurrency" ||
9096
type === "hipaa"
9197
) && <hr className="border-grid-dimmed" />}
92-
<Form method="post" action="/resources/feedback" {...getFormProps(form)} className="w-full">
98+
<Form
99+
method="post"
100+
action="/resources/feedback"
101+
{...getFormProps(form)}
102+
className="w-full"
103+
>
93104
<Fieldset className="max-w-full gap-y-3">
94-
<input value={location.pathname} {...getInputProps(fields.path, { type: "hidden", value: false })} />
105+
<input
106+
value={location.pathname}
107+
{...getInputProps(fields.path, { type: "hidden", value: false })}
108+
/>
95109
<InputGroup className="max-w-full">
96110
{type === "feature" && (
97111
<InfoPanel

apps/webapp/app/components/billing/BillingAlertsSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getFormProps, getInputProps, useForm, type SubmissionResult } from "@conform-to/react";
2-
import { parseWithZod } from "@conform-to/zod";
2+
import { parseWithZod } from "@conform-to/zod/v4";
33
import { PlusIcon, TrashIcon } from "@heroicons/react/20/solid";
44
import { Form, useActionData, useSearchParams } from "@remix-run/react";
55
import { Fragment, useEffect, useMemo, useRef, useState } from "react";

apps/webapp/app/components/billing/BillingLimitConfigSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getFormProps, useForm, type SubmissionResult } from "@conform-to/react";
22

3-
import { parseWithZod } from "@conform-to/zod";
3+
import { parseWithZod } from "@conform-to/zod/v4";
44
import { Form, useActionData } from "@remix-run/react";
55
import { useEffect, useMemo, useRef, useState } from "react";
66
import { z } from "zod";
@@ -36,7 +36,7 @@ export const billingLimitFormSchema = z.discriminatedUnion("mode", [
3636
z.object({
3737
mode: z.literal("custom"),
3838
amount: z.coerce
39-
.number({ invalid_type_error: "Not a valid amount" })
39+
.number({ error: "Not a valid amount" })
4040
.positive("Amount must be greater than 0"),
4141
cancelInProgressRuns: z
4242
.preprocess((v) => v === "on" || v === true || v === "true", z.boolean())

apps/webapp/app/components/billing/BillingLimitRecoveryPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getFormProps, useForm, type SubmissionResult } from "@conform-to/react";
2-
import { parseWithZod } from "@conform-to/zod";
2+
import { parseWithZod } from "@conform-to/zod/v4";
33
import { Form, useActionData, useNavigation } from "@remix-run/react";
44
import { useEffect, useMemo, useRef, useState } from "react";
55
import { z } from "zod";
@@ -21,7 +21,7 @@ export const billingLimitRecoveryFormSchema = z
2121
.object({
2222
action: z.enum(["increase", "remove"]),
2323
newAmount: z.coerce
24-
.number({ invalid_type_error: "Not a valid amount" })
24+
.number({ error: "Not a valid amount" })
2525
.positive("Amount must be greater than 0")
2626
.optional(),
2727
resumeMode: z.enum(["queue", "new_only"]),
@@ -87,7 +87,7 @@ export function BillingLimitRecoveryPanel({
8787
},
8888
defaultValue: {
8989
action: "increase",
90-
newAmount: suggestedNewLimitDollars,
90+
newAmount: String(suggestedNewLimitDollars),
9191
resumeMode: "queue",
9292
},
9393
});

apps/webapp/app/components/errors/ConfigureErrorAlerts.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,7 @@ export function ConfigureErrorAlerts({
135135
/>
136136
</div>
137137

138-
<fetcher.Form
139-
method="post"
140-
action={formAction}
141-
{...getFormProps(form)}
142-
className="contents"
143-
>
138+
<fetcher.Form method="post" action={formAction} {...getFormProps(form)} className="contents">
144139
<div className="flex-1 overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
145140
<Fieldset className="flex flex-col gap-4 p-4">
146141
<div className="flex flex-col">

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new/route.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,22 @@ const schema = z.object({
7373
if (i === "true") return true;
7474
return false;
7575
}, z.boolean()),
76-
environmentIds: z.preprocess((i) => {
77-
if (typeof i === "string") return [i];
78-
79-
if (Array.isArray(i)) {
80-
const ids = i.filter((v) => typeof v === "string" && v !== "");
81-
if (ids.length === 0) {
82-
return;
76+
environmentIds: z.preprocess(
77+
(i) => {
78+
if (typeof i === "string") return [i];
79+
80+
if (Array.isArray(i)) {
81+
const ids = i.filter((v) => typeof v === "string" && v !== "");
82+
if (ids.length === 0) {
83+
return;
84+
}
85+
return ids;
8386
}
84-
return ids;
85-
}
8687

87-
return;
88-
}, z.array(z.string(), { error: "At least one environment is required" })),
88+
return;
89+
},
90+
z.array(z.string(), { error: "At least one environment is required" })
91+
),
8992
variables: z.preprocess((i) => {
9093
if (!Array.isArray(i)) {
9194
return [];

0 commit comments

Comments
 (0)