Skip to content

Adds a new entry in the help and feedback modal to request more concurrency #1936

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 1 commit into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 17 additions & 2 deletions apps/webapp/app/components/Feedback.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { conform, useForm } from "@conform-to/react";
import { parse } from "@conform-to/zod";
import { InformationCircleIcon } from "@heroicons/react/20/solid";
import { InformationCircleIcon, ArrowUpCircleIcon } from "@heroicons/react/20/solid";
import { EnvelopeIcon } from "@heroicons/react/24/solid";
import { Form, useActionData, useLocation, useNavigation } from "@remix-run/react";
import { type ReactNode, useEffect, useState } from "react";
Expand Down Expand Up @@ -64,7 +64,9 @@ export function Feedback({ button, defaultValue = "bug" }: FeedbackProps) {
How can we help? We read every message and will respond as quickly as we can.
</Paragraph>
</div>
<hr className="border-charcoal-800" />
{!(type === "feature" || type === "help" || type === "concurrency") && (
<hr className="border-grid-dimmed" />
)}
<Form method="post" action="/resources/feedback" {...form.props} className="w-full">
<Fieldset className="max-w-full gap-y-3">
<input value={location.pathname} {...conform.input(path, { type: "hidden" })} />
Expand Down Expand Up @@ -97,6 +99,19 @@ export function Feedback({ button, defaultValue = "bug" }: FeedbackProps) {
</Paragraph>
</InfoPanel>
)}
{type === "concurrency" && (
<InfoPanel
icon={ArrowUpCircleIcon}
iconClassName="text-indigo-500"
panelClassName="w-full mb-2"
>
<Paragraph variant="small">
How much extra concurrency do you need? You can add bundles of 50 for
$50/month each. To help us advise you, please let us know what your tasks do,
your typical run volume, and if your workload is spiky (many runs at once).
</Paragraph>
</InfoPanel>
)}
<Select
{...conform.select(feedbackType)}
variant="tertiary/medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ export default function Page() {
LeadingIcon={ChatBubbleLeftEllipsisIcon}
leadingIconClassName="text-indigo-500"
>
Increase limit
Increase limit
</Button>
}
defaultValue="help"
defaultValue="concurrency"
/>
) : (
<LinkButton
Expand Down
7 changes: 3 additions & 4 deletions apps/webapp/app/routes/resources.feedback.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { parse } from "@conform-to/zod";
import { ActionFunctionArgs, json } from "@remix-run/server-runtime";
import { PlainClient, uiComponent } from "@team-plain/typescript-sdk";
import { inspect } from "util";
import { type ActionFunctionArgs, json } from "@remix-run/server-runtime";
import { type PlainClient, uiComponent } from "@team-plain/typescript-sdk";
import { z } from "zod";
import { env } from "~/env.server";
import { redirectWithSuccessMessage } from "~/models/message.server";
import { requireUser } from "~/services/session.server";
import { sendToPlain } from "~/utils/plain.server";
Expand All @@ -16,6 +14,7 @@ export const feedbackTypeLabel = {
help: "Help me out",
enterprise: "Enterprise enquiry",
feedback: "General feedback",
concurrency: "Increase my concurrency",
};

export type FeedbackType = keyof typeof feedbackTypeLabel;
Expand Down
Loading