Skip to content

Commit 5e38b25

Browse files
committed
format, typecheck, fix build
1 parent f956b28 commit 5e38b25

14 files changed

Lines changed: 62 additions & 40 deletions

File tree

‎apps/webapp/app/components/Feedback.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
getTextareaProps,
66
useForm,
77
} from "@conform-to/react";
8-
import { parseWithZod } from "@conform-to/zod";
8+
import { parseWithZod } from "@conform-to/zod/v4";
99
import { InformationCircleIcon, ArrowUpCircleIcon } from "@heroicons/react/20/solid";
1010
import { EnvelopeIcon, ShieldCheckIcon } from "@heroicons/react/24/solid";
1111
import { Form, useActionData, useLocation, useNavigation, useSearchParams } from "@remix-run/react";
@@ -130,7 +130,7 @@ export function Feedback({
130130
<Fieldset className="max-w-full gap-y-3">
131131
<input
132132
value={location.pathname}
133-
{...getInputProps(fields.path, { type: "hidden" })}
133+
{...getInputProps(fields.path, { type: "hidden", value: false })}
134134
/>
135135
<InputGroup className="max-w-full">
136136
{type === "feature" && (

‎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";
@@ -38,7 +38,7 @@ export const billingLimitFormSchema = z.discriminatedUnion("mode", [
3838
z.object({
3939
mode: z.literal("custom"),
4040
amount: z.coerce
41-
.number({ invalid_type_error: "Not a valid amount" })
41+
.number({ error: "Not a valid amount" })
4242
.positive("Amount must be greater than 0"),
4343
cancelInProgressRuns: z
4444
.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"]),
@@ -88,7 +88,7 @@ export function BillingLimitRecoveryPanel({
8888
},
8989
defaultValue: {
9090
action: "increase",
91-
newAmount: suggestedNewLimitDollars,
91+
newAmount: String(suggestedNewLimitDollars),
9292
resumeMode: "queue",
9393
},
9494
});

‎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
@@ -77,19 +77,22 @@ const schema = z.object({
7777
if (i === "true") return true;
7878
return false;
7979
}, z.boolean()),
80-
environmentIds: z.preprocess((i) => {
81-
if (typeof i === "string") return [i];
82-
83-
if (Array.isArray(i)) {
84-
const ids = i.filter((v) => typeof v === "string" && v !== "");
85-
if (ids.length === 0) {
86-
return;
80+
environmentIds: z.preprocess(
81+
(i) => {
82+
if (typeof i === "string") return [i];
83+
84+
if (Array.isArray(i)) {
85+
const ids = i.filter((v) => typeof v === "string" && v !== "");
86+
if (ids.length === 0) {
87+
return;
88+
}
89+
return ids;
8790
}
88-
return ids;
89-
}
9091

91-
return;
92-
}, z.array(z.string(), { error: "At least one environment is required" })),
92+
return;
93+
},
94+
z.array(z.string(), { error: "At least one environment is required" })
95+
),
9396
variables: z.preprocess((i) => {
9497
if (!Array.isArray(i)) {
9598
return [];

‎apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.billing-limits/route.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseWithZod } from "@conform-to/zod";
1+
import { parseWithZod } from "@conform-to/zod/v4";
22
import { json, redirect } from "@remix-run/server-runtime";
33
import { tryCatch } from "@trigger.dev/core";
44
import { typedjson, useTypedLoaderData } from "remix-typedjson";

‎apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.team/route.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,11 +1014,11 @@ export function PurchaseSeatsModal({
10141014
// when the role can't manage billing. The action enforces it independently.
10151015
const noBillingTooltip = "You don't have permission to manage billing";
10161016
const trigger = canManageBilling ? (
1017-
triggerButton ?? (
1017+
(triggerButton ?? (
10181018
<Button variant="primary/small" onClick={() => setOpen(true)}>
10191019
{title}
10201020
</Button>
1021-
)
1021+
))
10221022
) : triggerButton ? (
10231023
cloneElement(triggerButton, { disabled: true, tooltip: noBillingTooltip })
10241024
) : (
@@ -1036,7 +1036,11 @@ export function PurchaseSeatsModal({
10361036
<DialogTrigger asChild>{trigger}</DialogTrigger>
10371037
<DialogContent>
10381038
<DialogHeader>{title}</DialogHeader>
1039-
<fetcher.Form method="post" action={organizationTeamPath(organization)} {...getFormProps(form)}>
1039+
<fetcher.Form
1040+
method="post"
1041+
action={organizationTeamPath(organization)}
1042+
{...getFormProps(form)}
1043+
>
10401044
<input type="hidden" name="_formType" value="purchase-seats" />
10411045
<div className="flex flex-col gap-4 pt-2">
10421046
<div className="flex flex-col gap-1">

‎apps/webapp/app/routes/_app.orgs.$organizationSlug_.projects.new/route.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ export default function Page() {
404404
</InputGroup>
405405
{canCreateV3Projects ? (
406406
<input
407-
{...getInputProps(projectVersion, { type: "hidden" })}
407+
{...getInputProps(projectVersion, { type: "hidden", value: false })}
408408
defaultValue={"v3"}
409409
/>
410410
) : (
411411
<input
412-
{...getInputProps(projectVersion, { type: "hidden" })}
412+
{...getInputProps(projectVersion, { type: "hidden", value: false })}
413413
defaultValue={"v2"}
414414
/>
415415
)}

‎apps/webapp/app/routes/confirm-basic-details.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@ export default function Page() {
323323
<FormError id={confirmEmail.errorId}>{confirmEmail.errors}</FormError>
324324
</InputGroup>
325325
) : (
326-
<input {...getInputProps(confirmEmail, { type: "hidden" })} value={user.email} />
326+
<input
327+
{...getInputProps(confirmEmail, { type: "hidden", value: false })}
328+
value={user.email}
329+
/>
327330
)}
328331

329332
{isManagedCloud && (

‎apps/webapp/app/routes/resources.branches.archive.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export function ArchiveButton({
100100
{...getFormProps(form)}
101101
className="w-full"
102102
>
103-
<input value={environment.id} {...getInputProps(environmentId, { type: "hidden", value: false })} />
103+
<input
104+
value={environment.id}
105+
{...getInputProps(environmentId, { type: "hidden", value: false })}
106+
/>
104107
<input
105108
value={`${location.pathname}${location.search}`}
106109
{...getInputProps(redirectPath, { type: "hidden", value: false })}

0 commit comments

Comments
 (0)