remove input-otp component, upstream issues

This commit is contained in:
Amruth Pillai
2026-03-19 18:43:05 +01:00
parent f4e2d05f25
commit e34f648455
17 changed files with 188 additions and 563 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import { sql } from "drizzle-orm";
import { db } from "@/integrations/drizzle/client";
import { printerService } from "@/integrations/orpc/services/printer";
import { getStorageService } from "@/integrations/orpc/services/storage";
import { logger } from "@/utils/logger";
const HEALTHCHECK_TIMEOUT_MS = 1_500;
@@ -72,7 +71,7 @@ async function healthHandler() {
};
if (status === "unhealthy") {
logger.warn({ route: "/api/health", database, printer, storage }, "Healthcheck failed");
console.warn("[Healthcheck]", { route: "/api/health", database, printer, storage });
}
const headers = new Headers();
+1 -2
View File
@@ -10,7 +10,6 @@ import router from "@/integrations/orpc/router";
import { resumeDataSchema } from "@/schema/resume/data";
import { env } from "@/utils/env";
import { getLocale } from "@/utils/locale";
import { logServerError } from "@/utils/logger";
const openAPIHandler = new OpenAPIHandler(router, {
plugins: [
@@ -23,7 +22,7 @@ const openAPIHandler = new OpenAPIHandler(router, {
],
interceptors: [
onError((error) => {
logServerError("OpenAPI handler error", error, { route: "/api/openapi" });
console.error("[OpenAPI]", error);
}),
],
});
+1 -2
View File
@@ -5,13 +5,12 @@ import { createFileRoute } from "@tanstack/react-router";
import router from "@/integrations/orpc/router";
import { getLocale } from "@/utils/locale";
import { logServerError } from "@/utils/logger";
const rpcHandler = new RPCHandler(router, {
plugins: [new BatchHandlerPlugin(), new RequestHeadersPlugin(), new StrictGetMethodPlugin()],
interceptors: [
onError((error) => {
logServerError("oRPC server error", error, { route: "/api/rpc" });
console.error("[oRPC Server]", error);
}),
],
});
+2 -28
View File
@@ -3,14 +3,13 @@ import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { ArrowLeftIcon, CheckIcon } from "@phosphor-icons/react";
import { createFileRoute, Link, redirect, useNavigate, useRouter } from "@tanstack/react-router";
import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import z from "zod";
import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "@/components/ui/input-otp";
import { Input } from "@/components/ui/input";
import { authClient } from "@/integrations/auth/client";
export const Route = createFileRoute("/auth/verify-2fa-backup")({
@@ -72,32 +71,7 @@ function RouteComponent() {
render={({ field }) => (
<FormItem className="justify-self-center">
<FormControl
render={
<InputOTP
maxLength={10}
value={field.value}
pattern={REGEXP_ONLY_DIGITS_AND_CHARS}
onChange={field.onChange}
onComplete={form.handleSubmit(onSubmit)}
pasteTransformer={(pasted) => pasted.replaceAll("-", "")}
>
<InputOTPGroup>
<InputOTPSlot index={0} className="size-12" />
<InputOTPSlot index={1} className="size-12" />
<InputOTPSlot index={2} className="size-12" />
<InputOTPSlot index={3} className="size-12" />
<InputOTPSlot index={4} className="size-12" />
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
<InputOTPSlot index={5} className="size-12" />
<InputOTPSlot index={6} className="size-12" />
<InputOTPSlot index={7} className="size-12" />
<InputOTPSlot index={8} className="size-12" />
<InputOTPSlot index={9} className="size-12" />
</InputOTPGroup>
</InputOTP>
}
render={<Input maxLength={10} value={field.value} onChange={field.onChange} className="max-w-xs" />}
/>
<FormMessage />
</FormItem>
+5 -19
View File
@@ -3,14 +3,13 @@ import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { ArrowLeftIcon, CheckIcon } from "@phosphor-icons/react";
import { createFileRoute, Link, redirect, useNavigate, useRouter } from "@tanstack/react-router";
import { REGEXP_ONLY_DIGITS } from "input-otp";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import z from "zod";
import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "@/components/ui/input-otp";
import { Input } from "@/components/ui/input";
import { authClient } from "@/integrations/auth/client";
export const Route = createFileRoute("/auth/verify-2fa")({
@@ -74,26 +73,13 @@ function RouteComponent() {
<FormItem className="justify-self-center">
<FormControl
render={
<InputOTP
<Input
type="number"
maxLength={6}
value={field.value}
pattern={REGEXP_ONLY_DIGITS}
onChange={field.onChange}
onComplete={form.handleSubmit(onSubmit)}
pasteTransformer={(pasted) => pasted.replaceAll("-", "")}
>
<InputOTPGroup>
<InputOTPSlot index={0} className="size-12" />
<InputOTPSlot index={1} className="size-12" />
<InputOTPSlot index={2} className="size-12" />
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
<InputOTPSlot index={3} className="size-12" />
<InputOTPSlot index={4} className="size-12" />
<InputOTPSlot index={5} className="size-12" />
</InputOTPGroup>
</InputOTP>
className="max-w-xs"
/>
}
/>
<FormMessage />
+1 -3
View File
@@ -2,8 +2,6 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
import { createFileRoute } from "@tanstack/react-router";
import { logger } from "@/utils/logger";
import { registerPrompts } from "./-helpers/prompts";
import { registerResources } from "./-helpers/resources";
import { registerTools } from "./-helpers/tools";
@@ -54,7 +52,7 @@ export const Route = createFileRoute("/mcp/")({
return await transport.handleRequest(request);
} catch (error) {
logger.error({ err: error, route: "/mcp" }, "MCP request failed");
console.error("[MCP]", error);
return Response.json({
id: null,